From 958e4cd3b4cb389eccc52b24e2906c99c57156e2 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Fri, 12 Jul 2019 17:24:11 +0300 Subject: [PATCH] Getting genesis through web3 --- beacon_chain/beacon_node.nim | 7 ++- beacon_chain/conf.nim | 8 ++++ beacon_chain/deploy_deposit_contract.nim | 38 +++++++++++++++ beacon_chain/genesis.nim | 60 ++++++++++++++++++++++++ beacon_chain/spec/beaconstate.nim | 16 +++++++ beacon_chain/spec/presets/mainnet.nim | 3 ++ beacon_chain/spec/presets/minimal.nim | 5 ++ beacon_chain/validator_keygen.nim | 49 +++++++++++++++---- tests/simulation/run_node.sh | 4 +- tests/simulation/start.sh | 16 ++++++- tests/simulation/vars.sh | 1 + 11 files changed, 195 insertions(+), 12 deletions(-) create mode 100644 beacon_chain/deploy_deposit_contract.nim create mode 100644 beacon_chain/genesis.nim diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index d2911d624..815a6a5b3 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -7,7 +7,7 @@ import conf, time, state_transition, fork_choice, ssz, beacon_chain_db, validator_pool, extras, attestation_pool, block_pool, eth2_network, beacon_node_types, mainchain_monitor, trusted_state_snapshots, version, - sync_protocol, request_manager + sync_protocol, request_manager, genesis const topicBeaconBlocks = "ethereum/2.1/beacon_chain/blocks" @@ -149,11 +149,14 @@ proc init*(T: type BeaconNode, conf: BeaconNodeConf): Future[BeaconNode] {.async try: info "Importing snapshot file", path = snapshotFile + info "Waiting for genesis state from eth1" let - tailState = Json.loadFile(snapshotFile, BeaconState) + tailState = await getGenesisFromEth1(conf) + # tailState = Json.loadFile(snapshotFile, BeaconState) tailBlock = get_initial_beacon_block(tailState) + info "Got genesis state", hash = hash_tree_root(tailState) BlockPool.preInit(result.db, tailState, tailBlock) except SerializationError as err: diff --git a/beacon_chain/conf.nim b/beacon_chain/conf.nim index 403c53e25..bfc75a063 100644 --- a/beacon_chain/conf.nim +++ b/beacon_chain/conf.nim @@ -77,6 +77,14 @@ type "If you set this to 'auto', a persistent automatically generated ID will be seleceted for each --dataDir folder" defaultValue: ""}: string + depositWeb3Url* {. + desc: "URL of the Web3 server to observe Eth1", + defaultValue: ""}: string + + depositContractAddress* {. + desc: "Address of the deposit contract", + defaultValue: ""}: string + of createTestnet: networkId* {. desc: "An unique numeric identifier for the network".}: uint8 diff --git a/beacon_chain/deploy_deposit_contract.nim b/beacon_chain/deploy_deposit_contract.nim new file mode 100644 index 000000000..e89b13c10 --- /dev/null +++ b/beacon_chain/deploy_deposit_contract.nim @@ -0,0 +1,38 @@ +import + os, ospaths, strutils, strformat, options, + chronos, blscurve, nimcrypto, json_serialization, confutils, web3, stint, + spec/[datatypes, digest, crypto], conf, time, ssz, + ../tests/testutil + +import json_rpc/rpcclient +import web3/stintjson, json + +const contractCode = "0x600035601c52740100000000000000000000000000000000000000006020526f7fffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff8000000000000000000000000000000060605274012a05f1fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffed5fa0e000000000000000000000000000000000060a052341561009e57600080fd5b6101406000601f818352015b600061014051602081106100bd57600080fd5b600260c052602060c020015460208261016001015260208101905061014051602081106100e957600080fd5b600260c052602060c020015460208261016001015260208101905080610160526101609050602060c0825160208401600060025af161012757600080fd5b60c0519050606051600161014051018060405190131561014657600080fd5b809190121561015457600080fd5b6020811061016157600080fd5b600260c052602060c02001555b81516001018083528114156100aa575b50506111c656600035601c52740100000000000000000000000000000000000000006020526f7fffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff8000000000000000000000000000000060605274012a05f1fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffed5fa0e000000000000000000000000000000000060a052600015610277575b6101605261014052600061018052610140516101a0526101c060006008818352015b61018051600860008112156100da578060000360020a82046100e1565b8060020a82025b905090506101805260ff6101a051166101e052610180516101e0516101805101101561010c57600080fd5b6101e0516101805101610180526101a0517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86000811215610155578060000360020a820461015c565b8060020a82025b905090506101a0525b81516001018083528114156100bd575b50506018600860208206610200016020828401111561019357600080fd5b60208061022082610180600060046015f15050818152809050905090508051602001806102c0828460006004600a8704601201f16101d057600080fd5b50506102c05160206001820306601f82010390506103206102c0516008818352015b826103205111156102025761021e565b6000610320516102e001535b81516001018083528114156101f2575b50505060206102a05260406102c0510160206001820306601f8201039050610280525b6000610280511115156102535761026f565b602061028051036102a001516020610280510361028052610241565b610160515650005b63c5f2892f60005114156103cf57341561029057600080fd5b6000610140526001546101605261018060006020818352015b600160016101605116141561032a57600061018051602081106102cb57600080fd5b600060c052602060c02001546020826102200101526020810190506101405160208261022001015260208101905080610220526102209050602060c0825160208401600060025af161031c57600080fd5b60c051905061014052610398565b6000610140516020826101a0010152602081019050610180516020811061035057600080fd5b600260c052602060c02001546020826101a0010152602081019050806101a0526101a09050602060c0825160208401600060025af161038e57600080fd5b60c0519050610140525b61016060026103a657600080fd5b60028151048152505b81516001018083528114156102a9575b50506101405160005260206000f3005b63621fd13060005114156104e15734156103e857600080fd5b63806732896101405260015461016052610160516006580161009b565b506101c0526000610220525b6101c05160206001820306601f8201039050610220511015156104335761044c565b610220516101e001526102205160200161022052610411565b6101c0805160200180610280828460006004600a8704601201f161046f57600080fd5b50506102805160206001820306601f82010390506102e0610280516008818352015b826102e05111156104a1576104bd565b60006102e0516102a001535b8151600101808352811415610491575b5050506020610260526040610280510160206001820306601f8201039050610260f3005b63c47e300d600051141561103b57606060046101403760506004356004016101a037603060043560040135111561051757600080fd5b604060243560040161022037602060243560040135111561053757600080fd5b608060443560040161028037606060443560040135111561055757600080fd5b63ffffffff6001541061056957600080fd5b633b9aca00610340526103405161057f57600080fd5b61034051340461032052633b9aca0061032051101561059d57600080fd5b60306101a051146105ad57600080fd5b602061022051146105bd57600080fd5b606061028051146105cd57600080fd5b6101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a05163806732896103c052610320516103e0526103e0516006580161009b565b506104405260006104a0525b6104405160206001820306601f82010390506104a05110151561065d57610676565b6104a05161046001526104a0516020016104a05261063b565b6103a05261038052610360526103405261032052610300526102e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a052610440805160200180610360828460006004600a8704601201f16106dd57600080fd5b50506101a0516101c0516101e05161020051610220516102405161026051610280516102a0516102c0516102e05161030051610320516103405161036051610380516103a0516103c0516103e05161040051610420516104405161046051610480516104a05163806732896104c0526001546104e0526104e0516006580161009b565b506105405260006105a0525b6105405160206001820306601f82010390506105a05110151561078e576107a7565b6105a05161056001526105a0516020016105a05261076c565b6104a05261048052610460526104405261042052610400526103e0526103c0526103a05261038052610360526103405261032052610300526102e0526102c0526102a05261028052610260526102405261022052610200526101e0526101c0526101a0526105408051602001806105c0828460006004600a8704601201f161082e57600080fd5b505060a06106405261064051610680526101a08051602001806106405161068001828460006004600a8704601201f161086657600080fd5b505061064051610680015160206001820306601f8201039050610640516106800161062081516040818352015b83610620511015156108a4576108c1565b6000610620516020850101535b8151600101808352811415610893575b50505050602061064051610680015160206001820306601f820103905061064051010161064052610640516106a0526102208051602001806106405161068001828460006004600a8704601201f161091857600080fd5b505061064051610680015160206001820306601f8201039050610640516106800161062081516020818352015b836106205110151561095657610973565b6000610620516020850101535b8151600101808352811415610945575b50505050602061064051610680015160206001820306601f820103905061064051010161064052610640516106c0526103608051602001806106405161068001828460006004600a8704601201f16109ca57600080fd5b505061064051610680015160206001820306601f8201039050610640516106800161062081516020818352015b8361062051101515610a0857610a25565b6000610620516020850101535b81516001018083528114156109f7575b50505050602061064051610680015160206001820306601f820103905061064051010161064052610640516106e0526102808051602001806106405161068001828460006004600a8704601201f1610a7c57600080fd5b505061064051610680015160206001820306601f8201039050610640516106800161062081516060818352015b8361062051101515610aba57610ad7565b6000610620516020850101535b8151600101808352811415610aa9575b50505050602061064051610680015160206001820306601f82010390506106405101016106405261064051610700526105c08051602001806106405161068001828460006004600a8704601201f1610b2e57600080fd5b505061064051610680015160206001820306601f8201039050610640516106800161062081516020818352015b8361062051101515610b6c57610b89565b6000610620516020850101535b8151600101808352811415610b5b575b50505050602061064051610680015160206001820306601f8201039050610640510101610640527fdc5fc95703516abd38fa03c3737ff3b52dc52347055c8028460fdf5bbe2f12ce61064051610680a160006107205260006101a06030806020846107e001018260208501600060046016f150508051820191505060006010602082066107600160208284011115610c2057600080fd5b60208061078082610720600060046015f15050818152809050905090506010806020846107e001018260208501600060046013f1505080518201915050806107e0526107e09050602060c0825160208401600060025af1610c8057600080fd5b60c0519050610740526000600060406020820661088001610280518284011115610ca957600080fd5b6060806108a0826020602088068803016102800160006004601bf1505081815280905090509050602060c0825160208401600060025af1610ce957600080fd5b60c0519050602082610a800101526020810190506000604060206020820661094001610280518284011115610d1d57600080fd5b606080610960826020602088068803016102800160006004601bf1505081815280905090509050602080602084610a0001018260208501600060046015f150508051820191505061072051602082610a0001015260208101905080610a0052610a009050602060c0825160208401600060025af1610d9a57600080fd5b60c0519050602082610a8001015260208101905080610a8052610a809050602060c0825160208401600060025af1610dd157600080fd5b60c0519050610860526000600061074051602082610b20010152602081019050610220602080602084610b2001018260208501600060046015f150508051820191505080610b2052610b209050602060c0825160208401600060025af1610e3757600080fd5b60c0519050602082610ca00101526020810190506000610360600880602084610c2001018260208501600060046012f15050805182019150506000601860208206610ba00160208284011115610e8c57600080fd5b602080610bc082610720600060046015f1505081815280905090509050601880602084610c2001018260208501600060046014f150508051820191505061086051602082610c2001015260208101905080610c2052610c209050602060c0825160208401600060025af1610eff57600080fd5b60c0519050602082610ca001015260208101905080610ca052610ca09050602060c0825160208401600060025af1610f3657600080fd5b60c0519050610b00526001805460018254011015610f5357600080fd5b6001815401815550600154610d2052610d4060006020818352015b60016001610d2051161415610fa357610b0051610d405160208110610f9257600080fd5b600060c052602060c0200155611037565b6000610d405160208110610fb657600080fd5b600060c052602060c0200154602082610d60010152602081019050610b0051602082610d6001015260208101905080610d6052610d609050602060c0825160208401600060025af161100757600080fd5b60c0519050610b0052610d20600261101e57600080fd5b60028151048152505b8151600101808352811415610f6e575b5050005b60006000fd5b6101856111c6036101856000396101856111c6036000f3" + +proc deployContract*(web3: Web3, code: string): Future[Address] {.async.} = + let provider = web3.provider + let accounts = await provider.eth_accounts() + + var code = code + if code[1] notin {'x', 'X'}: + code = "0x" & code + var tr: EthSend + tr.source = accounts[0] + tr.data = code + tr.gas = Quantity(3000000).some + let r = await provider.eth_sendTransaction(tr) + let receipt = await provider.eth_getTransactionReceipt(r) + result = receipt.contractAddress.get + +proc main(depositWeb3Url: string) {.async.} = + let provider = newRpcWebSocketClient() + await provider.connect(depositWeb3Url) + let web3 = newWeb3(provider) + let accounts = await provider.eth_accounts() + let defaultAccount = accounts[0] + + let contractAddress = await web3.deployContract(contractCode) + echo contractAddress + +cli do (depositWeb3Url: string): + waitFor main(depositWeb3Url) diff --git a/beacon_chain/genesis.nim b/beacon_chain/genesis.nim new file mode 100644 index 000000000..6c2a66c12 --- /dev/null +++ b/beacon_chain/genesis.nim @@ -0,0 +1,60 @@ +import conf, chronos, web3, json_rpc/rpcclient, json, + spec/[bitfield, datatypes, digest, crypto, beaconstate, helpers, validator], extras + +contract(DepositContract): + proc deposit(pubkey: Bytes48, withdrawalCredentials: Bytes32, signature: Bytes96) + proc Deposit(pubkey: Bytes48, withdrawalCredentials: Bytes32, amount: Bytes8, signature: Bytes96, merkleTreeIndex: Bytes8) {.event.} + +const MIN_GENESIS_TIME = 0 + +type + QueueElement = (BlockHash, DepositData) + + DepositCollector = ref object + deposits: seq[datatypes.Deposit] + queue: AsyncQueue[QueueElement] + +proc processDeposit(d: DepositCollector, web3: Web3): Future[BeaconState] {.async.} = + while true: + let (blkHash, data) = await d.queue.popFirst() + + let blk = await web3.provider.eth_getBlockByHash(blkHash, false) + let dep = datatypes.Deposit(data: data) + d.deposits.add(dep) + + if d.deposits.len >= SLOTS_PER_EPOCH and d.deposits.len >= MIN_GENESIS_ACTIVE_VALIDATOR_COUNT and blk.timestamp.uint64 >= MIN_GENESIS_TIME.uint64: + # This block is a genesis candidate + var h: Eth2Digest + h.data = array[32, byte](blkHash) + let s = initialize_beacon_state_from_eth1(h, blk.timestamp.uint64, d.deposits, {skipValidation}) + + if is_valid_genesis_state(s): + return s + +proc getGenesisFromEth1*(conf: BeaconNodeConf): Future[BeaconState] {.async.} = + let provider = newRpcWebSocketClient() + await provider.connect(conf.depositWeb3Url) + let web3 = newWeb3(provider) + + var contractAddress = Address.fromHex(conf.depositContractAddress) + var defaultAccount: Address + var ns = web3.contractSender(DepositContract, contractAddress, defaultAccount) + + var deposits = DepositCollector() + deposits.queue = newAsyncQueue[QueueElement]() + + let s = await ns.subscribe(Deposit, %*{"fromBlock": "0x0"}) do(pubkey: Bytes48, withdrawalCredentials: Bytes32, amount: Bytes8, signature: Bytes96, merkleTreeIndex: Bytes8, j: JsonNode): + + let blkHash = BlockHash.fromHex(j["blockHash"].getStr()) + let amount = bytes_to_int(array[8, byte](amount)) + + deposits.queue.addLastNoWait((blkHash, + DepositData(pubkey: ValidatorPubKey.init(array[48, byte](pubkey)), + withdrawal_credentials: Eth2Digest(data: array[32, byte](withdrawalCredentials)), + amount: amount, + signature: ValidatorSig.init(array[96, byte](signature))))) + + let genesisState = await processDeposit(deposits, web3) + await s.unsubscribe() + return genesisState + diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 8d746c965..7712e13a3 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -248,6 +248,22 @@ func initialize_beacon_state_from_eth1*( state +proc initialize_beacon_state_from_eth1*(eth1_block_hash: Eth2Digest, + eth1_timestamp: uint64, + deposits: openarray[Deposit], + flags: UpdateFlags = {}): BeaconState = + # TODO: Revisit + initialize_beacon_state_from_eth1(deposits, eth1_timestamp, Eth1Data(deposit_count: deposits.len.uint64, deposit_root: eth1_block_hash), flags) + +proc is_valid_genesis_state*(state: BeaconState): bool = + if state.genesis_time < MIN_GENESIS_TIME: + return false + if len(get_active_validator_indices(state, GENESIS_EPOCH)) < MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: + return false + return true + +# TODO candidate for spec? +# https://github.com/ethereum/eth2.0-specs/blob/0.5.1/specs/core/0_beacon-chain.md#on-genesis func get_initial_beacon_block*(state: BeaconState): BeaconBlock = BeaconBlock( slot: GENESIS_SLOT, diff --git a/beacon_chain/spec/presets/mainnet.nim b/beacon_chain/spec/presets/mainnet.nim index 5c63c8eb0..c004b0e55 100644 --- a/beacon_chain/spec/presets/mainnet.nim +++ b/beacon_chain/spec/presets/mainnet.nim @@ -161,6 +161,9 @@ const MAX_VOLUNTARY_EXITS* = 2^4 MAX_TRANSFERS* = 0 + MIN_GENESIS_TIME* {.intdefine.} = 0 + MIN_GENESIS_ACTIVE_VALIDATOR_COUNT* {.intdefine.} = 99 + type # Signature domains # --------------------------------------------------------------- diff --git a/beacon_chain/spec/presets/minimal.nim b/beacon_chain/spec/presets/minimal.nim index 707b78b26..fff43d501 100644 --- a/beacon_chain/spec/presets/minimal.nim +++ b/beacon_chain/spec/presets/minimal.nim @@ -128,6 +128,11 @@ const MAX_VOLUNTARY_EXITS* = 2^4 MAX_TRANSFERS* = 0 + + MIN_GENESIS_TIME* {.intdefine.} = 0 + MIN_GENESIS_ACTIVE_VALIDATOR_COUNT* {.intdefine.} = 99 + + type # Signature domains # --------------------------------------------------------------- diff --git a/beacon_chain/validator_keygen.nim b/beacon_chain/validator_keygen.nim index f5ee131db..ffc567041 100644 --- a/beacon_chain/validator_keygen.nim +++ b/beacon_chain/validator_keygen.nim @@ -1,9 +1,14 @@ import os, ospaths, strutils, strformat, - chronos, blscurve, nimcrypto, json_serialization, confutils, + chronos, blscurve, nimcrypto, json_serialization, confutils, web3, stint, spec/[datatypes, digest, crypto], conf, time, ssz, ../tests/testutil +import json_rpc/rpcclient + +contract(DepositContract): + proc deposit(pubkey: Bytes48, withdrawalCredentials: Bytes32, signature: Bytes96) + proc writeTextFile(filename: string, contents: string) = writeFile(filename, contents) echo "Wrote ", filename @@ -12,9 +17,23 @@ proc writeFile(filename: string, value: auto) = Json.saveFile(filename, value, pretty = true) echo "Wrote ", filename -cli do (totalValidators: int = 125000, - outputDir: string = "validators", - generateFakeKeys = false): + +proc ethToWei(eth: UInt256): UInt256 = + eth * 1000000000000000000.u256 + +import web3/stintjson, json + +proc main(totalValidators: int, outputDir: string, generateFakeKeys: bool, depositWeb3Url, depositContractAddress: string) {.async.} = + var web3: Web3 + var contractAddress: Address + var eth1Addresses: seq[Address] + + if depositWeb3Url.len > 0: + let provider = newRpcWebSocketClient() + await provider.connect(depositWeb3Url) + web3 = newWeb3(provider) + contractAddress = Address.fromHex(depositContractAddress) + eth1Addresses = await web3.provider.eth_accounts() for i in 0 ..< totalValidators: let @@ -35,18 +54,32 @@ cli do (totalValidators: int = 125000, domain = 3'u64 var - deposit = Deposit( + dp = Deposit( data: DepositData( amount: MAX_EFFECTIVE_BALANCE, pubkey: pubKey, withdrawal_credentials: withdrawalCredentials)) - deposit.data.signature = - bls_sign(privkey, signing_root(deposit.data).data, + dp.data.signature = + bls_sign(privkey, signing_root(dp.data).data, domain) writeTextFile(privKeyFn, $privKey) - writeFile(depositFn, deposit) + writeFile(depositFn, dp) + + if not web3.isNil: + let depositContract = web3.contractSender(DepositContract, contractAddress, eth1Addresses[i]) + depositContract.value = 32.u256.ethToWei + let tx = await depositContract.deposit(Bytes48(pubKey.getBytes()), Bytes32(withdrawalCredentials.data), Bytes96(dp.data.signature.getBytes())) if generateFakeKeys: echo "Keys generated by this tool are only for testing!" + + +cli do (totalValidators: int = 125000, + outputDir: string = "validators", + generateFakeKeys = false, + depositWeb3Url: string = "", + depositContractAddress: string = ""): + + waitFor main(totalValidators, outputDir, generateFakeKeys, depositWeb3Url, depositContractAddress) diff --git a/tests/simulation/run_node.sh b/tests/simulation/run_node.sh index fc7f2b38c..63b2eba86 100755 --- a/tests/simulation/run_node.sh +++ b/tests/simulation/run_node.sh @@ -32,4 +32,6 @@ $BEACON_NODE_BIN \ --tcpPort:$PORT \ --udpPort:$PORT \ $NAT_FLAG \ - --stateSnapshot:$SNAPSHOT_FILE + --stateSnapshot:$SNAPSHOT_FILE \ + --depositWeb3Url=$DEPOSIT_WEB3_URL \ + --depositContractAddress=$DEPOSIT_CONTRACT_ADDRESS diff --git a/tests/simulation/start.sh b/tests/simulation/start.sh index 373aad919..3ee37ea3b 100755 --- a/tests/simulation/start.sh +++ b/tests/simulation/start.sh @@ -7,6 +7,14 @@ set -eu # Set a default value for the env vars usually supplied by nimbus Makefile +export NUM_VALIDATORS=${VALIDATORS:-100} +export NUM_NODES=${NODES:-9} +export NUM_MISSING_NODES=${MISSING_NODES:-1} + +export DEPOSIT_WEB3_URL=ws://localhost:8545 +export DEPOSIT_CONTRACT_ADDRESS= + + cd "$SIM_ROOT" mkdir -p "$SIMULATION_DIR" mkdir -p "$VALIDATORS_DIR" @@ -25,12 +33,18 @@ LAST_VALIDATOR="$VALIDATORS_DIR/v$(printf '%07d' $LAST_VALIDATOR_NUM).deposit.js if [ ! -f $LAST_VALIDATOR ]; then if [[ -z "$SKIP_BUILDS" ]]; then nim c -o:"$VALIDATOR_KEYGEN_BIN" $DEFS -d:release beacon_chain/validator_keygen + nim c -o:"$DEPLOY_DEPOSIT_CONTRACT_BIN" $DEFS -d:release beacon_chain/deploy_deposit_contract + fi + export DEPOSIT_CONTRACT_ADDRESS=$($DEPLOY_DEPOSIT_CONTRACT_BIN --depositWeb3Url=$DEPOSIT_WEB3_URL) + $VALIDATOR_KEYGEN_BIN \ --totalValidators=$NUM_VALIDATORS \ --outputDir="$VALIDATORS_DIR" \ - --generateFakeKeys=yes + --generateFakeKeys=yes \ + --depositWeb3Url=$DEPOSIT_WEB3_URL \ + --depositContractAddress=$DEPOSIT_CONTRACT_ADDRESS fi if [[ -z "$SKIP_BUILDS" ]]; then diff --git a/tests/simulation/vars.sh b/tests/simulation/vars.sh index e40cc5b56..cd37563e9 100644 --- a/tests/simulation/vars.sh +++ b/tests/simulation/vars.sh @@ -24,4 +24,5 @@ SNAPSHOT_FILE="${SIMULATION_DIR}/state_snapshot.json" NETWORK_METADATA_FILE="${SIMULATION_DIR}/network.json" BEACON_NODE_BIN="${BUILD_OUTPUTS_DIR}/beacon_node" VALIDATOR_KEYGEN_BIN="${BUILD_OUTPUTS_DIR}/validator_keygen" +DEPLOY_DEPOSIT_CONTRACT_BIN="${BUILD_OUTPUTS_DIR}/deploy_deposit_contract" MASTER_NODE_ADDRESS_FILE="${SIMULATION_DIR}/node-0/beacon_node.address"