Releases: ava-labs/avalanchego
Apricot Phase 2 - Patch 5 - DB Upgrade
This update is backwards compatible. It is optional, but highly encouraged. The patch includes significant performance improvements and numerous other updates.
This upgrade is more involved than the typical version update. More detailed instructions and an FAQ can be found here.
VM Improvements:
- Fully redesigned the
platformvm
's state management.- Removed the usage of
versiondb
s being passed through blocks to pass state references that can be modified and read without re-parsing objects. - Implemented a base state manager to properly cache and mange writes to the underlying database.
- Implemented CoW validator sets to enable caching multiple validator sets in memory.
- Indexed chains by subnet to avoid touching unused state objects.
- Indexed validators by
nodeID
to avoid unnecessary iterations while acceptingaddDelegator
andaddSubnetValidator
transactions. - Reduced the number of key-value pairs dedicated to managing validator sets on disk and validator uptimes.
- Removed the usage of
- Added staking reward look-ups to the
platformvm
's API to support indexing of rewards. - Refactored validator uptime metering to simplify testing.
- Added block and transaction type metrics to the
platformvm
. - Added API call metrics to the
avm
and theplatformvm
. - Updated the
avm
's state management to useprefixdb
s, record caching metrics, and share additional code with theplatformvm
. - Simplified
UTXO
management and indexing in theavm
andplatformvm
. - Restructured address parsing and management to be fully shared across compatible VM instances.
- Restructured shared memory of the primary subnet to be fully shared across VM instances.
- Added a chain state implementation to support seamless caching over existing VM implementations and to simplify the implementation of new VMs.
- Integrated the new chain state manager into the
rpcchainvm
, which also adds various metrics. - Added
upgradeBytes
andconfigBytes
to the standard VM interface to better support future network upgrades. - Added
getAtomicTx
andgetAtomicTxStatus
endpoints to theevm
API. - Simplified
evm
block production to be synchronously performed with the consensus engine. - Added an atomic transaction mempool to re-introduce orphaned atomic transactions.
- Fixed bug in the
evm
client to properly set thesourceChain
ingetAtomicUTXOs
. - Integrated the new chain state manager into the
evm
to better optimize block management.
Bootstrapping Improvements:
- Removed re-traversals during bootstrapping. This significantly improves the performance of the node during restarts of the bootstrapping process.
- Fixed an ungraceful node shutdown when attempting to exit the node while executing bootstrapped containers.
- Fixed duplicated IPC container broadcasts during bootstrapping.
- Standardized the bootstrapping jobs queue to write to state using
prefixdb
s rather than implementing custom prefixing. - Added additional bootstrapping caching and cache metrics.
Database Migration Additions:
- Added a daemon process manager to seamlessly migrate to the updated database format.
- Refactored version handling to track database semantic versions.
- Implemented a database manager to track and operate over different database versions.
- Implemented a
keystore
migration that automatically copies users from thev1.0.0
database to thev1.4.5
database. - Implemented a validator uptime migration from the
v1.0.0
database to thev1.4.5
database.
Node Improvements:
- Updating config parsing to always expand environment variables.
- Refactored the node config to allow specifying TLS certificates in memory without touching disk.
- Added better support for meaningful exit codes.
- Displayed listening address of the
http
andstaking
servers to aid in supporting non-specific port mappings. - Implemented a
versionable
database to be able to toggle between a pass through database and aversioned
database. - Optimized ID
Set
pre-allocations and reduced the memory usage of thestruct
s. - Enforced stricter linting rules.
Modified command line arguments:
For the following arguments "default"
was previously treated as a keyword. Now, "default"
will attempt to be treated as the intended value of the flag. To retain the default behavior, the flag should not be specified.
config-file
coreth-config
plugin-dir
staking-tls-key-file
staking-tls-cert-file
bootstrap-ips
bootstrap-ids
ipcs-path
db-dir
For the following arguments ""
was previously treated as a keyword. Now, ""
will attempt to be treated as the intended value of the flag. To retain the default behavior, the flag should not be specified.
ipcs-chain-ids
log-dir
log-display-level
It is no longer required that the bootstrap-ips
and bootstrap-ids
are paired. This means it is now valid to specify a different number of bootstrap-ips
than bootstrap-ids
. The bootstrap-ips
are used to initially connect to the network and the bootstrap-ids
are used as the beacons in bootstrapping.
Added command line arguments:
fetch-only
build-dir
Removed command line arguments:
xput-server-port
xput-server-enabled
Apricot Phase 2 - Patch 4
This update is backwards compatible. It is optional, but encouraged. The patch includes bug fixes and performance improvements that aim to optimize the upcoming db-upgrade
release.
- Skipped tailing delay in bootstrapping so that all chains finish as soon as the last chain is marked as bootstrapped in a subnet.
- Improved message handling during bootstrapping to handle messages while waiting for other chains to sync.
- Reduced sampler allocations by re-using existing samplers.
- Updated docker scripts to only push images from the
master
branch. - Fixed log formatting.
- Improved error messages.
Apricot Phase 2 - Patch 3
This update is backwards compatible. It is optional, but encouraged. The patch includes bug fixes, updated uptime monitoring, and performance improvements.
- Fixed benched message handling that could cause a node to be unable to progress during bootstrapping. This was typically experienced when the node would fail to transition to normal execution as it was finishing bootstrapping.
- Fixed a non-deterministic bug in the C-Chain codebase that could cause nodes that receive a lot of transaction broadcast requests to temporarily stop producing blocks until they processes a block produced by another node.
- Restricted the number of version messages to be sent to a peer to one.
- Removed legacy handshake messages that were deprecated in Apricot Phase 2.
- Marked nodes that have been benched as being offline for uptime calculations.
- Updated the validator set to be more performant during validator set changes.
- Updated the networking to only attempt to re-connect to a peer on disconnect if they are currently a validator.
Apricot Phase 2 - Patch 2
This update is backwards compatible with v1.4.0 and v1.4.1. The changes in the upgrade go into effect at 10 AM EDT, May 5th 2021 on the Fuji testnet and 7 AM EDT, May 10th 2021 on mainnet. The patch further reduces the size of gossiped peerlist messages and introduces several new flags.
network-peer-list-size
allows for tuning the number of peers gossiped in eachpeerlist
message.network-peer-list-gossip-size
allows for tuning the number of peers to gossippeerlist
messages to.network-peer-list-gossip-frequency
allows for tuning how frequentlypeerlist
s are gossiped.
Apricot Phase 2 - Patch 1
This update is backwards compatible with v1.4.0. Please see the expected update times in the v1.4.0 release. The patch reduces the size of gossiped peerlist messages and introduces a new flag --bootstrap-beacon-connection-timeout
that allows for the beacon connection timeout to be configured on startup.
Apricot Phase 2
Please note that this change is not backwards compatible with previous releases.
This upgrade applies the Ethereum Berlin upgrade to the C-chain, adds a new AVM endpoint, and includes various stability improvements. We urge everyone in the community to update as soon as possible in order to ensure that their nodes remain healthy.
The changes in the upgrade go into effect at 10 AM EDT, May 5th 2021 on the Fuji testnet and 7 AM EDT, May 10th 2021 on mainnet.
The primary components to this upgrade include:
- Updated Coreth to depend on v1.10.2 of go-ethereum.
- Applied the Ethereum Berlin upgrade. Specifically EIP-2565, EIP-2718, EIP-2929, and EIP-2930.
- Added new stateful pre-compiled smart contracts to the C-chain to support ANT transfers and ARC-20 wrappers around ANTs.
- Added an AVM
/events
endpoint that supports websocket notification of transactions being accepted matching an addresses filter. - Added two new networking message types
SignedVersion
andSignedPeerlist
to improve validator -> IP mappings. - Fixed a long standing bug where shutting down the node while a chain was bootstrapping could cause the chain to be shut down ungracefully.
- Updated the plugin gRPC packages to paginate large requests to improve stability.
- Added the ability to run avalanchego's main binary as a plugin.
- Fixed a potential race condition in the leveldb corruption protection.
- Updated the automated build scripts to better support multiple architectures.
Added command line arguments:
plugin-mode-enabled
specifies the binary to run in plugin mode.
Removed command line arguments:
p2p-tls-enabled
disconnected-check-frequency
disconnected-restart-timeout
restart-on-disconnected
Apricot Phase 1 - Patch 2
This update is backwards compatible. It is optional, but encouraged. The patch includes security improvements, bug fixes, and monitoring improvements.
Security Improvements
- Enforced a strict canonical format for C-chain blocks made prior to
Apricot Phase 1
. This ensures that modifications to theextra-data
block field can not result in modifications to the chain state during bootstrapping. - Changed the
Keystore
to ensure only encrypted values are sent over the IPC between avalanchego and plugin processes.
Bug Fixes:
- Fixed delegation cap calculations to include updating the current delegation maximum before removing a delegator. This ensures that the delegation cap is always enforced.
- Fixed
AVM
's static API to be registered correctly on startup. - Updated node
uptime
calculations to take network upgrades into account.
Monitoring Improvements
- Added an optional node indexer that can provide a locally consistent ordering of operations accepted on a chain.
- Updated ansible inventory to include numerous improvements (Huge thanks to @moreati).
Apricot Phase 1 - Patch 1
This update is backwards compatible. It is optional, but encouraged. The patch includes stability, monitoring improvements, and minor bug fixes.
The primary components to this upgrade include:
- Fixed C-chain segfault when performing compression on arm64 CPUs.
- Added group permissions to local files to enable complex node monitoring.
- Stripped white space from
Auth
passwords passed through theapi-auth-password-file
flag. - Removed
timeSinceNoOutstandingRequests
as it was replaced bylongestRunningRequest
. - Added additional metrics in network throttling.
- Various code cleanup.
Added command line arguments:
network-health-max-outstanding-request-duration
Removed command line arguments:
network-health-max-time-since-no-requests
Apricot Phase 1
Please note that this change is not backwards compatible with previous releases.
This upgrade reduces C-chain gas fees, removes C-chain gas refunds, and includes various security improvements. We urge everyone in the community to update as soon as possible in order to ensure that their nodes remain healthy.
The changes in the upgrade go into effect at 10 AM EST, March 25th 2021 on the Fuji testnet and 10 AM EST, March 31st 2021 on mainnet.
The primary components to this upgrade include:
- Reduced C-chain gas cost from 470 nAVAX to 225 nAVAX.
- Removed C-chain gas refunds. This change adopts EIP-3298.
- Refactored C-chain verification to be cleaner when performing network upgrades.
- Fixed the Auth API to properly enforce revoked tokens.
- Strengthened the Auth API to ensure the expected signature format is used.
- Removed the Auth API's password from the CLI arguments.
- Added more strict file permissions checks.
- Added some minor additional error handling.
- Sanitized log writes before being written to disk.
- Added configurable origins to the HTTP endpoint.
- Removed attempted HTTPs to HTTP fail over on startup. Now the node will close on startup if upgrading the HTTP endpoint to HTTPs fails.
Added command line arguments:
api-auth-password-file
specifies the file to read the Auth API's password from.
Removed command line arguments:
api-auth-password
Thanks to the Flare network for bringing issues to our attention.
Apricot Phase 0 - Upgrade 1 - Patch 4
This update is backwards compatible. It is optional, but encouraged. The patch includes stability and monitoring improvements.
- Updated readme to correct storage requirements.
- Added additional error handling to Avalanche Tx verification during bootstrapping.
- Updated numerous metrics, including adding various new metrics relating to node health and database usage, removing unused and invalid metrics, and fixing some metric names.
- Added additional logging to CI.
- Added the C-chain to the list of critical chains.