Follow the steps from the node setup docs to setup and stake the AN
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>
Stop at Step (4) before starting the node
Follow the steps to bootstrap and configure the node to run execution state indexing
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.
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.
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
Start the gateway
https://github.com/onflow/flow-evm-gateway/tree/main?tab=readme-ov-file#running
Notes:
access-node-grpc-host
should point to the local access node. Most likely localhost:9000
init-cadence-height
should be the first block the Access node has. This should be the root block that the Access node was bootstrapped with. You can check using the REST API. Look for node_root_block_height
$ 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"
}