VladimirMezin
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # PRYSM for ETH-1 ## ETH-1 node ### Generate account requiring for: - allocate initial founds - miner - single consensus validator - contract deploying ````shell ./geth account new INFO [04-29|14:58:07.672] Maximum peer count ETH=50 LES=0 total=50 INFO [04-29|14:58:07.672] Smartcard socket not found, disabling err="stat /run/pcscd/pcscd.comm: no such file or directory" Your new account is locked with a password. Please give a password. Do not forget this password. Password: Repeat password: Your new key was generated Public address of the key: a7e558cc6efa1c41270ef4aa227b3dd6b4a3951e Path of the secret key file: /home/mezin/.ethereum/keystore/UTC--2022-04-29T11-58-10.119145930Z--a7e558cc6efa1c41270ef4aa227b3dd6b4a3951e - You can share your public address with anyone. Others need it to interact with you. - You must NEVER share the secret key with anyone! The key controls access to your funds! - You must BACKUP your key file! Without the key, it's impossible to access account funds! - You must REMEMBER your password! Without the password, it's impossible to decrypt the key! ```` ### Prepare `genesis.json` ````json { "config": { "chainId": 333777333, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, "constantinopleBlock": 0, "petersburgBlock": 0, "istanbulBlock": 0, "muirGlacierBlock": 0, "berlinBlock": 0, "londonBlock": 0, "clique": { "period": 10, "epoch": 300000000 } }, "difficulty": "1", "gasLimit": "105000000", "extradata": "0x0000000000000000000000000000000000000000000000000000000000000000a7e558cc6efa1c41270ef4aa227b3dd6b4a3951e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "alloc": { "a7e558cc6efa1c41270ef4aa227b3dd6b4a3951e": { "balance": "1000000000000000000000000000000000000" } } } ```` ### Init DB ```` ./geth init --datadir=.data/node-1 .data/genesis.json ```` ### Start ETH-1 node Start node with console mode to following contract deploy ```` ./geth \ --mine \ --datadir=.data/node-1 \ --networkid=333777333 \ --verbosity=3 \ --nodiscover \ --unlock=0xa7e558cc6efa1c41270ef4aa227b3dd6b4a3951e \ --miner.etherbase=0xa7e558cc6efa1c41270ef4aa227b3dd6b4a3951e \ --password=.data/node-1/password.txt \ --syncmode=full \ --allow-insecure-unlock \ --http \ --http.addr=127.0.0.1 \ --http.port=9545 \ --http.api="admin,debug,web3,eth,txpool,personal,clique,miner,net" \ --http.corsdomain "*" \ --ws \ --ws.port=9546 \ --ws.addr="127.0.0.1" \ --ws.origins "*" \ --ws.api "admin,debug,web3,eth,txpool,personal,clique,miner,net" \ console ```` ### Deploy contract `solidity_deposit_contract` https://github.com/ethereum/consensus-specs/blob/master/solidity_deposit_contract/deposit_contract.json value of proprty of __"bytecode"__ contains the bytecode of the contract 1. Open ETH-1 node console ````shell ./geth attach .data/node-1/geth.ipc ```` 2. Deploy contract by send transaction 3. Retrieve: + contract address + hash of contract block + number of contract block ```` > eth.sendTransaction({from: eth.coinbase,to: null, "data": "0x608060405234801561001057600080fd5b5060005b601f8110156101025760026021826020811061002c57fe5b01546021836020811061003b57fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b602083106100925780518252601f199092019160209182019101610073565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa1580156100d1573d6000803e3d6000fd5b5050506040513d60208110156100e657600080fd5b5051602160018301602081106100f857fe5b0155600101610014565b506118d680620001136000396000f3fe60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100a4578063621fd130146101ba578063c5f2892f14610244575b600080fd5b34801561005057600080fd5b506100906004803603602081101561006757600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661026b565b604080519115158252519081900360200190f35b6101b8600480360360808110156100ba57600080fd5b8101906020810181356401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91939092909160208101903564010000000081111561012757600080fd5b82018360208201111561013957600080fd5b8035906020019184600183028401116401000000008311171561015b57600080fd5b91939092909160208101903564010000000081111561017957600080fd5b82018360208201111561018b57600080fd5b803590602001918460018302840111640100000000831117156101ad57600080fd5b919350915035610304565b005b3480156101c657600080fd5b506101cf6110b5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102095781810151838201526020016101f1565b50505050905090810190601f1680156102365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561025057600080fd5b506102596110c7565b60408051918252519081900360200190f35b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a70000000000000000000000000000000000000000000000000000000014806102fe57507fffffffff0000000000000000000000000000000000000000000000000000000082167f8564090700000000000000000000000000000000000000000000000000000000145b92915050565b6030861461035d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118056026913960400191505060405180910390fd5b602084146103b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061179c6036913960400191505060405180910390fd5b6060821461040f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806118786029913960400191505060405180910390fd5b670de0b6b3a7640000341015610470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118526026913960400191505060405180910390fd5b633b9aca003406156104cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806117d26033913960400191505060405180910390fd5b633b9aca00340467ffffffffffffffff811115610535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061182b6027913960400191505060405180910390fd5b6060610540826114ba565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a6105756020546114ba565b6040805160a0808252810189905290819060208201908201606083016080840160c085018e8e80828437600083820152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690910187810386528c815260200190508c8c808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690920188810386528c5181528c51602091820193918e019250908190849084905b83811015610648578181015183820152602001610630565b50505050905090810190601f1680156106755780820380516001836020036101000a031916815260200191505b5086810383528881526020018989808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169092018881038452895181528951602091820193918b019250908190849084905b838110156106ef5781810151838201526020016106d7565b50505050905090810190601f16801561071c5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b604051602001808484808284377fffffffffffffffffffffffffffffffff0000000000000000000000000000000090941691909301908152604080517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0818403018152601090920190819052815191955093508392506020850191508083835b602083106107fc57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107bf565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610859573d6000803e3d6000fd5b5050506040513d602081101561086e57600080fd5b5051905060006002806108846040848a8c6116fe565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108f857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016108bb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610955573d6000803e3d6000fd5b5050506040513d602081101561096a57600080fd5b5051600261097b896040818d6116fe565b60405160009060200180848480828437919091019283525050604080518083038152602092830191829052805190945090925082918401908083835b602083106109f457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016109b7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610a51573d6000803e3d6000fd5b5050506040513d6020811015610a6657600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610ada57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610a9d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610b37573d6000803e3d6000fd5b5050506040513d6020811015610b4c57600080fd5b50516040805160208101858152929350600092600292839287928f928f92018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610bd957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b9c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610c36573d6000803e3d6000fd5b5050506040513d6020811015610c4b57600080fd5b50516040518651600291889160009188916020918201918291908601908083835b60208310610ca957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610c6c565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610d4e57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610d11565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610dab573d6000803e3d6000fd5b5050506040513d6020811015610dc057600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610e3457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610df7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610e91573d6000803e3d6000fd5b5050506040513d6020811015610ea657600080fd5b50519050858114610f02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260548152602001806117486054913960600191505060405180910390fd5b60205463ffffffff11610f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806117276021913960400191505060405180910390fd5b602080546001019081905560005b60208110156110a9578160011660011415610fa0578260008260208110610f9157fe5b0155506110ac95505050505050565b600260008260208110610faf57fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061102557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610fe8565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015611082573d6000803e3d6000fd5b5050506040513d602081101561109757600080fd5b50519250600282049150600101610f6e565b50fe5b50505050505050565b60606110c26020546114ba565b905090565b6020546000908190815b60208110156112f05781600116600114156111e6576002600082602081106110f557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061116b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161112e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156111c8573d6000803e3d6000fd5b5050506040513d60208110156111dd57600080fd5b505192506112e2565b600283602183602081106111f657fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061126b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161122e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156112c8573d6000803e3d6000fd5b5050506040513d60208110156112dd57600080fd5b505192505b6002820491506001016110d1565b506002826112ff6020546114ba565b600060401b6040516020018084815260200183805190602001908083835b6020831061135a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161131d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790527fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000095909516920191825250604080518083037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8018152601890920190819052815191955093508392850191508083835b6020831061143f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611402565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa15801561149c573d6000803e3d6000fd5b5050506040513d60208110156114b157600080fd5b50519250505090565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b826000815181106114f457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b8260018151811061153757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b8260028151811061157a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106115bd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b8260048151811061160057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b8260058151811061164357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061168657fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106116c957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b6000808585111561170d578182fd5b83861115611719578182fd5b505082019391909203915056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220dceca8706b29e917dacf25fceef95acac8d90d765ac926663ce4096195952b6164736f6c634300060b0033"}); 0x3672255035dcb5fc0e5e54e00a5c9996598ffabdb9f26ae278df3059d6833e32 > eth.getTransactionReceipt("0x3672255035dcb5fc0e5e54e00a5c9996598ffabdb9f26ae278df3059d6833e32") { blockHash: "0x0e1e49205fa68cdf97da444eb80a18851a171bfd34d7fb5f3bebaa8110b05c7e", blockNumber: 8, contractAddress: "0xf30097f8c858c1f6b0c6efe72240319efa65b825", cumulativeGasUsed: 2146480, effectiveGasPrice: 1343608917, from: "0xa7e558cc6efa1c41270ef4aa227b3dd6b4a3951e", gasUsed: 2146480, logs: [], status: "0x1", to: null, transactionHash: "0x3672255035dcb5fc0e5e54e00a5c9996598ffabdb9f26ae278df3059d6833e32", transactionIndex: 0, type: "0x2" } ```` ## Create validators' keys using the utility https://github.com/ethereum/eth2.0-deposit-cli (https://github.com/ethereum/staking-deposit-cli/releases) ### Get `eth2.0-deposit-cli` ````shell wget https://github.com/ethereum/eth2.0-deposit-cli/releases/download/v1.2.0/eth2deposit-cli-256ea21-linux-amd64.tar.gz tar -xvf eth2deposit-cli-256ea21-linux-amd64.tar.gz cd eth2deposit-cli-256ea21-linux-amd64/ ```` ### Generate keys ````shell ./deposit new-mnemonic --num_validators 16384 # [Enter] to accept defaults settings # Enter and confirm password Type the password that secures your validator keystore(s): !QAZ2wsx3edc # copy and save mnemonic string This is your seed phrase. Write it down and store it safely, it is the ONLY way to retrieve your deposit. rib funny more chair bring quick stick point farm arm universe tooth fancy illness vault state unable match melt kid either cereal stable word Press any key when you have written down your mnemonic. # paste to console mnemonic string and gen keys Please type your mnemonic (separated by spaces) to confirm you have written it down : rib funny more chair bring quick stick point farm arm universe tooth fancy illness vault state unable match melt kid either cereal stable word # Wait, wait, wait ... Zzz ... (took over 16 hours) ##### ##### ## ##### ## ### ## ####### ######################### ## ## ##### ## ## ## ##### ## ## ## ## ## ### ######## ## #### ## ## ### ##### ##### # ## # ##### # # # ##### ## ## ## ## ## ## ## ### ## ## ############### ## ## ### ## ## ############################# ## ## ### ####### ################# ### ## ## ## ## ## ### ############## ############# Creating your keys. Creating your keys: [####################################] 16384/16384 Creating your keystores: [####################################] 16384/16384 Creating your depositdata: [####################################] 16384/16384 Verifying your keystores: [####################################] 16384/16384 Verifying your deposits: [####################################] 16384/16384 Success! Your keys can be found at: /home/mezin/work/tmp/eth2deposit-cli-256ea21-linux-amd64/validator_keys Press any key. ```` ## Generate beacon genesis using the utility `eth2-testnet-genesis` https://github.com/protolambda/eth2-testnet-genesis#eth2-testnet-genesis ### Build the utility `eth2-testnet-genesis` ````shell clone https://github.com/protolambda/eth2-testnet-genesis.git cd eth2-testnet-genesis go build ```` ### Prepare configs files #### `mnemonics.yaml` ````yaml - mnemonic: "rib funny more chair bring quick stick point farm arm universe tooth fancy illness vault state unable match melt kid either cereal stable word" count: 64 ```` #### `mainnet.yaml` ````yaml # Mainnet config # Extends the mainnet preset PRESET_BASE: 'mainnet' # Free-form short name of the network that this configuration applies to - known # canonical network names include: # * 'mainnet' - there can be only one # * 'prater' - testnet # Must match the regex: [a-z0-9\-] CONFIG_NAME: 'mainnet' # Transition # --------------------------------------------------------------- # TBD, 2**256-2**10 is a placeholder TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129638912 # By default, don't use these params TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000 TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615 # Genesis # --------------------------------------------------------------- # `2**14` (= 16,384) MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384 # Dec 1, 2020, 12pm UTC MIN_GENESIS_TIME: 1606824000 # Mainnet initial fork version, recommend altering for testnets #GENESIS_FORK_VERSION: 0x00000000 GENESIS_FORK_VERSION: 0x00002009 # 604800 seconds (7 days) #GENESIS_DELAY: 604800 GENESIS_DELAY: 300 # Forking # --------------------------------------------------------------- # Some forks are disabled for now: # - These may be re-assigned to another fork-version later # - Temporarily set to max uint64 value: 2**64 - 1 # Altair ALTAIR_FORK_VERSION: 0x01000000 #ALTAIR_FORK_EPOCH: 74240 # Oct 27, 2021, 10:56:23am UTC ALTAIR_FORK_EPOCH: 30 # Bellatrix BELLATRIX_FORK_VERSION: 0x02000000 BELLATRIX_FORK_EPOCH: 18446744073709551615 # Capella CAPELLA_FORK_VERSION: 0x03000000 CAPELLA_FORK_EPOCH: 18446744073709551615 # Sharding SHARDING_FORK_VERSION: 0x04000000 SHARDING_FORK_EPOCH: 18446744073709551615 # Time parameters # --------------------------------------------------------------- # 12 seconds SECONDS_PER_SLOT: 12 #SECONDS_PER_SLOT: 9 # 14 (estimate from Eth1 mainnet) SECONDS_PER_ETH1_BLOCK: 14 #SECONDS_PER_ETH1_BLOCK: 10 # 2**8 (= 256) epochs ~27 hours MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256 # 2**8 (= 256) epochs ~27 hours SHARD_COMMITTEE_PERIOD: 256 # 2**11 (= 2,048) Eth1 blocks ~8 hours ETH1_FOLLOW_DISTANCE: 2048 # Validator cycle # --------------------------------------------------------------- # 2**2 (= 4) INACTIVITY_SCORE_BIAS: 4 # 2**4 (= 16) INACTIVITY_SCORE_RECOVERY_RATE: 16 # 2**4 * 10**9 (= 16,000,000,000) Gwei EJECTION_BALANCE: 16000000000 # 2**2 (= 4) MIN_PER_EPOCH_CHURN_LIMIT: 4 # 2**16 (= 65,536) CHURN_LIMIT_QUOTIENT: 65536 # Fork choice # --------------------------------------------------------------- # 70% PROPOSER_SCORE_BOOST: 70 # Deposit contract # --------------------------------------------------------------- # Ethereum PoW Mainnet DEPOSIT_CHAIN_ID: 333777333 DEPOSIT_NETWORK_ID: 333777333 DEPOSIT_CONTRACT_ADDRESS: 0xf30097f8c858c1f6b0c6efe72240319efa65b825 ```` ### Generate `genesis.ssz` ````shell mkdir .workdir # copy bin mv eth2-testnet-genesis workdir/eth2-testnet-genesis cd .workdir mkdir output # Generate genesis ### set to param `--timestamp=` time of future start of work ./eth2-testnet-genesis phase0 \ --config=/home/mezin/go/src/eth2-testnet-genesis/.workdir/mainnet.yaml \ --mnemonics=/home/mezin/go/src/eth2-testnet-genesis/.workdir/mnemonics.yaml \ --state-output=/home/mezin/go/src/eth2-testnet-genesis/.workdir/output/genesis.ssz \ --tranches-dir=/home/mezin/go/src/eth2-testnet-genesis/.workdir/output/tranches \ --eth1-block=0x49ae1e25e1c146f404138dbf97bf423655b9c7fed9d464654723bc32e068a799 \ --timestamp=1651220400 ```` result ```` .workdir/ output/ tranches/ tranche_0000.txt genesis.ssz eth2-testnet-genesis mainnet.yaml mnemonics.yaml ```` ### Inspect `genesis.ssz` In script https://github.com/protolambda/eth2-testnet-genesis/blob/master/compute_genesis_details.py#L2 comment string ```` from eth2spec.phase0.spec import * ```` and instead import following ```` from eth2spec.phase0.mainnet import * ### for altair mode #from eth2spec.altair.mainnet import * ```` > Note: genesis file `genesis.ssz` must be in same folder with script `compute_genesis_details.py` Execution example ````shell ~/go/src/eth2-testnet-genesis$ python3 compute_genesis_details.py genesis_time: 1651220700 genesis_state_root: 0xf0069fbd216642f817a112be5867f662290ffb507e4400d827432ea952288cc9 genesis_latest_block_header: slot: 0 proposer_index: 0 parent_root: 0x0000000000000000000000000000000000000000000000000000000000000000 state_root: 0x0000000000000000000000000000000000000000000000000000000000000000 body_root: 0xccb62460692be0ec813b56be97f68a82cf57abc102e27bf49ebf4190ff22eedd genesis_block_root_no_state_root: 0xeade62f0457b2fdf48e7d3fc4b60736688286be7c7a3ac4c9a16a5e0600bd9e4 genesis_block_root_updated_state_root: 0x166be607fa4a6effba46114ab5b5ff2cf1f443fbd824d73b014071cef7c59e66 genesis_validators_root: 0x3e6dd42e4115fb661cc5a49bbb7cae27621db8a66379df4effb7d7e67afe74ef genesis_validators_count: 16384 genesis_active_validators_count: 16384 genesis_total_active_stake_gwei: 524288000000000 genesis_total_balance_gwei: 524288000000000 eth1_data: deposit_root: 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e deposit_count: 0 block_hash: 0x49ae1e25e1c146f404138dbf97bf423655b9c7fed9d464654723bc32e068a799 deposit index: 0 genesis_fork_version: 0x00002009 genesis_fork_digest: 0xae6f112d pre_genesis_fork_digest: 0xd54cf597 ```` ## Import validators keys ````shell mezin@mezin:~/go/src/prysm$ bazel run //validator:validator -- accounts import --keys-dir=/home/mezin/go/src/prysm/.data/validator_keys DEBUG: /home/mezin/.cache/bazel/_bazel_mezin/c4de788cbdc1238dbcc1151acb69975d/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:100:14: rbe_ubuntu_clang_gen not using checked in configs as user set attr to 'False' DEBUG: /home/mezin/.cache/bazel/_bazel_mezin/c4de788cbdc1238dbcc1151acb69975d/external/bazel_toolchains/rules/rbe_repo/checked_in.bzl:100:14: rbe_ubuntu_gcc_gen not using checked in configs as user set attr to 'False' WARNING: /home/mezin/go/src/prysm/validator/BUILD.bazel:3:14: target '//validator:validator' is deprecated: This target has moved to //cmd/validator:validator INFO: Analyzed target //validator:validator (1 packages loaded, 3 targets configured). INFO: Found 1 target... Target //cmd/validator:validator up-to-date: bazel-bin/cmd/validator/validator_/validator INFO: Elapsed time: 23.661s, Critical Path: 0.06s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action INFO: Build completed successfully, 1 total action Prysmatic Labs Terms of Use By downloading, accessing or using the Prysm implementation (“Prysm”), you (referenced herein as “you” or the “user”) certify that you have read and agreed to the terms and conditions below. TERMS AND CONDITIONS: https://github.com/prysmaticlabs/prysm/v2/blob/master/TERMS_OF_SERVICE.md Type "accept" to accept this terms and conditions [accept/decline]: (default: decline): accept [2022-04-28 10:08:31] WARN flags: Running on Ethereum Consensus Mainnet Enter a wallet directory (default: /home/mezin/.eth2validators/prysm-wallet-v2): Enter a wallet directory (default: /home/mezin/.eth2validators/prysm-wallet-v2): Password requirements: at least 8 characters including at least 1 alphabetical character, 1 number, and 1 unicode special character. Must not be a common password nor easy to guess New wallet password: !QAZ2wsx3edc Confirm password: !QAZ2wsx3edc [2022-04-28 10:09:04] INFO accounts: Successfully created new wallet wallet-path=/home/mezin/.eth2validators/prysm-wallet-v2 Enter the password for your imported accounts: !QAZ2wsx3edc Importing accounts, this may take a while... Importing accounts... 100% [====================================] [3h26m37s:0s] Successfully imported 16384 accounts, view all of them by running `accounts list` ```` ## Prysm create dir `.data` copy to `.data` from work dir of `eth2-testnet-genesis` following + `genesis.ssz` + `tranches/` + `mainnet.yaml` copy to `.data` from work dir of `eth2.0-deposit-cli` following + `validator_keys` ### start ethereum node example ````shell geth \ --mine \ --datadir=.data/node-1 \ --networkid=333777333 \ --verbosity=3 \ --nodiscover \ --unlock=0xa7e558cc6efa1c41270ef4aa227b3dd6b4a3951e \ --password=.data/node-1/password.txt \ --syncmode=full \ --allow-insecure-unlock \ --http \ --http.addr=127.0.0.1 \ --http.port=9545 \ --http.api="admin,debug,web3,eth,txpool,personal,clique,miner,net" \ --http.corsdomain "*" \ --ws \ --ws.port=9546 \ --ws.addr="127.0.0.1" \ --ws.origins "*" \ --ws.api "admin,debug,web3,eth,txpool,personal,clique,miner,net" \ console ```` ### start beacon node ````shell bazel run //beacon-chain -- \ --accept-terms-of-use \ --force-clear-db \ --bootstrap-node= \ --http-web3provider=http://localhost:9545 \ --genesis-state=/home/mezin/go/src/prysm/.data/genesis.ssz \ --deposit-contract=0xf30097f8c858c1f6b0c6efe72240319efa65b825 \ --contract-deployment-block=8 \ --chain-id=333777333 \ --network-id=333777333 \ --verbosity=debug \ --min-sync-peers=0 \ --no-discovery \ --datadir=/home/mezin/go/src/prysm/.data/node-0 \ --pyrmont ```` ### start validators ````shell bazel run //validator -- \ --accept-terms-of-use \ --force-clear-db \ --beacon-rpc-provider=localhost:4000 \ --grpc-max-msg-size=15900000 \ --pyrmont ```` ### Beacon API https://ethereum.github.io/beacon-APIs ##### http://localhost:3500/eth/v1/node/syncing ````json {"data":{"head_slot":"1516","sync_distance":"0","is_syncing":false}} ```` ##### http://localhost:3500/eth/v1alpha1/beacon/chainhead ````json { "headSlot": "1516", "headEpoch": "47", "headBlockRoot": "N0vLsiOf0Qyedc3LGVjuMg0FjBGLNqZkHnjIfJUzGIk=", "finalizedSlot": "1440", "finalizedEpoch": "45", "finalizedBlockRoot": "HWeJRF12zLhaP3YHhTj76meK/gbmOgAeEAXOCzOU0XY=", "justifiedSlot": "1472", "justifiedEpoch": "46", "justifiedBlockRoot": "EPO333CbytOSmNev757T6l/VXe8u4K1wOILejMF/8oA=", "previousJustifiedSlot": "1440", "previousJustifiedEpoch": "45", "previousJustifiedBlockRoot": "HWeJRF12zLhaP3YHhTj76meK/gbmOgAeEAXOCzOU0XY=" } ```` # Prysm run interop mod ## Start Beacon node interop mod ````shell bazel run //beacon-chain -- \ --datadir /tmp/mergechaindata \ --clear-db \ --interop-num-validators=64 \ --interop-eth1data-votes \ --min-sync-peers=0 \ --http-web3provider=http://localhost:9545 \ --deposit-contract=0xf30097f8c858c1f6b0c6efe72240319efa65b825 \ --contract-deployment-block=8 \ --bootstrap-node= \ --chain-id=333777333 \ --network-id=333777333 \ --pyrmont ```` ## Start validators interop mod ````shell bazel run //validator -- \ --beacon-rpc-provider=localhost:4000 \ --interop-num-validators=64 \ --interop-start-index=0 \ --clear-db ```` > Note: if any problems while start rm following folders > ~/.eth2 > ~/.eth2validators >

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully