Skip to main content

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

Follow these steps to run the EVM node:

  1. 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 the tezos/tezos docker image, so you must build it yourself from the latest commit from the Octez source code. See Installing Octez.

  2. Set the sr_node_observer_rpc environment variable to the URL to the Smart Rollup node you set up in the previous section, such as http://localhost:8932.

  3. Set the evm_observer_dir environment variable to the directory where the node should store its local data. The default is $HOME/.octez-evm-node.

  4. 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.com

    This 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.

  5. Run this command to start the node with the Etherlink installer kernel that you built or downloaded; change the name of the installer.hex file 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.