Running an Etherlink EVM node
The Etherlink EVM nodes are responsible for maintaining a copy of the Etherlink context and applying new blueprints that process EVM transactions.
Prerequisites
- Make sure you understand the interaction between different nodes as described in Etherlink architecture.
- Run an Etherlink Smart Rollup node as described in Running an Etherlink Smart Rollup node. Public Smart Rollup nodes for Etherlink are not yet available, so you must run your own if you want to participate in the Etherlink network.
- Get the Etherlink installer kernel (
installer.hexfile), which you can build yourself as described in Building the Etherlink kernel or download here: installer.hex.
Running an Etherlink EVM node
Follow these steps to run the EVM node:
-
Get a built version of the EVM node binary, named
octez-evm-node. Octez does not yet provide a binary build of the EVM node as part of its binary distribution or in thetezos/tezosdocker image, so you must build it yourself from the latest commit from the Octez source code. See Installing Octez. -
Set the
sr_node_observer_rpcenvironment variable to the URL to the Smart Rollup node you set up in the previous section, such ashttp://localhost:8932. -
Set the
evm_observer_direnvironment variable to the directory where the node should store its local data. The default is$HOME/.octez-evm-node. -
Initialize the node by running this command:
octez-evm-node init config --devmode \
--data-dir $evm_observer_dir --rollup-node-endpoint $sr_node_observer_rpc \
--preimages-endpoint https://snapshots.eu.tzinit.org/etherlink-mainnet/wasm_2_0_0 \
--evm-node-endpoint https://node.mainnet.etherlink.comThis configuration uses the preimages that the Tezos Foundation hosts on a file server on a so-called "preimages endpoint". It's safe to use these preimages because the node verifies them. If you don't want to use third-party preimages, you can build the kernel yourself and move the contents of the
wasm_2_0_0/directory to the local data directory; see Building the Etherlink kernel. However, in this case, you must manually update this directory with the preimages of every kernel voted by the community and deployed on Etherlink after that. -
Run this command to start the node with the Etherlink installer kernel that you built or downloaded; change the name of the
installer.hexfile in the command accordingly:octez-evm-node run observer --data-dir $evm_observer_dir --initial-kernel installer.hex
By default, the EVM node exposes its JSON RPC API endpoint to localhost:8545.
You can test that everything works as expected by running RPC requests manually or by setting your wallet to use your local node.