Skip to content

Commit

Permalink
Merge pull request #62 from bradjohnl/dev-net-2.0.0rc3
Browse files Browse the repository at this point in the history
Dev net 2.0.0rc3
  • Loading branch information
sacherjj authored Jun 20, 2024
2 parents aaef76b + 6056de4 commit fd32713
Show file tree
Hide file tree
Showing 4 changed files with 81 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 @@
2.0.0-79d58654935c17ed9825f2fe8981759cbebb260c
2.0.0-2f0501cea5b9b064c7dd050c1762961d8808772c
4 changes: 2 additions & 2 deletions config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ 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)

## 2.0.0 - '2024-04-13T03:40:00Z'
## casper-node 2.0.0 79d58654935c17ed9825f2fe8981759cbebb260c (RC1)
## 2.0.0 - '2024-06-20T16:30:00Z'
## casper-node 2.0.0 2f0501cea5b9b064c7dd050c1762961d8808772c (RC3)

### Added
* Genesis accounts.toml, chainspec.toml, config-example.toml
89 changes: 63 additions & 26 deletions config/chainspec.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '2024-04-13T03:40:00Z'
activation_point = '2024-06-20T16:30:00Z'

[network]
# Human readable name for convenience; the genesis_hash is the true identifier. The name influences the genesis hash by
Expand Down Expand Up @@ -44,6 +44,17 @@ start_protocol_version_with_strict_finality_signatures_required = '1.5.0'
# in a protocol version before
# `start_protocol_version_with_strict_finality_signatures_required`.
legacy_required_finality = 'Strict'

# If true, the protocol upgrade will migrate ALL userland accounts to addressable entity.
# If false, userland accounts will instead be left as is and will be lazily migrated
# on a per-account basis if / when that account is used during transaction execution.
migrate_legacy_accounts = false

# If true, the protocol upgrade will migrate ALL userland contracts to addressable entity.
# If false, userland contracts will instead be left as is and will be lazily migrated
# on a per-contract basis if / when that contract is used during transaction execution.
migrate_legacy_contracts = false

# Number of eras before an auction actually defines the set of validators. If you bond with a sufficient bid in era N,
# you will be a validator in era N + auction_delay + 1.
auction_delay = 1
Expand All @@ -70,6 +81,8 @@ max_associated_keys = 100
max_runtime_call_stack_height = 12
# Minimum allowed delegation amount in motes
minimum_delegation_amount = 500_000_000_000
# Maximum allowed delegation amount in motes
maximum_delegation_amount = 1_000_000_000_000_000_000
# Global state prune batch size (0 = this feature is off)
prune_batch_size = 0
# Enables strict arguments checking when calling a contract; i.e. that all non-optional args are provided and of the correct `CLType`.
Expand Down Expand Up @@ -116,7 +129,9 @@ refund_handling = { type = 'no_refund' }
# administrator accounts
# 'burn': fees are burned
fee_handling = { type = 'no_fee' }
# Defines how fees are handled.
# If a validator would recieve a validator credit, it cannot exceed this percentage of their total stake.
validator_credit_cap = [1, 5]
# Defines how pricing is handled.
#
# Valid options are:
# 'classic': senders of transaction self-specify how much they pay.
Expand All @@ -127,46 +142,68 @@ pricing_handling = { type = 'fixed' }
# execution? Currently not supported.
#
allow_reservations = false
# How long does it take for a balance hold to fade away?
balance_hold_interval = '24 hours'
# Defines how gas holds affect available balance calculations.
#
# Valid options are:
# 'accrued': sum of full value of all non-expired holds.
# 'amortized': sum of each hold is amortized over the time remaining until expiry.
#
# For instance, if 12 hours remained on a gas hold with a 24-hour `gas_hold_interval`,
# with accrued, the full hold amount would be applied
# with amortized, half the hold amount would be applied
gas_hold_balance_handling = { type = 'accrued' }
# Defines how long gas holds last.
#
# If fee_handling is set to 'no_fee', the system places a balance hold on the payer
# equal to the value the fee would have been. Such balance holds expire after a time
# interval has elapsed. This setting controls how long that interval is. The available
# balance of a purse equals its total balance minus the held amount(s) of non-expired
# holds (see gas_hold_balance_handling setting for details of how that is calculated).
#
# For instance, if gas_hold_interval is 24 hours and 100 gas is used from a purse,
# a hold for 100 is placed on that purse and is considered when calculating total balance
# for 24 hours starting from the block_time when the hold was placed.
gas_hold_interval = '24 hours'
# 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 = '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]

[transactions]
# The duration after the transaction timestamp that it can be included in a block.
max_ttl = '2 hours'
# Maximum transaction size in bytes. Size is of the transaction when serialized via ToBytes.
max_transaction_size = 1_048_576
# Maximum number of mint transactions (i.e. transfers) allowed in a block.
block_max_mint_count = 650
# Maximum number of auction (staking) transactions allowed in a block.
block_max_auction_count = 100
# Maximum number of installer/upgrader transactions allowed in a block.
block_max_install_upgrade_count = 2
# Maximum number of other transactions (non-transfer, non-staking, non-installer/upgrader) allowed in a block.
block_max_standard_count = 25
# The maximum number of approvals permitted in a single block.
block_max_approval_count = 2600
# Maximum block size in bytes including transactions contained by the block. 0 means unlimited.
max_block_size = 5_242_880
# The upper limit of total gas of all transactions in a block.
block_gas_limit = 4_000_000_000_000
block_gas_limit = 3_000_000_000_000
# The minimum amount in motes for a valid native transfer.
native_transfer_minimum_motes = 2_500_000_000
# The maximum value to which `transaction_acceptor.timestamp_leeway` can be set in the config.toml file.
max_timestamp_leeway = '5 seconds'

