Skip to content

Commit

Permalink
Merge pull request #56 from casper-network/casper-1.5.5
Browse files Browse the repository at this point in the history
casper 1.5.5 files.
  • Loading branch information
sacherjj authored Dec 29, 2023
2 parents 609d783 + 6935c68 commit ce44369
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 36 deletions.
2 changes: 1 addition & 1 deletion casper-node_release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.3-7aa53e8
1.5.5-3c2e7a3
79 changes: 79 additions & 0 deletions config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,85 @@ 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
### casper-node 1.5.5-3c2e7a3

## Removed
* config-example.toml
* node
* sync_to_genesis
* network
* estimator_weights
* gossip
* finality_signatures

## Changes
* 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_block_size
* block_max_deploy_count
* block_max_transfer_count
* block_gas_limit
* wasm
* 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
* 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.3 - 11081
### casper-node 1.5.3-7aa53e8

Expand Down
72 changes: 53 additions & 19 deletions config/chainspec.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[protocol]
# Protocol version.
version = '1.5.3'
version = '1.5.5'
# 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.
Expand All @@ -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 = 11081
activation_point = 12150

[network]
# Human readable name for convenience; the genesis_hash is the true identifier. The name influences the genesis hash by
Expand All @@ -29,7 +29,7 @@ era_duration = '120 minutes'
# minimum height.
minimum_era_height = 20
# Minimum difference between a block's and its child's timestamp.
minimum_block_time = '32768 ms'
minimum_block_time = '16384 ms'
# Number of slots available in validator auction.
validator_slots = 100
# A number between 0 and 1 representing the fault tolerance threshold as a fraction, used by the internal finalizer.
Expand All @@ -48,22 +48,22 @@ legacy_required_finality = 'Any'
# you will be a validator in era N + auction_delay + 1.
auction_delay = 1
# The period after genesis during which a genesis validator's bid is locked.
locked_funds_period = '90 days'
locked_funds_period = '0 days'
# The period in which genesis validator's bid is released over time after it's unlocked.
vesting_schedule_period = '13 weeks'
vesting_schedule_period = '0 weeks'
# Default number of eras that need to pass to be able to withdraw unbonded funds.
unbonding_delay = 7
# Round seigniorage rate represented as a fraction of the total supply.
#
# Annual issuance: 8%
# Minimum round exponent: 15
# Minimum block time: 2^14 milliseconds
# Ticks per year: 31536000000
#
# (1+0.08)^((2^15)/31536000000)-1 is expressed as a fractional number below
# (1+0.08)^((2^14)/31536000000)-1 is expressed as a fractional number below
# Python:
# from fractions import Fraction
# Fraction((1 + 0.08)**((2**15)/31536000000) - 1).limit_denominator(1000000000)
round_seigniorage_rate = [7, 87535408]
# Fraction((1 + 0.08)**((2**14)/31536000000) - 1).limit_denominator(1000000000)
round_seigniorage_rate = [7, 175070816]
# Maximum number of associated keys for a single account.
max_associated_keys = 100
# Maximum height of contract runtime call stack.
Expand All @@ -80,14 +80,47 @@ simultaneous_peer_requests = 5
consensus_protocol = 'Highway'
# The maximum amount of delegators per validator. if the value is 0, there is no maximum capacity.
max_delegators_per_validator = 1200
# Allows peer to peer transfers between users.
#
# Setting this to false makes sense only for private chains.
allow_unrestricted_transfers = true
# Enables the auction entry points 'delegate' and 'add_bid'.
#
# Setting this to false makes sense only for private chains which don't need to auction new validator slots. These
# auction entry points will return an error if called when this option is set to false.
allow_auction_bids = true
# If set to false, then consensus doesn't compute rewards and always uses 0.
compute_rewards = true
# Defines how refunds of the unused portion of payment amounts are calculated and handled.
#
# Valid options are:
# 'refund': this causes excess payment amounts to be sent to either a pre-defined purse, or back to the sender.
# the refunded amount is calculated as the given ratio of the payment amount minus the execution costs.
# 'burn': similar to what refund does; except the refund amount is burned.
refund_handling = { type = 'refund', refund_ratio = [99, 100] }
# Defines how fees are handled.
#
# Valid options are:
# 'pay_to_proposer': fees are paid to the block proposer
# 'accumulate': fees are accumulated in a special purse and distributed at the end of each era evenly among all
# administrator accounts
# 'burn': fees are burned
fee_handling = { type = 'pay_to_proposer' }
# List of public keys of administrator accounts. Setting this option makes only on private chains which require
# administrator accounts for regulatory reasons.
administrators = []

