Running BLAST Mainnet from Source
Please follow these steps first if you have not done so already.
#Get the data directory
The next step is to download the data directory for op-geth. You will need 500+ GB for this part alone.
Download the data directory snapshot. This is a large file so expect it to take some time. Bedrock Data Directory (XXGB)(opens new window)
Check the validity of your download. This is an important step. Corrupted data directories will make your node fail. So ensure your checksum matches.
sha256sum mainnet-bedrock.tar.zst # expected output ec4baf47e309a14ffbd586dc85376833de640c0f2a8d7355cb8a9e64c38bfcd1 mainnet-bedrock.tar.zstOR
sha512sum mainnet-bedrock.tar.zst # expected output c17067b7bc39a6daa14f71d448c6fa0477834c3e68a25e96f26fe849c12a09bffe510e96f7eacdef19e93e3167d15250f807d252dd6f6f9053d0e4457c73d5fb mainnet-bedrock.tar.zstCreate the data directory in
op-gethand fill it. This will take time.Navigate into your
op-gethdirectory and run these commands:mkdir datadir cd datadir tar xvf <<PATH_TO_DATA_DIR>>
Navigate into your
op-gethdirectory and run these commands:
#Scripts to start the different components
In the root of your working directory create a new directory: scripts.
#op-geth
op-gethNavigate into your
scriptsdirectory:Create a new file:
Make it executable:
Insert this snippet of code into
run-op-geth.shand modify the path to theop-gethdirectory.
Archive Nodes
You will also need to add --gcmode archive.
Run the following command to start
op-geth:
#bl-node
bl-nodeNavigate to the
scriptsdirectory you created.Create a new file:
Make it executable:
Insert this snippet of code into
run-bl-node.sh:
Change
<< L1 RPC URL >>to your local L1 node or a service provider's URL for the L1 node (L1 Ethereum). E.g. for Infura,https://mainnet.infura.io/v3/API_KEY.Set
L1KINDto the network provider you are using (options: alchemy, quicknode, infura, parity, nethermind, debug_geth, erigon, basic, any).
Run the following command to start
bl-node:
#The initial synchronization
The datadir provided by Blast is not updated continuously, so before you can use the node you need a to synchronize it.
During that process you get log messages from bl-node, and nothing else appears to happen.
That is normal - it means that bl-node is looking for a location in the batch queue. After a few minutes it finds it, and then it can start synchronizing.
While it is synchronizing, you can expect log messages such as these from bl-node:
And log messages such as these from op-geth:
#How long will the synchronization take?
To estimate how long the synchronization will take, you need to first find out how many blocks you synchronize in a minute. You can use this Foundry (opens new window)script to get an estimated sync time.
Navigate to your
scriptsdirectoryCreate a new file:
Make it executable:
Insert this snippet of code into
run-estimate.sh:
Run the following command to get an estimate:
#Operations
It is best to start op-geth first and shut it down last.
Last updated