[transactions.v1]
# The configuration settings for the lanes of transactions including both native and Wasm based interactions.
# Currently the node supports two native interactions the mint and auction and have the reserved identifiers of 0 and 1
# repsectively
# The remaining wasm based lanes specify the range of configuration settings for a given Wasm based transaction
# within a given lane.
# The maximum length in bytes of runtime args per V1 transaction.
max_args_length = 1024
# [0] -> Transaction lane label (apart from the reserved native identifiers these are simply labels)
# Note: For the given mainnet implementation we specially reserve the label 2 for install and upgrades and
# the lane must be present and defined.
# Different casper networks may not impose such a restriction.
# [1] -> Max transaction size in bytes for a given transaction in a certain lane
# [2] -> Max args length size in bytes for a given transaction in a certain lane
# [3] -> Transaction gas limit size in bytes for a given transaction in a certain lane
# [4] -> The maximum number of transactions the lane can contain
native_mint_lane = [0, 1024, 1024, 65_000_000_000, 650]
native_auction_lane = [1, 2048, 2048, 362_500_000_000, 145]
wasm_lanes = [[2, 1_048_576, 2048, 1_000_000_000_000, 2], [3, 262_144, 1024, 100_000_000_000, 3], [4, 131_072, 1024, 50_000_000_000, 5], [5, 8_192, 512, 1_500_000_000, 15]]

[transactions.deploy]
# The maximum number of Motes allowed to be spent during payment. 0 means unlimited.
Expand Down Expand Up @@ -245,7 +282,7 @@ size_multiplier = 100
[wasm.host_function_costs]
add = { cost = 5_800, arguments = [0, 0, 0, 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, 0] }
add_contract_version = { cost = 200, arguments = [0, 0, 0, 0, 120_000, 0, 0, 0, 30_000, 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] }
Expand All @@ -272,7 +309,7 @@ provision_contract_user_group_uref = { cost = 200, arguments = [0, 0, 0, 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 = 60_000, arguments = [0, 120_000, 0] }
read_value_local = { cost = 5_500, arguments = [0, 590, 0] }
dictionary_get = { 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, 120_000] }
Expand All @@ -285,10 +322,10 @@ transfer_from_purse_to_purse = { cost = 82_000_000, arguments = [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] }
write_local = { cost = 9_500, arguments = [0, 1_800, 0, 520] }
dictionary_put = { cost = 9_500, arguments = [0, 1_800, 0, 520] }
enable_contract_version = { cost = 200, arguments = [0, 0, 0, 0] }
manage_message_topic = { cost = 200, arguments = [0, 0, 0, 0] }
emit_message = { cost = 200, arguments = [0, 0, 0, 0] }
manage_message_topic = { cost = 200, arguments = [0, 30_000, 0, 0] }
emit_message = { cost = 200, arguments = [0, 30_000, 0, 120_000] }
cost_increase_per_message = 50

[wasm.messages_limits]
Expand All @@ -297,8 +334,6 @@ max_topics_per_contract = 128
max_message_size = 1_024

[system_costs]
install_upgrade_gas_limit = 3_500_000_000_000
standard_transaction_gas_limit = 500_000_000_000

[system_costs.auction_costs]
get_era_validators = 10_000
Expand All @@ -315,12 +350,14 @@ withdraw_validator_reward = 10_000
read_era_id = 10_000
activate_bid = 10_000
redelegate = 2_500_000_000
change_bid_public_key = 5_000_000_000

[system_costs.mint_costs]
mint = 2_500_000_000
reduce_total_supply = 10_000
create = 2_500_000_000
balance = 10_000
burn = 10_000
transfer = 100_000_000
read_base_round_reward = 10_000
mint_into_existing_purse = 2_500_000_000
Expand Down
22 changes: 15 additions & 7 deletions config/config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,19 @@ force_resync = false
shutdown_for_upgrade_timeout = '2 minutes'

# Maximum time a node will wait for an upgrade to commit.
upgrade_timeout = '30 seconds'

upgrade_timeout = '3 hours'

# 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
Expand Down Expand Up @@ -306,11 +317,8 @@ allow_request_get_trie = false
# Flag that enables the `TrySpeculativeExec` request. Disabled by default.
allow_request_speculative_exec = false

# Maximum size of a request in bytes.
max_request_size_bytes = 4_194_304

# Maximum size of a response in bytes.
max_response_size_bytes = 4_194_304
# Maximum size of a message in bytes.
max_message_size_bytes = 4_194_304

# Maximum number of in-flight requests per client.
client_request_limit = 3
Expand Down

0 comments on commit fd32713

Please sign in to comment.