Testnet experiments: script for generating protocol activation parameters
Context
This scripts allows to generate the protocol activation parameters, using Protocol Alpha or
Protocol Nairobi mainnet parameters as a base template, and replacing the set of bootstrap
accounts with the accounts aliased as baker_* in the wallet of the client_dir specified in input.
Manually testing the MR
dune build devtools/testnet_experiment_tools
BAKERS=10 OUTPUT_DIR=<output-dir> dune exec devtools/testnet_experiment_tools/testnet_experiment_tools.exe -- generate_baker_accounts
OUTPUT_DIR=<output-dir> dune exec devtools/testnet_experiment_tools/testnet_experiment_tools.exe -- generate_activation_parameters
The output will look like this:
cat <output-dir>/network_parameters.json
{
"bootstrap_accounts": [
[
"edpkthV44BeWauiyEeWRKWNgWaBfLAJmQi3SeeMN8hC6na4bBhg5N5",
"4000000000000"
],
[
"edpkv1FyYtFwX55mNvDSgmrqxRaptVABkywJrJYF2m5kpiQZtCpN7x",
"4000000000000"
],
[
"edpkuvarLxTvbvSJNtTaXbBVzeTKpeBhwCBAQMovd9c7ZTVHBJuavE",
"4000000000000"
],
[
"edpktmJt3ogv8zAUBEJsHE54z2U9gG3naZWn7vAVyLSqiHFct7ME9Q",
"4000000000000"
],
[
"edpkvM2cjhrJCP2b4KRfFAvtPjvY4BnLKjrTtXM7P1c8JNCx4aKDAe",
"4000000000000"
],
[
"edpktw6YjTGxcAEFvmDeBeXEV6bCwksP9kRt8Br9yrTvUEN8h3okcF",
"4000000000000"
],
[
"edpkvZuWgFDTAu4ummrpJDPUgnpTmxpEfue4tG1eWrMUsymNTsSTsT",
"4000000000000"
],
[
"edpktqise1DzNerhWdBYAsSHg1xhxax3YPqpXXFx7jzgCfPeRgqJVu",
"4000000000000"
],
[
"edpktspzW75iRqd5VUk4AgXCzopcvL7wvQuutzdfM55JByfwFRGaFb",
"4000000000000"
],
[
"edpktzdKec8ZeQdDip3owg8VNeCGYqQuBnqJtzKTbG8h4aiL2kYk2U",
"4000000000000"
]
],
"preserved_cycles": 5,
"blocks_per_cycle": 16384,
"blocks_per_commitment": 128,
"nonce_revelation_threshold": 512,
"blocks_per_stake_snapshot": 1024,
"cycles_per_voting_period": 5,
"hard_gas_limit_per_operation": "1040000",
"hard_gas_limit_per_block": "2600000",
"proof_of_work_threshold": "281474976710655",
"minimal_stake": "6000000000",
"vdf_difficulty": "8000000000",
"seed_nonce_revelation_tip": "125000",
"origination_size": 257,
"baking_reward_fixed_portion": "5000000",
"baking_reward_bonus_per_slot": "2143",
"endorsing_reward_per_slot": "1428",
"cost_per_byte": "250",
"hard_storage_limit_per_operation": "60000",
"quorum_min": 2000,
"quorum_max": 7000,
"min_proposal_quorum": 500,
"liquidity_baking_subsidy": "1250000",
"liquidity_baking_toggle_ema_threshold": 1000000000,
"max_operations_time_to_live": 240,
"minimal_block_delay": "15",
"delay_increment_per_round": "8",
"consensus_committee_size": 7000,
"consensus_threshold": 4667,
"minimal_participation_ratio": {
"numerator": 2,
"denominator": 3
},
"max_slashing_period": 2,
"frozen_deposits_percentage": 10,
"double_baking_punishment": "640000000",
"ratio_of_frozen_deposits_slashed_per_double_endorsement": {
"numerator": 1,
"denominator": 2
},
"cache_script_size": 100000000,
"cache_stake_distribution_cycles": 8,
"cache_sampler_state_cycles": 8,
"tx_rollup_enable": false,
"tx_rollup_origination_size": 4000,
"tx_rollup_hard_size_limit_per_inbox": 500000,
"tx_rollup_hard_size_limit_per_message": 5000,
"tx_rollup_max_withdrawals_per_batch": 15,
"tx_rollup_commitment_bond": "10000000000",
"tx_rollup_finality_period": 40000,
"tx_rollup_withdraw_period": 40000,
"tx_rollup_max_inboxes_count": 40100,
"tx_rollup_max_messages_per_inbox": 1010,
"tx_rollup_max_commitments_count": 80100,
"tx_rollup_cost_per_byte_ema_factor": 120,
"tx_rollup_max_ticket_payload_size": 2048,
"tx_rollup_rejection_max_proof_size": 30000,
"tx_rollup_sunset_level": 3473409,
"dal_parametric": {
"feature_enable": false,
"number_of_slots": 256,
"attestation_lag": 1,
"attestation_threshold": 50,
"blocks_per_epoch": 32,
"redundancy_factor": 16,
"page_size": 4096,
"slot_size": 1048576,
"number_of_shards": 2048
},
"smart_rollup_enable": true,
"smart_rollup_arith_pvm_enable": false,
"smart_rollup_origination_size": 6314,
"smart_rollup_challenge_window_in_blocks": 80640,
"smart_rollup_stake_amount": "10000000000",
"smart_rollup_commitment_period_in_blocks": 60,
"smart_rollup_max_lookahead_in_blocks": 172800,
"smart_rollup_max_active_outbox_levels": 80640,
"smart_rollup_max_outbox_messages_per_level": 100,
"smart_rollup_number_of_sections_in_dissection": 32,
"smart_rollup_timeout_period_in_blocks": 40320,
"smart_rollup_max_number_of_cemented_commitments": 5,
"smart_rollup_max_number_of_parallel_games": 32,
"zk_rollup_enable": false,
"zk_rollup_origination_size": 4000,
"zk_rollup_min_pending_to_process": 10
}
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Gabriel Moise