Set up a permissionless node
In addition to the core stack, you can also attach and synchronize a permissionless node.
Prerequisites¶
-
You have followed the deployment guide and have a running CDK stack.
-
Grab the genesis file artifact and add it to the
permissionless_node
kurtosis package.
rm -r /tmp/zkevm
kurtosis files download cdk-v1 genesis /tmp
cp /tmp/genesis.json templates/permissionless-node/genesis.json
Add permissionless node to the enclave¶
Run the following command:
kurtosis run --enclave cdk-v1 --args-file params.yml --main-file zkevm_permissionless_node.star .
Sync an external permissionless node¶
You can also use the package you have just set up to sync data from a production network.
-
Some of the parameters in the Kurtosis genesis file need to be replaced, or better still you could replace the whole genesis file with one representing the external network.
The parameters that need to change in the file are as follows:
"rollupCreationBlockNumber": 22, "rollupManagerCreationBlockNumber": 18, "genesisBlockNumber": 22, "L1Config": { "chainId": 271828, "polygonZkEVMGlobalExitRootAddress": "0x1f7ad7caA53e35b4f0D138dC5CBF91aC108a2674", "polygonRollupManagerAddress": "0x2F50ef6b8e8Ee4E579B17619A92dE3E2ffbD8AD2", "polTokenAddress": "0xEdE9cf798E0fE25D35469493f43E88FeA4a5da0E", "polygonZkEVMAddress": "0x1Fe038B54aeBf558638CA51C91bC8cCa06609e91" }
Tip
The run-contract-setup.sh file may help you understand how these fields populate.
-
When you have the updated genesis file is ready, drop it into
./templates/permissionless-node/genesis.json
. -
In addition to the genesis setup, tweak the parameter
l1_rpc_url
in the params.yml file:l1_rpc_url: http://el-1-geth-lighthouse:8545
->l1_rpc_url: <MY_L1_URL>
Tip
- There are other parameters that seem like they should be changed, e.g.
l1_chain_id
, but they aren’t used for the permissionless setup.
- There are other parameters that seem like they should be changed, e.g.
-
Now you can start synchronizing with the following command:
kurtosis run --enclave cdk-v1 --args-file params.yml --main-file zkevm_permissionless_node.star .