diff --git a/casper-node_release b/casper-node_release index 3fe27d4..c393fd3 100644 --- a/casper-node_release +++ b/casper-node_release @@ -1 +1 @@ -1.5.5-3c2e7a3 \ No newline at end of file +1.5.6-9f3995853204a18f17de9c022233d22aa14b9c37 \ No newline at end of file diff --git a/config/CHANGELOG.md b/config/CHANGELOG.md index bbcde50..6eeb6e3 100644 --- a/config/CHANGELOG.md +++ b/config/CHANGELOG.md @@ -11,7 +11,107 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). [comment]: <> (Fixed: any bug fixes) [comment]: <> (Security: in case of vulnerabilities) -## 1.5.5 - 12150 +## 1.5.6 - 12268 (from 1.5.3) +### casper-node 1.5.6 9f3995853204a18f17de9c022233d22aa14b9c37 + +## Removed +* config-example.toml + * node + * sync_to_genesis + * network + * estimator_weights + * gossip + * finality_signatures + +## Changed +* config-example.toml + * node + * prevent_validator_shutdown + +* chainspec.toml + * protocol + * version + * activation_point + * core + * minimum_block_time + * locked_funds_period + * vesting_schedule_period + * round_seigniorage_rate + * highway + * maximum_round_length + * deploys + * max_ttl + * max_block_size + * block_max_deploy_count + * block_max_transfer_count + * block_gas_limit + * wasm + * storage_costs + * gas_per_byte + * host_function_costs + * add_associated_key + * add_contract_version + * blake2b + * call_contract + * call_versioned_contract + * get_balance + * get_named_arg + * put_key + * read_value + * remove_contract_user_group_urefs + * transfer_from_purse_to_purse + * opcode_costs + * control_flow + * br + * br_if + * call + * call_indirect + * br_table + * cost + +## Added +* config-example.toml + * node + * sync_handling + * network + * estimator_weights + * block_gossip + * deploy_gossip + * finality_signature_gossip + * address_gossip + * finality_signature_broadcasts + * legacy_deploy_requests + * legacy_deploy_responses + * block_header_requests + * block_header_responses + * finality_signature_requests + * finality_signature_responses + * sync_leap_requests + * sync_leap_responses + * sync_leap_requests + * sync_leap_responses + * approvals_hashes_requests + * approvals_hashes_responses + * execution_results_requests + * execution_results_responses + * rpc_server + * qps_limit +* chainspec.toml + * core + * allow_unrestricted_transfers + * allow_auction_bids + * compute_rewards + * refund_handling + * fee_handling + * administrators + * highway + * performance_meter + * blocks_to_consider + * wasm + * host_function_costs + * enable_contract_version + +## 1.5.5 - 12150 (deferred to 1.5.6) ### casper-node 1.5.5-3c2e7a3 ## Removed @@ -23,7 +123,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * gossip * finality_signatures -## Changes +## Changed * chainspec.toml * protocol * version diff --git a/config/chainspec.toml b/config/chainspec.toml index 9757150..09f6623 100644 --- a/config/chainspec.toml +++ b/config/chainspec.toml @@ -1,6 +1,6 @@ [protocol] # Protocol version. -version = '1.5.5' +version = '1.5.6' # Whether we need to clear latest blocks back to the switch block just before the activation point or not. hard_reset = true # This protocol version becomes active at this point. @@ -11,7 +11,7 @@ hard_reset = true # in contract-runtime for computing genesis post-state hash. # # If it is an integer, it represents an era ID, meaning the protocol version becomes active at the start of this era. -activation_point = 12150 +activation_point = 12509 [network] # Human readable name for convenience; the genesis_hash is the true identifier. The name influences the genesis hash by @@ -125,7 +125,7 @@ blocks_to_consider = 10 # The maximum number of Motes allowed to be spent during payment. 0 means unlimited. max_payment_cost = '0' # The duration after the deploy timestamp that it can be included in a block. -max_ttl = '18 hours' +max_ttl = '2 hours' # The maximum number of other deploys a deploy can depend on (require to have been executed before it can execute). max_dependencies = 10 # Maximum block size in bytes including deploys contained by the block. 0 means unlimited. @@ -157,7 +157,7 @@ max_stack_height = 500 [wasm.storage_costs] # Gas charged per byte stored in the global state. -gas_per_byte = 630_000 +gas_per_byte = 1_117_587 [wasm.opcode_costs] # Bit operations multiplier. @@ -215,21 +215,21 @@ size_multiplier = 100 # Host function declarations are located in smart_contracts/contract/src/ext_ffi.rs [wasm.host_function_costs] add = { cost = 5_800, arguments = [0, 0, 0, 0] } -add_associated_key = { cost = 9_000, arguments = [0, 0, 0] } -add_contract_version = { cost = 200, arguments = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] } -blake2b = { cost = 200, arguments = [0, 0, 0, 0] } -call_contract = { cost = 4_500, arguments = [0, 0, 0, 0, 0, 420, 0] } -call_versioned_contract = { cost = 4_500, arguments = [0, 0, 0, 0, 0, 0, 0, 420, 0] } +add_associated_key = { cost = 1_200_000, arguments = [0, 0, 0] } +add_contract_version = { cost = 200, arguments = [0, 0, 0, 0, 120_000, 0, 0, 0, 0, 0] } +blake2b = { cost = 1_200_000, arguments = [0, 120_000, 0, 0] } +call_contract = { cost = 300_000_000, arguments = [0, 0, 0, 120_000, 0, 120_000, 0] } +call_versioned_contract = { cost = 300_000_000, arguments = [0, 0, 0, 0, 0, 120_000, 0, 120_000, 0] } create_contract_package_at_hash = { cost = 200, arguments = [0, 0] } create_contract_user_group = { cost = 200, arguments = [0, 0, 0, 0, 0, 0, 0, 0] } create_purse = { cost = 2_500_000_000, arguments = [0, 0] } disable_contract_version = { cost = 200, arguments = [0, 0, 0, 0] } -get_balance = { cost = 3_800, arguments = [0, 0, 0] } +get_balance = { cost = 3_000_000, arguments = [0, 0, 0] } get_blocktime = { cost = 330, arguments = [0] } get_caller = { cost = 380, arguments = [0] } get_key = { cost = 2_000, arguments = [0, 440, 0, 0, 0] } get_main_purse = { cost = 1_300, arguments = [0] } -get_named_arg = { cost = 200, arguments = [0, 0, 0, 0] } +get_named_arg = { cost = 200, arguments = [0, 120_000, 0, 120_000] } get_named_arg_size = { cost = 200, arguments = [0, 0, 0] } get_phase = { cost = 710, arguments = [0] } get_system_contract = { cost = 1_100, arguments = [0, 0, 0] } @@ -240,19 +240,19 @@ new_uref = { cost = 17_000, arguments = [0, 0, 590] } random_bytes = { cost = 200, arguments = [0, 0] } print = { cost = 20_000, arguments = [0, 4_600] } provision_contract_user_group_uref = { cost = 200, arguments = [0, 0, 0, 0, 0] } -put_key = { cost = 38_000, arguments = [0, 1_100, 0, 0] } +put_key = { cost = 100_000_000, arguments = [0, 120_000, 0, 120_000] } read_host_buffer = { cost = 3_500, arguments = [0, 310, 0] } -read_value = { cost = 6_000, arguments = [0, 0, 0] } +read_value = { cost = 60_000, arguments = [0, 120_000, 0] } read_value_local = { cost = 5_500, arguments = [0, 590, 0] } remove_associated_key = { cost = 4_200, arguments = [0, 0] } remove_contract_user_group = { cost = 200, arguments = [0, 0, 0, 0] } -remove_contract_user_group_urefs = { cost = 200, arguments = [0, 0, 0, 0, 0, 0] } +remove_contract_user_group_urefs = { cost = 200, arguments = [0, 0, 0, 0, 0, 120_000] } remove_key = { cost = 61_000, arguments = [0, 3_200] } ret = { cost = 23_000, arguments = [0, 420_000] } revert = { cost = 500, arguments = [0] } set_action_threshold = { cost = 74_000, arguments = [0, 0] } transfer_from_purse_to_account = { cost = 2_500_000_000, arguments = [0, 0, 0, 0, 0, 0, 0, 0, 0] } -transfer_from_purse_to_purse = { cost = 82_000, arguments = [0, 0, 0, 0, 0, 0, 0, 0] } +transfer_from_purse_to_purse = { cost = 82_000_000, arguments = [0, 0, 0, 0, 0, 0, 0, 0] } transfer_to_account = { cost = 2_500_000_000, arguments = [0, 0, 0, 0, 0, 0, 0] } update_associated_key = { cost = 4_200, arguments = [0, 0, 0] } write = { cost = 14_000, arguments = [0, 0, 0, 980] } diff --git a/config/config-example.toml b/config/config-example.toml index 4ee8a19..8d9ba81 100644 --- a/config/config-example.toml +++ b/config/config-example.toml @@ -36,6 +36,17 @@ shutdown_for_upgrade_timeout = '2 minutes' # Maximum time a node will wait for an upgrade to commit. upgrade_timeout = '30 seconds' +# The node detects when it should do a controlled shutdown when it is in a detectably bad state +# in order to avoid potentially catastrophic uncontrolled crashes. Generally, a node should be +# allowed to shutdown, and if restarted that node will generally recover gracefully and resume +# normal operation. However, actively validating nodes have subjective state in memory that is +# lost on shutdown / restart and must be reacquired from other validating nodes on restart. +# If all validating nodes shutdown in the middle of an era, social consensus is required to restart +# the network. As a mitigation for that, the following config can be set to true on some validator +# nodes to cause nodes that are supposed to be validators in the current era to ignore controlled +# shutdown events and stay up. This allows them to act as sentinels for the consensus data for +# other restarting nodes. This config is inert on non-validating nodes. +prevent_validator_shutdown = false # ================================= # Configuration options for logging @@ -176,7 +187,7 @@ bind_address = '0.0.0.0:35000' # # Multiple addresses can be given and the node will attempt to connect to each, requiring at least # one connection. -known_addresses = ['34.192.231.34:35000','168.119.137.143:35000','46.101.61.107:35000','47.88.87.63:35000','35.152.42.229:35000','18.219.70.138:35000','3.221.194.62:35000','99.81.225.72:35000','63.33.251.206:35000','54.180.220.20:35000','188.40.83.254:35000','157.90.131.121:35000','13.51.218.68:35000','15.235.53.173:35000','15.235.53.233:35000','178.162.231.183:35000','71.105.223.69:35000','84.16.224.170:35000','88.218.224.93:35000','15.235.14.86:35000','15.235.53.230:35000','188.40.16.94:35000','65.108.101.62:35000','65.21.129.12:35000','3.17.72.47:35000','162.19.171.49:35000','185.132.178.196:35000','65.108.69.41:35000'] +known_addresses = ['34.192.231.34:35000','168.119.137.143:35000','46.101.61.107:35000','47.88.87.63:35000','35.152.42.229:35000','18.219.70.138:35000','99.81.225.72:35000','63.33.251.206:35000','54.180.220.20:35000','13.51.218.68:35000','15.235.53.173:35000','15.235.53.233:35000','178.162.231.183:35000','71.105.223.69:35000','84.16.224.170:35000','88.218.224.93:35000','15.235.14.86:35000','15.235.53.230:35000','188.40.16.94:35000','65.108.101.62:35000','3.17.72.47:35000','162.19.171.49:35000'] # Minimum number of fully-connected peers to consider network component initialized. min_peers_for_initialization = 3 diff --git a/protocol_versions b/protocol_versions index 1cc0bdb..c5bac08 100644 --- a/protocol_versions +++ b/protocol_versions @@ -1,2 +1,3 @@ 1_5_3 -1_5_5 \ No newline at end of file +1_5_5 +1_5_6 \ No newline at end of file diff --git a/stage_upgrade.sh b/stage_upgrade.sh index 5c59be9..f8b2359 100755 --- a/stage_upgrade.sh +++ b/stage_upgrade.sh @@ -2,7 +2,7 @@ set -e -# This script will stage the upgrade files for casper network from 1.5.3 to 1.5.5 +# This script will stage the upgrade files for casper network from 1.5.3 to 1.5.6 if [ "$(whoami)" != "root" ]; then echo @@ -12,11 +12,15 @@ if [ "$(whoami)" != "root" ]; then exit 1 fi -if [[ -d "/etc/casper/1_5_5" ]]; then - echo "Upgrade 1.5.5 already staged." +if [[ -d "/etc/casper/1_5_6" ]]; then + echo "Upgrade 1.5.6 already staged." exit 0 fi +# delete previously staged 1_5_5 to replace with current faked 1_5_5 to jump to 1_5_6 +rm /etc/casper/1_5_5 || true +rm /var/lib/casper/bin/1_5_5 || true + CNL_VERSION=$(casper-node-launcher --version | cut -d' ' -f4) # Format of the arguments to pull_casper_node_version.sh script changed to allow conf @@ -29,13 +33,16 @@ else if [ $CNL_VERSION == "0.3.2" ]; then echo "casper-node-launcher version 0.3.2, using old syntax." sudo -u casper /etc/casper/pull_casper_node_version.sh 1_5_5 casper + sudo -u casper /etc/casper/pull_casper_node_version.sh 1_5_6 casper else echo "casper-node-launcher version 0.3.3+, using conf syntax." sudo -u casper /etc/casper/pull_casper_node_version.sh casper.conf 1_5_5 + sudo -u casper /etc/casper/pull_casper_node_version.sh casper.conf 1_5_6 fi sudo -u casper /etc/casper/config_from_example.sh 1_5_5 + sudo -u casper /etc/casper/config_from_example.sh 1_5_6 fi -echo "Upgrade 1_5_5 staged." +echo "Upgrade 1_5_6 staged." exit 0 \ No newline at end of file