Last Updated: Mar 30, 2021
This provides instructions on running beacon chain and eth1 chain using Prysm's interop mode. Beacon chain node (Prysm) inserts application payload into the eth1 chain node (Catalyst). Beacon chain validator produces application payload by requesting from eth1 node and signs over it. In this interop mode, participation is 100% and the chain should finalize at the start of epoch 4.
Install Bazel
Prysm
quick-merge-demo
91334408302e09097a143fc3032e1df8bfbc0166
Catalyst
catalyst
a7522982fb2a9f60ddb08f28d42029c3d23267a2
1.) Check out catalyst
branch and start the Catalyst eth1 instance
./run-catalyst.sh
Notes: If you plan to send transaction later, edit run-catalyst.sh
's "alloc\": \{\}
with the address and eth amount.
2.) Check out quick-merge-demo
branch and generate the beacon chain genesis state
bazel run //tools/genesis-state-gen โ โnum-validators=64 โoutput-ssz=/tmp/genesis.ssz โmainnet-config
Note: There's no limit to the number of validators you can use. But make sure it's consistent with the validator command below
3.) In the same quick-merge-demo
branch, start the beacon node in interop mode
bazel run //beacon-chain โ โdatadir /tmp/mergechaindata โclear-db โinterop-genesis-state /tmp/genesis.ssz โinterop-eth1data-votes โmin-sync-peers=0 โhttp-web3provider=http://localhost:8545 โdeposit-contract 0x8A04d14125D0FDCDc742F4A05C051De07232EDa4 โpyrmont โbootstrap-node=
4.) In the same quick-merge-demo
branch, start the validator client in interop mode
bazel run //validator โ โbeacon-rpc-provider localhost:4000 โinterop-num-validators=64 โinterop-start-index=0 โclear-db
Receives from beacon node and imports new application payload to the eth1 chain
Produces new application payload using Catalyst and package payload into beacon block
Inserts beacon block application payload to Catalyst
Receives from beacon node and signs beacon block which contains application payload
Connect to Localhost 8545
and change the chain ID to the one specified in genesis.json (i.e. 220720
). Balance with your address should be reflected
Now send a transaction
To verify, you should see transaction picked up by the eth1 node
Beacon node requests eth1 application data and produces it for validator. It then inserts it back to the eth1 node. (See numTransactions=1
)
Validator signs over the block with eth1 application payload
Back in Metamask, you should see original transaction has been confirmed
Spec
Research: executable beacon chain
Research: eth1+eth2 client relationship research
Original quick merge proposal
[DRAFT] Eth1-Eth2 communication protocol