use specified execution_payload when constructing blocks; update Geth launch script (#2975)
* use specified execution_payload when constructing blocks; update Geth launch script * revert DepositContractState change
This commit is contained in:
parent
0c4bfb1911
commit
1f51331dd3
|
@ -301,7 +301,8 @@ func is_merge_block(
|
|||
state: merge.BeaconState,
|
||||
body: merge.BeaconBlockBody | merge.TrustedBeaconBlockBody |
|
||||
merge.SigVerifiedBeaconBlockBody): bool =
|
||||
not is_merge_complete(state) and body.execution_payload != ExecutionPayload()
|
||||
not is_merge_complete(state) and
|
||||
body.execution_payload != default(merge.ExecutionPayload)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.0-beta.4/specs/merge/beacon-chain.md#is_execution_enabled
|
||||
func is_execution_enabled*(
|
||||
|
|
|
@ -547,7 +547,8 @@ template partialBeaconBlock(
|
|||
deposits: List[Deposit, Limit MAX_DEPOSITS](deposits),
|
||||
voluntary_exits:
|
||||
List[SignedVoluntaryExit, Limit MAX_VOLUNTARY_EXITS](voluntaryExits),
|
||||
sync_aggregate: sync_aggregate))
|
||||
sync_aggregate: sync_aggregate,
|
||||
execution_payload: executionPayload))
|
||||
|
||||
proc makeBeaconBlock*(
|
||||
cfg: RuntimeConfig,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# set -Eeuo pipefail
|
||||
|
||||
# https://notes.ethereum.org/@9AeMAlpyQYaAAyuj47BzRw/rkwW3ceVY
|
||||
# https://notes.ethereum.org/_UH57VUPRrC-re3ubtmo2w
|
||||
|
||||
# To increase verbosity: debug.verbosity(4)
|
||||
# MetaMask seed phrase for address with balance is:
|
||||
|
@ -11,12 +11,11 @@ GENESISJSON=$(mktemp)
|
|||
GETHDATADIR=$(mktemp -d)
|
||||
|
||||
echo \{\
|
||||
\"config\": \{\
|
||||
\"config\": \{\
|
||||
\"chainId\":1,\
|
||||
\"homesteadBlock\":0,\
|
||||
\"daoForkBlock\":0,\
|
||||
\"daoForkSupport\":true,\
|
||||
\"eip150Block\":0,\
|
||||
\"eip150Hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\
|
||||
\"eip155Block\":0,\
|
||||
\"eip158Block\":0,\
|
||||
\"byzantiumBlock\":0,\
|
||||
|
@ -30,13 +29,13 @@ echo \{\
|
|||
\"period\": 5,\
|
||||
\"epoch\": 30000\
|
||||
\},\
|
||||
\"terminalTotalDifficulty\":0\
|
||||
\"terminalTotalDifficulty\":10\
|
||||
\},\
|
||||
\"nonce\":\"0x42\",\
|
||||
\"timestamp\":\"0x0\",\
|
||||
\"extraData\":\"0x0000000000000000000000000000000000000000000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\
|
||||
\"gasLimit\":\"0x989680\",\
|
||||
\"difficulty\":\"0x400000000\",\
|
||||
\"gasLimit\":\"0x1C9C380\",\
|
||||
\"difficulty\":\"0x0\",\
|
||||
\"mixHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\
|
||||
\"coinbase\":\"0x0000000000000000000000000000000000000000\",\
|
||||
\"alloc\":\{\
|
||||
|
@ -46,7 +45,13 @@ echo \{\
|
|||
\"gasUsed\":\"0x0\",\
|
||||
\"parentHash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\
|
||||
\"baseFeePerGas\":\"0x7\"\
|
||||
\} > ${GENESISJSON}
|
||||
\} > "${GENESISJSON}"
|
||||
|
||||
~/execution_clients/go-ethereum/build/bin/geth --catalyst --http --ws -http.api "engine" --datadir ${GETHDATADIR} init ${GENESISJSON}
|
||||
~/execution_clients/go-ethereum/build/bin/geth --catalyst --http --ws -http.api "engine" --nodiscover --miner.etherbase 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b --datadir ${GETHDATADIR} console
|
||||
# Initialize the genesis
|
||||
~/execution_clients/go-ethereum/build/bin/geth --catalyst --http --ws -http.api "engine" --datadir "${GETHDATADIR}" init "${GENESISJSON}"
|
||||
|
||||
# Import the signing key (press enter twice for empty password)
|
||||
~/execution_clients/go-ethereum/build/bin/geth --catalyst --http --ws -http.api "engine" --datadir "${GETHDATADIR}" account import <(echo 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8)
|
||||
|
||||
# Start the node (and press enter once to unlock the account)
|
||||
~/execution_clients/go-ethereum/build/bin/geth --catalyst --http --ws -ws.api "eth,net,engine" --datadir "${GETHDATADIR}" --allow-insecure-unlock --unlock "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" --password "" --nodiscover console
|
||||
|
|
Loading…
Reference in New Issue