HomeCoinsAvalanche (AVAX)Apricot Phase Five: PC Atomic Transfers, Atomic Transaction Batching, and C-Chain Fee...

Apricot Phase Five: PC Atomic Transfers, Atomic Transaction Batching, and C-Chain Fee Algorithm Optimizations | by Patrick O’Grady | Avalanche | Nov, 2021

- Advertisement -


This evening, the pre-release code was published for Phase Five of the Apricot Upgrade (“AP5”), which will activate at 10 a.m. EST (3 p.m. UTC) on Wednesday, November 24th on the Fuji Testnet. Note, this pre-release code only works on Fuji. If you run it on Mainnet, it will exit on startup.

Pending a successful AP5 activation on Fuji, the Avalanche Mainnet AP5 activation time will be announced and the official AP5 AvalancheGo release (v1.7.0) will be published.

This upgrade includes protocol optimizations that are not compatible with AvalancheGo versions < v1.7.0. If you run a node on Fuji Testnet, it is recommended that you update your software to AvalancheGo >= v1.7.0 before the activation time on Fuji. If you are a Mainnet node operator, there is no action required until the official [email protected] code is published.

Apricot Phase Five: PC Atomic Transfers, Atomic Transaction Batching, and C-Chain Fee Algorithm Optimizations | by Patrick O'Grady | Avalanche | Nov, 2021
Moving from C-Chain to X-Chain on https://wallet.avax.network

Avalanche uses an abstraction called Shared Memory to facilitate the movement of AVAX and ANTs (Avalanche Native Tokens) between the C-Chain, P-Chain, and X-Chain. In Shared Memory, all in-flight transfers are represented as UTXOs that can be consumed asynchronously by whichever chain the UTXO owner(s) calls `ImportTx` on. However there is one BIG exception, users can only go between X<>C and X<>P. This means someone trying to stake AVAX they received on the C-Chain has to travel through the X-Chain to get to the P-Chain. This extra step adds additional fees, complexity, and latency to the C<>P transfer process (one of the most common flows on the Primary Network).

Starting in AP5, users can consume UTXOs in Shared Memory on ANY Chain. This means you can now export funds from C and import them directly into P, or vice versa. This new functionality makes it easier to build interesting cross-chain mechanisms on the Primary Network and makes it easier for integrators that can’t index the X-Chain’s DAG to support staking.

Number of C-Chain Atomic Transactions per Day

When the Avalanche Network launched, the number of Atomic Transactions that could be processed in any block (on both the C-Chain and P-Chain) was capped at 1. When there is more than 1 pending transaction in the mempool, users can encounter uncharacteristic delays as they wait for their transaction to eventually be prioritized (sorted by AVAX burned) and included in a block. This throughput was sufficient for the first year of the network’s existence but has started to become a bottleneck. Since the start of Avalanche Rush, there has been a ~7–8x increase in the number of Atomic Transactions on the Primary Network each day (often coming in surges).

Starting in AP5, C-Chain and P-Chain blocks will contain multiple atomic transactions. For initial launch, this is limited to ~10 Atomic Transactions per block but could be increased in subsequent upgrades as usage increases. Paired with P<>C Atomic Transaction support, this upgrade will massively improve the cross-chain transfer UX.

In Apricot Phase 3, dynamic fees were added to the C-Chain using an algorithm called “Moderato” (which targets a specific network utilization over time). This algorithm was parameterized to target 10M units of gas consumption every 10 seconds. Apricot Phase 4 introduced Snowman++ and Block-Based fees to reduce the amount of contention on the network and to encourage validators to batch transactions into fewer blocks, however, it left the target gas consumption and block production rate unmodified. We ran a large number of simulations to generate the parameter set used in AP4 and AP5, but there is nothing quite like the real world!

Percentage Change in Gas Price from the Minimum Gas Price of the Previous Minute to Maximum Gas Price of the Next Minute

Although AP4 succeeded in greatly reducing contention on the C-Chain, we saw the minimum gas price oscillate at a higher rate of change than in our simulations. From one minute to the next, we observed changes of 20–50%. This directly impacted the experience of some users who saw their transactions “stall” as the minimum gas price jumped by the time their transaction made it into the mempool. Those users would then need to wait for the minimum gas price to go down before they would see their transaction included into a block (unless they “sped up” their transaction using their wallet).

Starting in AP5, Moderato is now parameterized to be ~66% more stable, target 15M units of gas consumption per 10 seconds, and better regulate block batching (less blocks that are more full). The additional gas price stability should make transaction construction more reliable, the increased target gas consumption should reduce the average gas price, and increased block batching should increase the number of transactions that are processed at a given gas price. Over the next few months, we will continue to pursue EVM optimizations that justify the further increase of target gas consumption.

  • Apricot Phase Five Upgrade code can be found here.
  • A tutorial for upgrading your node is available here.
  • If you have any questions, please connect with the Ava Labs developer team here.

The process to upgrade to AvalancheGo v1.7.0 is the same as any other upgrade. If you build from source, run the build script as before. If you use the pre-compiled binaries, invoke them as before. If you use the installer script, use that as before.

Once you start AvalancheGo v1.7.0, you do not need to do anything else. More information on updating a node can be found here. As a reminder, it is best practice to have a backup of your staking key/certificate.

No.

If you don’t upgrade your validator to v1.7.0 before the Avalanche Mainnet activation date (which will be shared in coming days), your node will be marked as offline and other nodes will report your node as having lower uptime, which may jeopardize your staking rewards.

No.

No. As a reminder, you can check your validator’s estimated uptime using the `info.uptime` API call:

First, make sure that you’ve read the documentation thoroughly and searched the FAQs. It might answer your question somewhere. If you don’t see the answer, go to our Discord server and search for your question. If it has not already been asked, please post it in the most appropriate channel.



Source link

- Advertisement -
Mr Bitcointehttps://www.bitcointe.com/
“Fact You Need To Know About Cryptocurrency - The first Bitcoin purchase was for pizza.” ― Mohsin Jameel
462FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,545FollowersFollow
2,230SubscribersSubscribe

Most Popular

bitcoin
Bitcoin (BTC) $ 48,150.00
ethereum
Ethereum (ETH) $ 3,888.61
tether
Tether (USDT) $ 1.01
bitcoin-cash
Bitcoin Cash (BCH) $ 437.84
litecoin
Litecoin (LTC) $ 155.13
eos
EOS (EOS) $ 2.95
okb
OKB (OKB) $ 22.86
tezos
Tezos (XTZ) $ 3.94
leo-token
LEO Token (LEO) $ 3.54
cardano
Cardano (ADA) $ 1.35
monero
Monero (XMR) $ 191.50
stellar
Stellar (XLM) $ 0.263553
chainlink
Chainlink (LINK) $ 18.56
huobi-token
Huobi Token (HT) $ 7.97
tron
TRON (TRX) $ 0.082101
usd-coin
USD Coin (USDC) $ 1.01
dash
Dash (DASH) $ 134.89
neo
NEO (NEO) $ 27.40
iota
IOTA (MIOTA) $ 1.17
nem
NEM (XEM) $ 0.128744
zcash
Zcash (ZEC) $ 165.39
maker
Maker (MKR) $ 2,474.62
paxos-standard
Pax Dollar (USDP) $ 1.00
ethereum-classic
Ethereum Classic (ETC) $ 35.80
vechain
VeChain (VET) $ 0.088224
true-usd
TrueUSD (TUSD) $ 1.01
ftx-token
FTX Token (FTT) $ 45.24
kucoin-shares
KuCoin Token (KCS) $ 20.85
waves
Waves (WAVES) $ 16.50