6. Deprecating get-balance RPC: We have deprecated the get-balance rpc(to be removed in v2.0.0) and replaced it with an enhanced version query-balance rpc, the following are some key points to note about the new rpc endpoint.
- use the public key or account hash to query the purse.
- use uref of the purse to query.
- do not have to use the state-root hash to query.
All preexisting features of the get-deploy query are retained in the new query-balance endpoint, and we encourage the user to use it, more infomation here.
7. Metrics Changes: In this release we have made changes to some of the metrics, for a detailed list of changes refer to this PR, please find some notable ones added/removed/renamed from the same list.
- block_accumulator_block_acceptors, block_accumulator_known_child_blocks to report status of the block accumulator component.
- forward|historical)_block_sync_duration_seconds to report the progress of block synchronization
- deploy_buffer_total_deploys, deploy_buffer_held_deploys, deploy_buffer_dead_deploys to report status of the deploy buffer component.
- (lowest|highest)_available_block_height to report the low/high values of the complete block range (the highest contiguous chain of blocks for which the node has complete data).
- execution_queue_size to report the number of blocks enqueued pending execution.
- In this release chain_height metric is deprecated in favor of highest_available_block_height and current_era metric renamed to consensus_current_era.
Note: In this release we removed the ‘pending deploy count’ metric since the block proposer component was removed. However we can get the same information about pending deploy count by using subtraction to the following metrics '(deploy_buffer_total_deploys - deploy_buffer_dead_deploy)'.
Smart Contracting
There are no breaking changes to smart contracts in v1.5.0, however smart contract package string prefix changes may need some refactoring(refer below)to parser etc; authors must also ensure their rust-toolchain is this build - nightly-03-25-2023 Non-breaking changes as described below.
- Allow session and smart contract logic to ask for deploy approvals: Added a new feature, where smart contracts are allowed to load the already present authorized_keys across the wasm boundaries, this is particularly useful for contracts that use multi signature and need to have role-based security in the contract logic. The contract_api/wasm ffi runtime is updated with a new function list_authorization_keys(), which returns a list of Account hashes that have signed the deploy in context , which from the calling account context is the authorization keys, here.
- DICTIONARY_ITEM_KEY_MAX_LENGTH increased: The DICTIONARY_ITEM_KEY_MAX_LENGTH has been increased from, usize of 64 to 128. Earlier, say one was calling the Account hash and using it as a dictionary item key, because of the prefix it would be 64 hex bytes + prefix, now with added length this is a non-issue, here.
- New convenience functions: Added two new helper functions named_dictionary_get() and named_dictionary_put() , these are convenience functions which calls the runtime::get key() internally to get the dictionary's URef followed by storage::dictionary_get() or storage::dictionary_put() this helps avoid making multiple calls to the contract API, more here.
- Testbuilder updates: In v1.5.2,we order the transforms for multiple deploys within a block; in order to reflect the change in test harness, we also updated the WasmTestBuilder to track the transforms in the correct order here.
- Undo v1.4.5 changes: We introduced a trie leaf size (“max stored value”) limit in v1.4.5(details here) - tldr; thus if any new smart contract tried to create a value larger than 8MB, that contract's execution would have failed. We have reverted the limit in v1.5.2.
- Gas cost estimation: We added a significant feature via a RPC endpoint speculative_exec, which enables contract developers to estimate the potential gas cost of a deploy, here. In order to support this we added a new speculative execution JSON-RPC HTTP server and added settings to config.toml. This server is disabled by default and the out of the box port(configurable) is 7778. A node needs to enable this server in order to serve speculative execution endpoint calls.
- Contract package string prefix corrected: The contract package string prefix changed from ``contract-package-wasm" to "contract-package. This requires no change if developers are encoding using the old format(to be deprecated in v2.0.0), since we handle parsing the old format in the node itself. However any parser or decoder should be updated to accept the new format; or if there is any specific use-case to accept the old format in the code that needs to be refactored to support parsing the old format since the node will not be outputting the old format(contract-package-wasm), more details here.
- Improve detection of invalid WASM: We fixed an issue where there was no charge for execution of incorrect wasm files, wasm magic bytes, empty modules, general corruption or a no memory section- now these will involve a cost to the tune of 2.5CSPR, more here.
Informational:
Below we have a list of informational notes relevant to the node release v1.5.2.
- Full list of changes in released v1.5.2 is under changelog sections 1.5.0-rc.1, 1.5.1 and 1.5.2 here and full list of changes to configs here.
- List of stories from project board included in v1.5.2 here.
- Upgrade instructions are - here.
- The Casper-Client v2.0.0 is released and published on crates.io for general availability. The memo is here and contains the RPC and other changes for node 1.5.2. This is the recommended version to use.
- Casper-types (v3.0.0) is the latest recommended version to use.
- JS SDK - 2.14 and above is the recommended version to use.
- Please update your rust toolchain to use the 03-25-2023 nightly version.
- We recommend that validators/operators use fast sync ttl mode and not full sync when joining the network - that will save disk space, additionally we observed sync ttl mode takes under 4 hours in general to sync to tip, thus enabling quicker participation.
- Operators should note that the non-validating nodes in 1.5.2 are more of an observer and do not participate in the network in the same way as in before 1.5.2, thus any metrics setup that depends on them will need to be modified likewise to be dependent on a validating node instead.
- After upgrading to 1.5.2 the first block will be an immediate switch block; thus system proposer unique key is 00 instead of 01 or 02, the user must be aware of this and should make necessary changes at their end to accommodate the change. Note, the switch block will have no deploys.
Note: We have also done significant work in 1.5.2 architecturally, that gives the protocol a jump start in preparation of future v2.0.0 of the Casper node protocol, for example the Zug consensus and more.