[highway]
# Highway dynamically chooses its round length, between minimum_block_time and maximum_round_length.
maximum_round_length = '132 seconds'
maximum_round_length = '66 seconds'
# The factor by which rewards for a round are multiplied if the greatest summit has ≤50% quorum, i.e. no finality.
# Expressed as a fraction (1/5 by default).
reduced_reward_multiplier = [1, 5]

[highway.performance_meter]
# The number of recent blocks to consider when measuring performance for the purpose of deciding the round length.
blocks_to_consider = 10

[deploys]
# The maximum number of Motes allowed to be spent during payment. 0 means unlimited.
max_payment_cost = '0'
Expand All @@ -96,17 +129,17 @@ max_ttl = '18 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.
max_block_size = 10_485_760
max_block_size = 5_242_880
# Maximum deploy size in bytes. Size is of the deploy when serialized via ToBytes.
max_deploy_size = 1_048_576
# The maximum number of non-transfer deploys permitted in a single block.
block_max_deploy_count = 50
block_max_deploy_count = 25
# The maximum number of wasm-less transfer deploys permitted in a single block.
block_max_transfer_count = 1250
block_max_transfer_count = 650
# The maximum number of approvals permitted in a single block.
block_max_approval_count = 2600
# The upper limit of total gas of all deploys in a block.
block_gas_limit = 10_000_000_000_000
block_gas_limit = 4_000_000_000_000
# The limit of length of serialized payment code arguments.
payment_args_max_length = 1024
# The limit of length of serialized session code arguments.
Expand Down Expand Up @@ -165,17 +198,17 @@ loop = 440
if = 440
else = 440
end = 440
br = 440_000
br_if = 440_000
br = 35_000
br_if = 35_000
return = 440
select = 440
call = 140_000
call_indirect = 140_000
call = 68_000
call_indirect = 68_000
drop = 440

[wasm.opcode_costs.control_flow.br_table]
# Fixed cost per `br_table` opcode
cost = 440_000
cost = 35_000
# Size of target labels in the `br_table` opcode will be multiplied by `size_multiplier`
size_multiplier = 100

Expand Down Expand Up @@ -224,6 +257,7 @@ 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] }
write_local = { cost = 9_500, arguments = [0, 1_800, 0, 520] }
enable_contract_version = { cost = 200, arguments = [0, 0, 0, 0] }

[system_costs]
wasmless_transfer_cost = 100_000_000
Expand Down
45 changes: 38 additions & 7 deletions config/config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
# If set, use this hash as a trust anchor when joining an existing network.
#trusted_hash = 'HEX-FORMATTED BLOCK HASH'

# Whether to synchronize all data back to genesis, or just [deploys.max_ttl] (chainspec setting) worth of data.
sync_to_genesis = true
# Historical sync behavior for this node. Options are:
# 'genesis' (node will attempt to acquire all block data back to genesis)
# 'ttl' (node will attempt to acquire all block data to comply with time to live enforcement)
# 'nosync' (node will only acquire blocks moving forward)
# note: ttl is a chainsepc configured behavior on a given network; consult the `max_ttl` chainspec setting
# (it is currently ~18 hours by default on production and production-like networks but subject to change).
# note: `nosync` is incompatible with validator behavior; a nosync node is prevented from participating
# in consensus / switching to validate mode. it is primarily for lightweight nodes that are
# only interested in recent activity.
sync_handling = 'ttl'

