Releases: casper-network/casper-node
Releases · casper-network/casper-node
v2.1.1
v2.1.0
This release is a configuration only update. Staging will use the 2.0.4 binary.
Configurations for networks have been moved inside resources directory. This allows a nearly complete for release configuration in the casper-node repo for easier reference. A few fields will be modified as needed for staging the upgrade.
Major configuration changes:
- changes settings to optimize network operation at a block time of 8 seconds.
- Implementation of burn mechanism for fees on transaction
v2.0.4
v2.0.3
Summary
The Patch release 2.0.3 resolves a known bug identified at the time of the 2.0.0 release, a reported low impact bug, continuing precursor work for an upcoming feature, and some tech debt cleanup.
Bug:
- There was a design assumption that contract maintainers would choose to disable 1.x version(s) of their contracts when they upgrade them to 2.x versions, but this assumption was unfounded and the expected outcome isn’t required or enforced by the host. Thus in the case where there is both an enabled 1.x and 2.x contract version, an attempt to call a 1.x version would result in the loading of an applicable 2.x version of the contract (if any).
Impact:
- LOW - A relatively rare edge case. It was detected in testnet hours before mainnet upgrade to 2.0. However, initial assessment was that the potential impact which was insufficient to stop and unwind the release. Ecosystem impact is a little higher as this bug discourages the upgrading of some 1.x smart contracts, depending upon existent and intended usage.
- If a contract maintainer disables prior 1.x version(s) of their preexisting contract as part of upgrading the contract to 2.x, then they are not affected by this bug. Disabling the prior version of a contract upon upgrade is the preferred practice.
Root Cause:
- Contract major versions (e.g., 1.x vs 2.x) there was no way via the existing interfaces for a caller to specify major version for a specific contract version invocation. Instead, the logic defaulted to the
protocol_version_majorof the highest enabled version.
Change: The transaction structure and the ffi were extended to allow users to precisely identify a specific contract version:
- FFI - new function:
casper_call_package_version, which includes args formajor_version_ptrandmajor_version_size:-
pub fn casper_call_package_version( contract_package_hash_ptr: *const u8, contract_package_hash_size: usize, major_version_ptr: *const u8, major_version_size: usize, contract_version_ptr: *const u8, contract_version_size: usize, entry_point_name_ptr: *const u8, entry_point_name_size: usize, runtime_args_ptr: *const u8, runtime_args_size: usize, result_size: *mut usize, ) -> i32;
-
- Transaction v1
TransactionInvocationTargetByPackageHash&ByPackageNamevariants:- new field:
protocol_version_major: Option<ProtocolVersionMajor>
- new field:
Default Behavior:
- When
protocol_version_majorisNone, the system uses the current major protocol version - When
versionisNone, the system uses the highest enabled version of the contract - All combinations for these two fields are supported by default ( some + some, some + none, none + some, none + none).
Bug:
- Inconsistent enforcement of minimum bid amount between native
withdraw_bidand vm1 initiatedwithdraw_bid. Native logic was correct.
Impact:
- LOW - Inconsistent but basically harmless.
Root Cause:
- Contract runtime instantiation of the vm1 execution engine did not inject the chainspec defined minimum bid, resulting in the value being defaulted to a lower number. Instantiation of native runtime did use the chainspec value.
Fix:
- Changed contract runtime instantiation of vm1 execution engine to inject the chainspec specified value.
Misc:
- ONGOING: Continuing work on vm2 (enabled in some test environments but not intended to be turned on for mainnet as part of this rollout).
- TECH DEBT: Removed several unwraps in
tracking_copyimplementation. Components and utilities should not be allowed to panic if avoidable, such as in this case. Instead, they should either return a message or error code, or raise an event and allow the node to shutdown gracefully, or be made infallible.
v2.0.1
v2.0.0
v1.5.8
v1.5.7
v1.5.6
Node
1.5.6
Changed
- The node will recognise if a pending upgrade is unstaged and will avoid shutting down for upgrade in this case.
- If an upgrade with the same activation point as the current one is detected on startup, the node will immediately shut down for upgrade.
- Reduce chainspec setting
deploys.max_ttlfrom 18 hours to 2 hours.
1.5.5
Added
- New chainspec setting
highway.performance_meter.blocks_to_considerwith a value of 10, meaning that nodes will take 10 most recent blocks into account when determining their performance in Highway for the purpose of choosing their round lengths.
Execution Engine
7.0.1
Changed
- Change the cost of
wasm.storage_costs.gas_per_byteandshared::storage_costs::DEFAULT_GAS_PER_BYTE_COSTfrom630_000to1_117_587. - Change the cost of the host function
casper_add_associated_keyfrom9_000to1_200_000. - Change the cost of the argument
entry_points_sizeof host functioncasper_add_contract_versionfrom0to120_000. - Change the cost of the host function
casper_blake2band its argumentin_sizefrom200and0respectively to1_200_000to120_000. - Change the cost of the host function
casper_call_contractand its argumentsentry_point_name_sizeandruntime_args_sizefrom4_500,0and420respectively to300_000_000,120_000and120_000. - Change the cost of the host function
casper_call_versioned_contractand the argumentsentry_point_name_sizeandruntime_args_sizefrom4_500,0and420respectively to300_000_000,120_000and120_000. - Change the cost of the host function
casper_get_balancefrom3_800to3_000_000. - Change the cost of arguments
name_sizeanddest_sizeof host functioncasper_get_named_argfrom0to120_000. - Change the cost of the host function
casper_put_keyand its argumentsname_sizeandkey_sizefrom38_000,1_100and0respectively to100_000_000,120_000and120_000. - Change the cost of the host function
casper_read_valueand its argumentkey_sizefrom6_000and0respectively to60_000and120_000. - Change the cost of the argument
urefs_sizeof host functioncasper_remove_contract_user_group_urefsfrom0to120_000. - Change the cost of the host function
casper_transfer_from_purse_to_pursefrom82_000to82_000_000.
7.0.0
Added
- Add chainspec option
core.allow_unrestricted_transfersthat, if enabled, allows token transfers between any two peers. Disabling this option makes sense only for private chains. - Add chainspec option
core.allow_auction_bidsthat, if enabled, allows auction entrypointsdelegateandadd_bidto operate. Disabling this option makes sense only for private chains. - Add chainspec option
core.compute_rewardsthat, if enabled, computes rewards for each era. Disabling this option makes sense only for private chains. - Add chainspec option
core.refund_handlingthat specifies how payment refunds are handled. - Add chainspec option
core.fee_handlingthat specifes how transaction fees are handled. - Add chainspec option
core.administratorsthat, if set, contains list of administrator accounts. This option makes sense only for private chains. - Add support for a new FFI function
enable_contract_versionfor enabling a specific version of a contract.
Changed
current stack heightis written tostderrin caseTrap(Unreachable)error is encountered during Wasm execution.- Tweak upgrade logic transforming withdraw purses to early exit if possible.
- Lower the default gas costs of opcodes.
- Set the cost for branching opcodes to 35,000 (
br,br_if,br_table). - Set the cost for call opcodes to 68,000 (
call,call_indirect).
- Set the cost for branching opcodes to 35,000 (
- Default value for round seigniorage rate is halved to
7/175070816due to reduction in block times, to maintain current seigniorage rate (per unit of time). - Refund ratio is changed from 0% to 99%.
v1.5.4
1.5.4
Added
- New environment variable
CL_EVENT_QUEUE_DUMP_THRESHOLDto enable dumping of queue event counts to log when a certain threshold is exceeded. - Add initial support for private chains.
- Add support for CA signed client certificates for private chains.
- Add a Highway Analysis tool for checking the state of the consensus.
Changed
- Minimum block time reduced from 32.768s to 16.384s, with corresponding changes to related chainspec settings:
core.minimum_block_timereduced to16384 ms.core.round_seigniorage_ratereduced to[7, 175070816].highway.block_gas_limitreduced to4_000_000_000_000.
- The
state_identifierparameter of thequery_global_stateJSON-RPC method is now optional. If nostate_identifieris specified, the highest complete block known to the node will be used to fulfill the request. state_get_account_infoRPC handler can now handle anAccountIdentifieras a parameter.- Replace the
sync_to_genesisnode config field withsync_handling.- The new
sync_handlingfield accepts three values:genesis- node will attempt to acquire all block data back to genesisttl- node will attempt to acquire all block data to comply with time to live enforcementnosync- node will only acquire blocks moving forward
- The new
- Make the
network.estimator_weightssection of the node config more fine-grained to provide more precise throttling of non-validator traffic.
Removed
- The section
consensus.highway.round_success_meterhas been removed from the config file as no longer relevant with the introduction of a new method of determining the round exponent in Highway.
Fixed
- Now possible to build outside a git repository context (e.g. from a source tarball). In such cases, the node's build version (as reported vie status endpoints) will not contain a trailing git short hash.
- Remove an error that would unnecessarily be raised when a node includes its highest orphaned block within the current era.
- Short-circuit initialization of block and deploy metadata DB to resolve delays after an upgrade.
Security
- Update
opensslto version 0.10.55 as mitigation for RUSTSEC-2023-0044.