From bddaa801f2edf3b08f0706806462653fb0792a33 Mon Sep 17 00:00:00 2001 From: Will Hester Date: Tue, 25 Jun 2024 17:07:24 +0200 Subject: [PATCH] update start beacon params - NEW ERROR UNLOCKED --- integration/eth2network/eth2_binaries.go | 2 +- integration/eth2network/eth2_configs.go | 37 +++++------- integration/eth2network/eth2_network.go | 72 ++++++++++++++++-------- 3 files changed, 65 insertions(+), 46 deletions(-) diff --git a/integration/eth2network/eth2_binaries.go b/integration/eth2network/eth2_binaries.go index 5ee5f9dd79..328e99d7fa 100644 --- a/integration/eth2network/eth2_binaries.go +++ b/integration/eth2network/eth2_binaries.go @@ -18,7 +18,7 @@ import ( const ( _gethVersion = "1.14.0" - _prysmVersion = "v5.0.3" + _prysmVersion = "v5.0.4" ) var ( diff --git a/integration/eth2network/eth2_configs.go b/integration/eth2network/eth2_configs.go index 43afa7fe28..69c7cfc34b 100644 --- a/integration/eth2network/eth2_configs.go +++ b/integration/eth2network/eth2_configs.go @@ -19,6 +19,10 @@ personal.importRawKey(key, pwd); accts = personal.listAccounts; personal.unlockAccount(accts[0], pwd, 0); + +console.log("key: ", key) +console.log("pwd: ", pwd) +console.log("accts: ", accts[0]); console.log("Unlocked account"); ` @@ -26,27 +30,24 @@ const _beaconConfig = ` CONFIG_NAME: interop PRESET_BASE: interop -DEPOSIT_CHAIN_ID: %d -DEPOSIT_NETWORK_ID: %d - # Genesis GENESIS_FORK_VERSION: 0x20000089 # Altair -ALTAIR_FORK_EPOCH: 1 +ALTAIR_FORK_EPOCH: 0 ALTAIR_FORK_VERSION: 0x20000090 # Merge -BELLATRIX_FORK_EPOCH: 2 +BELLATRIX_FORK_EPOCH: 0 BELLATRIX_FORK_VERSION: 0x20000091 TERMINAL_TOTAL_DIFFICULTY: 0 # Capella -CAPELLA_FORK_EPOCH: 3 +CAPELLA_FORK_EPOCH: 0 CAPELLA_FORK_VERSION: 0x20000092 MAX_WITHDRAWALS_PER_PAYLOAD: 16 -DENEB_FORK_EPOCH: 4 +DENEB_FORK_EPOCH: 0 DENEB_FORK_VERSION: 0x20000093 # Time parameters @@ -59,13 +60,10 @@ DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 const _baseGenesis = `{ "config": { - "ChainName": "l1_chain", "chainId": 32382, - "consensus": "ethash", "homesteadBlock": 0, "daoForkSupport": true, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, @@ -75,17 +73,15 @@ const _baseGenesis = `{ "muirGlacierBlock": 0, "berlinBlock": 0, "londonBlock": 0, - "terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "arrowGlacierBlock": 0, "grayGlacierBlock": 0, - "shanghaiTime": 1719219940, - "cancunTime": 1719220012, + "shanghaiTime": 1694203366, "ethash": {}, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true }, - "nonce": "0", - "timestamp": "0x65c0a21c", + "nonce": "0x0", + "timestamp": "0x667ad601", "gasLimit": "0x1c9c380", "difficulty": "0x1", "mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000", @@ -99,9 +95,9 @@ const _baseGenesis = `{ "number": "0x0", "gasUsed": "0x0", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "baseFeePerGas": "0x0", - "excessBlobGas": "0x0", - "blobGasUsed": "0x0" + "baseFeePerGas": null, + "excessBlobGas": null, + "blobGasUsed": null }` // generateGenesis returns a genesis with specified params @@ -115,12 +111,9 @@ func generateGenesis(blockTimeSecs int, chainID int, signerAddrs, prefundedAddrs // add the prefunded prefundedAddrs for _, account := range prefundedAddrs { - genesisJSON["alloc"].(map[string]interface{})[account] = map[string]string{"balance": "7500000000000000000000000000000"} + genesisJSON["alloc"].(map[string]interface{})[account] = map[string]string{"balance": "0x21e19e0c9bab2400000"} } - //// set the block prod speed - //genesisJSON["config"].(map[string]interface{})["clique"].(map[string]interface{})["period"] = blockTimeSecs - // set the network id genesisJSON["config"].(map[string]interface{})["chainId"] = chainID diff --git a/integration/eth2network/eth2_network.go b/integration/eth2network/eth2_network.go index 30a8f2b7ec..a93b3717c5 100644 --- a/integration/eth2network/eth2_network.go +++ b/integration/eth2network/eth2_network.go @@ -138,8 +138,8 @@ func NewEth2Network( // Write beacon config //beaconConf := fmt.Sprintf(_beaconConfig, chainID, chainID, secondsPerSlot, slotsPerEpoch) - beaconConf := fmt.Sprintf(_beaconConfig, chainID, chainID) - err = os.WriteFile(prysmConfigPath, []byte(beaconConf), 0o600) + //beaconConf := fmt.Sprintf(_beaconConfig, chainID, chainID) + err = os.WriteFile(prysmConfigPath, []byte(_beaconConfig), 0o600) if err != nil { panic(err) } @@ -397,9 +397,7 @@ func (n *Impl) gethStartNode(executionPort, networkPort, httpPort, wsPort int, d _dataDirFlag, dataDirPath, "--http", "--http.addr", "0.0.0.0", - "--http.vhosts", "*", "--http.port", fmt.Sprintf("%d", httpPort), - "--http.corsdomain", "*", "--http.api", "admin,miner,engine,personal,eth,net,web3,debug", "--mine", "--miner.etherbase", minerAddress, @@ -416,8 +414,7 @@ func (n *Impl) gethStartNode(executionPort, networkPort, httpPort, wsPort int, d "--syncmode", "full", // sync mode to download and test all blocks and txs "--allow-insecure-unlock", // allows to use personal accounts over http/ws "--nodiscover", // don't try and discover peers - "--ipcdisable", // avoid geth erroring bc the ipc path is too long - "--verbosity", "3", // error log level + "--verbosity", "5", // error log level } fmt.Printf("gethStartNode: %s %s\n", n.gethBinaryPath, strings.Join(args, " ")) cmd := exec.Command(n.gethBinaryPath, args...) //nolint @@ -433,9 +430,8 @@ func (n *Impl) prysmGenerateGenesis() error { "testnet", "generate-genesis", "--fork", "deneb", - "--genesis-time-delay", "10", "--num-validators", fmt.Sprintf("%d", len(n.dataDirs)), - "--config-name", "interop", + "--genesis-time-delay", "10", "--chain-config-file", n.prysmConfigPath, "--geth-genesis-json-in", n.gethGenesisPath, "--geth-genesis-json-out", n.gethGenesisPath, @@ -453,30 +449,60 @@ func (n *Impl) prysmStartBeaconNode(gethAuthRPCPort, rpcPort, p2pPort int, nodeD // full command list at https://docs.prylabs.network/docs/prysm-usage/parameters args := []string{ "--datadir", path.Join(nodeDataDir, "prysm", "beacondata"), - "--interop-eth1data-votes", - "--accept-terms-of-use", - "--no-discovery", - "--rpc-port", fmt.Sprintf("%d", rpcPort), - "--p2p-udp-port", fmt.Sprintf("%d", p2pPort), "--min-sync-peers", "0", - "--minimum-peers-per-subnet", "0", - //"--min-sync-peers", fmt.Sprintf("%d", len(n.dataDirs)-1), - //"--minimum-peers-per-subnet", fmt.Sprintf("%d", min(len(n.dataDirs)-1, 2)), - "--interop-num-validators", fmt.Sprintf("%d", len(n.dataDirs)), "--genesis-state", n.prysmGenesisPath, + "--bootstrap-node", "", + "--interop-eth1data-votes", "--chain-config-file", n.prysmConfigPath, - "--config-file", n.prysmConfigPath, "--contract-deployment-block", "0", "--chain-id", fmt.Sprintf("%d", n.chainID), - "--grpc-gateway-corsdomain", "*", - "--grpc-gateway-port", fmt.Sprintf("%d", rpcPort+10), - "--execution-endpoint", fmt.Sprintf("http://127.0.0.1:%d", gethAuthRPCPort), + "--accept-terms-of-use", "--jwt-secret", path.Join(nodeDataDir, "geth", "jwtsecret"), - "--contract-deployment-block", "0", - "--verbosity", "trace", + //"--suggested-fee-recipient", n.preFundedMinerPKs["n0"] + "--minimum-peers-per-subnet", "0", "--enable-debug-rpc-endpoints", + "--execution-endpoint", fmt.Sprintf("http://127.0.0.1:%d", gethAuthRPCPort), + + //"--rpc-port", fmt.Sprintf("%d", rpcPort), + //"--p2p-udp-port", fmt.Sprintf("%d", p2pPort), + //"--min-sync-peers", fmt.Sprintf("%d", len(n.dataDirs)-1), + //"--minimum-peers-per-subnet", fmt.Sprintf("%d", min(len(n.dataDirs)-1, 2)), + //"--interop-num-validators", fmt.Sprintf("%d", len(n.dataDirs)), + //"--config-file", n.prysmConfigPath, + //"--grpc-gateway-corsdomain", "*", + //"--grpc-gateway-port", fmt.Sprintf("%d", rpcPort+10), + //"--execution-endpoint", fmt.Sprintf("http://127.0.0.1:%d", gethAuthRPCPort), + //"--contract-deployment-block", "0", + //"--verbosity", "trace", + //"--enable-debug-rpc-endpoints", "--force-clear-db", } + //args := []string{ + // "--datadir", path.Join(nodeDataDir, "prysm", "beacondata"), + // "--interop-eth1data-votes", + // "--accept-terms-of-use", + // "--no-discovery", + // "--rpc-port", fmt.Sprintf("%d", rpcPort), + // "--p2p-udp-port", fmt.Sprintf("%d", p2pPort), + // "--min-sync-peers", "0", + // "--minimum-peers-per-subnet", "0", + // //"--min-sync-peers", fmt.Sprintf("%d", len(n.dataDirs)-1), + // //"--minimum-peers-per-subnet", fmt.Sprintf("%d", min(len(n.dataDirs)-1, 2)), + // "--interop-num-validators", fmt.Sprintf("%d", len(n.dataDirs)), + // "--genesis-state", n.prysmGenesisPath, + // "--chain-config-file", n.prysmConfigPath, + // "--config-file", n.prysmConfigPath, + // "--contract-deployment-block", "0", + // "--chain-id", fmt.Sprintf("%d", n.chainID), + // "--grpc-gateway-corsdomain", "*", + // "--grpc-gateway-port", fmt.Sprintf("%d", rpcPort+10), + // "--execution-endpoint", fmt.Sprintf("http://127.0.0.1:%d", gethAuthRPCPort), + // "--jwt-secret", path.Join(nodeDataDir, "geth", "jwtsecret"), + // "--contract-deployment-block", "0", + // "--verbosity", "trace", + // "--enable-debug-rpc-endpoints", + // "--force-clear-db", + //} fmt.Printf("prysmStartBeaconNode: %s %s\n", n.prysmBeaconBinaryPath, strings.Join(args, " ")) cmd := exec.Command(n.prysmBeaconBinaryPath, args...) //nolint