Skip to content

Instantly share code, notes, and snippets.

@smondet
Last active June 11, 2020 21:50
Show Gist options
  • Save smondet/8b32b56cb4720d95347903ccc6604092 to your computer and use it in GitHub Desktop.
Save smondet/8b32b56cb4720d95347903ccc6604092 to your computer and use it in GitHub Desktop.
Protocol parameter flavors

PC0

a.k.a. “Private Chain 0” → parameters-carthage-pc0.json

It's compatible with the tutobox, and can use the --override-protocol-parameters options:

docker run --rm --name my-sandbox --detach -p 20000:20000 \
       -v $PWD:/pwd/ \
       registry.gitlab.com/tezos/flextesa:image-tutobox-run carthagebox start \
       --override-protocol-parameters /pwd/parameters-carthage-pc0.json

Verify it worked:

 $ tezos-client rpc get /chains/main/blocks/head/context/constants
{ "proof_of_work_nonce_size": 8, "nonce_length": 32,
  "max_revelations_per_block": 32, "max_operation_data_length": 16384,
  "max_proposals_per_delegate": 20, "preserved_cycles": 2,
  "blocks_per_cycle": 8, "blocks_per_commitment": 4,
  "blocks_per_roll_snapshot": 4, "blocks_per_voting_period": 16,
  "time_between_blocks": [ "10" ], "endorsers_per_block": 32,
  "hard_gas_limit_per_operation": "2040000",
  "hard_gas_limit_per_block": "20400000", "proof_of_work_threshold": "-1",
  "tokens_per_roll": "100000000", "michelson_maximum_type_size": 5000,
  "seed_nonce_revelation_tip": "125000", "origination_size": 257,
  "block_security_deposit": "1000000",
  "endorsement_security_deposit": "100000",
  "baking_reward_per_endorsement": [ "1250000", "187500" ],
  "endorsement_reward": [ "1250000", "833333" ], "cost_per_byte": "1000",
  "hard_storage_limit_per_operation": "120000",
  "test_chain_duration": "1966080", "quorum_min": 3000, "quorum_max": 7000,
  "min_proposal_quorum": 500, "initial_endorsers": 1,
  "delay_per_missing_endorsement": "1" }

Tweaked constants:

  • Time between blocks: 10s.
  • Double both gas limits.
  • Double storage limit per operation.
  • 10 000 ꜩ / roll.
    • For counting with round numbers, “10 grand = 1 roll” ☺.
    • Smaller rolls Vs initial balances make protocol activation a bit more CPU/disk intensive (roll distribution).
  • michelson maximum type size × 5
  • Tiny security deposits 1 ꜩ/block, 0.1 ꜩ/endorsement
  • Staking; preserved-cycles + blocks-per-cycle are tiny (sandbox levels), so a new registered baker gets baking rights within minutes (about 7 in my one experiment).
{
"bootstrap_accounts": [
[
"edpkvGfYw3LyB1UcCahKQk4rF2tvbMUk8GFiTuMjL75uGXrpvKXhjn",
"2000000000000"
],
[
"edpkurPsQ8eUApnLUJ9ZPDvu98E8VNj4KtJa1aZr16Cr5ow5VHKnz4",
"2000000000000"
],
[
"edpkuTpUWcNgn4QYcBVGDLy6rmpJ3WSTSV2bdiJFwyoDk5fSwxyV5k",
"4000000000000"
],
[
"edpkuQWv1k5V4CpcVzP77tq6XPimiPkXkg2gTF6byWAE8wYkdMdUbf",
"10000000"
]
],
"time_between_blocks": [
"10"
],
"blocks_per_roll_snapshot": 4,
"blocks_per_voting_period": 16,
"blocks_per_cycle": 8,
"preserved_cycles": 2,
"proof_of_work_threshold": "-1",
"blocks_per_commitment": 4,
"endorsers_per_block": 32,
"hard_gas_limit_per_operation": "2040000",
"hard_gas_limit_per_block": "20400000",
"tokens_per_roll": "10000000000",
"michelson_maximum_type_size": 5000,
"seed_nonce_revelation_tip": "125000",
"origination_size": 257,
"block_security_deposit": "1000000",
"endorsement_security_deposit": "100000",
"baking_reward_per_endorsement": [
"1250000",
"187500"
],
"endorsement_reward": [
"1250000",
"833333"
],
"hard_storage_limit_per_operation": "120000",
"cost_per_byte": "1000",
"test_chain_duration": "1966080",
"quorum_min": 3000,
"quorum_max": 7000,
"min_proposal_quorum": 500,
"initial_endorsers": 1,
"delay_per_missing_endorsement": "1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment