Setup the Access node

  1. Follow the steps from the node setup docs to setup and stake the AN

    1. https://developers.flow.com/networks/node-ops/access-onchain-data/access-nodes/access-node-setup

      <aside> 💡

      Downloaded bootstrapping kit binaries are not arm64 compatible. If needed recompile from flow-go (Makefile targets: docker-build-bootstrap & docker-build-bootstrap-transit)

      </aside>

      1. If running a bare metal node, also follow the steps to build the node binary
    2. Stop at Step (4) before starting the node

  2. Follow the steps to bootstrap and configure the node to run execution state indexing

    1. If starting the node immediately after a network upgrade, use Option 1:
      1. https://developers.flow.com/networks/node-ops/access-onchain-data/access-nodes/access-node-configuration-options#option-1-enabling-indexing-at-the-beginning-of-a-spork
    2. If starting the node after the first epoch transition (>1 week after the upgrade), use Option 2:
      1. https://developers.flow.com/networks/node-ops/access-onchain-data/access-nodes/access-node-configuration-options#option-2-enabling-indexing-mid-spork
  3. In addition to the standard CLI options, include the following (update any paths or ports as desired)

    --execution-data-dir=$PWD/data/execution_data
    --execution-data-indexing-enabled=true
    --execution-state-dir=$PWD/data/execution_state
    --script-execution-mode=failover
    --event-query-mode=failover
    --tx-result-query-mode=failover
    --register-cache-size=10000
    --state-stream-addr=0.0.0.0:9000
    --state-stream-response-limit=500.0
    --state-stream-heartbeat-interval=50
    

    Note: --state-stream-addr should use the same address/port combination as --rpc-addr. This is required by the GW to allow querying both the streaming and non-streaming APIs using the same connection.

  4. Start the access node

    The node will startup and should start the API relatively quickly. It will also index the checkpoint file added in step 2, which can take some time.

    Before stopping the node, wait until you see the log message checkpoint indexing complete. Otherwise, you will need to delete the data/ directory and resync the node. Once the initial checkpoint indexing is complete, the node will be able to continue from where it left of on reboot.

Setup the Gateway

  1. Follow the steps in the readme to build the image.

    https://github.com/onflow/flow-evm-gateway/tree/main?tab=readme-ov-file#building

    If you have issues building directly, you can try building within docker, then extracting the binary

    docker build --build-arg GATEWAY_VERSION=$(git describe --tags --abbrev=0 2>/dev/null) --file Dockerfile .
    sudo docker create --name extract ee3cc0de6783
    sudo docker cp extract:/flow-evm-gateway/app ./evm-gateway
    sudo docker rm extract
    
  2. Start the gateway

    https://github.com/onflow/flow-evm-gateway/tree/main?tab=readme-ov-file#running

    Notes:

    $ curl <http://localhost:8070/v1/node_version_info>
    {
            "semver": "v0.37.6",
            "commit": "2a1e71eb64e200c7d82e8e31602c397f1939c893",
            "spork_id": "b21f01cd3bedc3fb3f716a466c05d4c384169a11091436db6f080afa087fb2f8",
            "protocol_version": "33",
            "spork_root_block_height": "211176670",
            "node_root_block_height": "213377575"
    }