# Idle time after which the syncing process is considered stalled.
idle_tolerance = '20 minutes'
Expand Down Expand Up @@ -168,7 +176,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.225.191.9:35000','3.221.194.62:35000','54.151.24.120: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','168.119.209.31: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','20.51.219.57:35000','162.19.171.49:35000','185.132.178.196:35000','65.108.69.41:35000','135.181.76.244: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','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']

# Minimum number of fully-connected peers to consider network component initialized.
min_peers_for_initialization = 3
Expand Down Expand Up @@ -244,15 +252,38 @@ blocklist_retain_duration = '10 minutes'
# Any weight set to 0 means that the category of traffic is exempt from throttling.
[network.estimator_weights]
consensus = 0
gossip = 0
finality_signatures = 0
block_gossip = 1
deploy_gossip = 0
finality_signature_gossip = 1
address_gossip = 0
finality_signature_broadcasts = 0
deploy_requests = 1
deploy_responses = 1
deploy_responses = 0
legacy_deploy_requests = 1
legacy_deploy_responses = 0
block_requests = 1
block_responses = 0
block_header_requests = 1
block_header_responses = 0
trie_requests = 1
trie_responses = 0
finality_signature_requests = 1
finality_signature_responses = 0
sync_leap_requests = 1
sync_leap_responses = 0
approvals_hashes_requests = 1
approvals_hashes_responses = 0
execution_results_requests = 1
execution_results_responses = 0

# Identity of a node
#
# When this section is not specified, an identity will be generated when the node process starts with a self-signed certifcate.
# This option makes sense for some private chains where for security reasons joining new nodes is restricted.
# [network.identity]
# tls_certificate = "local_node_cert.pem"
# secret_key = "local_node.pem"
# ca_certificate = "ca_cert.pem"

# ==================================================
# Configuration options for the JSON-RPC HTTP server
Expand All @@ -272,7 +303,7 @@ address = '0.0.0.0:7777'

# The global max rate of requests (per second) before they are limited.
# Request will be delayed to the next 1 second bucket once limited.
qps_limit = 100
qps_limit = 50

# Maximum number of bytes to accept in a single request body.
max_body_bytes = 2_621_440
Expand Down
4 changes: 2 additions & 2 deletions protocol_versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1_5_2
1_5_3
1_5_3
1_5_5
14 changes: 7 additions & 7 deletions stage_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

# This script will stage the upgrade files for casper network from 1.5.2 to 1.5.3
# This script will stage the upgrade files for casper network from 1.5.3 to 1.5.5

if [ "$(whoami)" != "root" ]; then
echo
Expand All @@ -12,8 +12,8 @@ if [ "$(whoami)" != "root" ]; then
exit 1
fi

if [[ -d "/etc/casper/1_5_3" ]]; then
echo "Upgrade 1.5.3 already staged."
if [[ -d "/etc/casper/1_5_5" ]]; then
echo "Upgrade 1.5.5 already staged."
exit 0
fi

Expand All @@ -28,14 +28,14 @@ if [[ ${CNL_VERSION:0:1} == "1" ]]; then
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_3 casper
sudo -u casper /etc/casper/pull_casper_node_version.sh 1_5_5 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_3
sudo -u casper /etc/casper/pull_casper_node_version.sh casper.conf 1_5_5
fi
sudo -u casper /etc/casper/config_from_example.sh 1_5_3
sudo -u casper /etc/casper/config_from_example.sh 1_5_5
fi
echo "Upgrade 1_5_3 staged."
echo "Upgrade 1_5_5 staged."


exit 0

0 comments on commit ce44369

Please sign in to comment.