├── .gitignore ├── .env.example ├── mainnet ├── .config └── rollup.json ├── sepolia ├── .config └── rollup.json ├── README.md └── docker-compose.yml /.gitignore: -------------------------------------------------------------------------------- 1 | blast-geth-data/ 2 | jwt.txt 3 | 4 | .env -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # NETWORK should be mainnet or sepolia 2 | NETWORK=mainnet 3 | GETH_DATA_DIR=blast-geth-data 4 | L1_RPC_URL="your_l1_rpc_url" 5 | L1_RPC_KIND="any" 6 | OP_NODE_L1_BEACON="your_l1_beacon_api_url" 7 | -------------------------------------------------------------------------------- /mainnet/.config: -------------------------------------------------------------------------------- 1 | GETH_ROLLUP_SEQUENCERHTTP=https://sequencer.blast.io 2 | OP_NODE_P2P_BOOTNODES=enr:-J64QGwHl9uYLfC_cnmxSA6wQH811nkOWJDWjzxqkEUlJoZHWvI66u-BXgVcPCeMUmg0dBpFQAPotFchG67FHJMZ9OSGAY3d6wevgmlkgnY0gmlwhANizeSHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaECg4pk0cskPAyJ7pOmo9E6RqGBwV-Lex4VS9a3MQvu7PWDdGNwgnZhg3VkcIJ2YQ,enr:-J64QDge2jYBQtcNEpRqmKfci5E5BHAhNBjgv4WSdwH1_wPqbueq2bDj38-TSW8asjy5lJj1Xftui6Or8lnaYFCqCI-GAY3d6wf3gmlkgnY0gmlwhCO2D9yHb3BzdGFja4Sx_AQAiXNlY3AyNTZrMaEDo4aCTq7pCEN8om9U5n_VyWdambGnQhwHNwKc8o-OicaDdGNwgnZhg3VkcIJ2YQ 3 | GETH_OVERRIDE_CANYON=0 4 | GETH_OVERRIDE_ECOTONE=1716843599 5 | -------------------------------------------------------------------------------- /sepolia/.config: -------------------------------------------------------------------------------- 1 | GETH_ROLLUP_SEQUENCERHTTP=https://sequencer.s2.testblast.io 2 | OP_NODE_P2P_BOOTNODES=enr:-J-4QM3GLUFfKMSJQuP1UvuKQe8DyovE7Eaiit0l6By4zjTodkR4V8NWXJxNmlg8t8rP-Q-wp3jVmeAOml8cjMj__ROGAYznzb_HgmlkgnY0gmlwhA-cZ_eHb3BzdGFja4X947FQAIlzZWNwMjU2azGhAiuDqvB-AsVSRmnnWr6OHfjgY8YfNclFy9p02flKzXnOg3RjcIJ2YYN1ZHCCdmE,enr:-J-4QDCVpByqQ8nFqCS9aHicqwUfXgzFDslvpEyYz19lvkHLIdtcIGp2d4q5dxHdjRNTO6HXCsnIKxUeuZSPcEbyVQCGAYznzz0RgmlkgnY0gmlwhANiQfuHb3BzdGFja4X947FQAIlzZWNwMjU2azGhAy3AtF2Jh_aPdOohg506Hjmtx-fQ1AKmu71C7PfkWAw9g3RjcIJ2YYN1ZHCCdmE 3 | GETH_OVERRIDE_CANYON=0 4 | GETH_OVERRIDE_ECOTONE=1713999600 -------------------------------------------------------------------------------- /mainnet/rollup.json: -------------------------------------------------------------------------------- 1 | { 2 | "genesis": { 3 | "l1": { 4 | "hash": "0xfcfb8d586bdae763f1189988789211c69eb893a895e7ba48be3ca6289f0941b7", 5 | "number": 19300102 6 | }, 7 | "l2": { 8 | "hash": "0xb689b35ef29d0bec5816938e0e52683c7257d2e325420ea69b739a2be4754b89", 9 | "number": 0 10 | }, 11 | "l2_time": 1708809815, 12 | "system_config": { 13 | "batcherAddr": "0x415c8893d514f9bc5211d36eeda4183226b84aa7", 14 | "overhead": "0x00000000000000000000000000000000000000000000000000000000000000bc", 15 | "scalar": "0x00000000000000000000000000000000000000000000000000000000000a6fe0", 16 | "gasLimit": 30000000 17 | } 18 | }, 19 | "block_time": 2, 20 | "max_sequencer_drift": 600, 21 | "seq_window_size": 3600, 22 | "channel_timeout": 300, 23 | "l1_chain_id": 1, 24 | "l2_chain_id": 81457, 25 | "regolith_time": 0, 26 | "canyon_time": 0, 27 | "delta_time": 1716843599, 28 | "ecotone_time": 1716843599, 29 | "taiga_time": 1746612311, 30 | "batch_inbox_address": "0xff00000000000000000000000000000000081457", 31 | "deposit_contract_address": "0x0ec68c5b10f21effb74f2a5c61dfe6b08c0db6cb", 32 | "l1_system_config_address": "0x5531dcff39ec1ec727c4c5d2fc49835368f805a9", 33 | "protocol_versions_address": "0x0000000000000000000000000000000000000000" 34 | } -------------------------------------------------------------------------------- /sepolia/rollup.json: -------------------------------------------------------------------------------- 1 | { 2 | "genesis": { 3 | "l1": { 4 | "hash": "0x17728cf4d8e0b4f292d2390a869fd7c632d39e72efb00ca3462b4387c6aa2437", 5 | "number": 5044255 6 | }, 7 | "l2": { 8 | "hash": "0x26a1c0faad7b041f34569a1bb383f00ab74b335883a44bed53e9f41ced5fd906", 9 | "number": 0 10 | }, 11 | "l2_time": 1704686688, 12 | "system_config": { 13 | "batcherAddr": "0xba26fee2fa917443e05e65de8d4350bcd2f59222", 14 | "overhead": "0x00000000000000000000000000000000000000000000000000000000000000bc", 15 | "scalar": "0x00000000000000000000000000000000000000000000000000000000000a6fe0", 16 | "gasLimit": 30000000 17 | } 18 | }, 19 | "block_time": 2, 20 | "max_sequencer_drift": 600, 21 | "seq_window_size": 3600, 22 | "channel_timeout": 300, 23 | "l1_chain_id": 11155111, 24 | "l2_chain_id": 168587773, 25 | "regolith_time": 0, 26 | "canyon_time": 0, 27 | "delta_time": 1713999600, 28 | "ecotone_time": 1713999600, 29 | "taiga_time": 1745589600, 30 | "pectra_blob_schedule_time": 1745589600, 31 | "batch_inbox_address": "0x1c3b85a2108784eab6a4bf56cdd6f722e415b331", 32 | "deposit_contract_address": "0x2757e4430e694f27b73ec9c02257cab3a498c8c5", 33 | "l1_system_config_address": "0x329faf078c364a316e08bf6a17b7eee6ae75a613", 34 | "protocol_versions_address": "0x0000000000000000000000000000000000000000" 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deploying a Blast Node 2 | 3 | This repo explains how to run a node for the [Blast](https://blast.io) L2 network. Blast is a fork of Optimism, so the deployment process is the same as that of a typical OP stack chain. 4 | 5 | ## Prereqs 6 | 7 | 1. Install [docker](https://docs.docker.com/engine/install/) 8 | 9 | 2. Copy the `.env.example` file to `.env` and set the values accordingly: 10 | 11 | - NETWORK: `Blast network, value should be mainnet or sepolia` 12 | - GETH_DATA_DIR: `Relative path to the directory that will store chain data` 13 | - L1_RPC_URL: `Your L1 RPC endpoint` 14 | - L1_RPC_KIND: `The type of RPC provider; valid options are: alchemy, quicknode, infura, parity, nethermind, debug_geth, erigon, basic, any` 15 | - OP_NODE_L1_BEACON: `Your L1 Beacon api endpoint` 16 | 17 | ## Running the node 18 | 19 | ``` 20 | # pull the latest images to stay up to date 21 | docker compose pull --policy=always 22 | 23 | # run the node 24 | docker compose up 25 | 26 | # if you want to run it in the background, use 27 | # docker compose up -d 28 | ``` 29 | 30 | To test your node, you can run the following command to query the latest L2 block. Note that you will need to wait for your node to fully sync before this command will return the actual latest block. 31 | 32 | ``` 33 | curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false]}' -H "Content-Type: application/json" http://localhost:9545 34 | ``` 35 | 36 | **To fully participate in p2p, please ensure TCP/UDP is allowed on port 9003, and add the argument `--p2p.advertise.ip=` to the `op-node` service in the `docker-compose.yml` file.** 37 | 38 | ## Advanced usage 39 | 40 | If you have custom deployment requirements, you may need to build the node software yourself. See [here](https://safe-violet-16b.notion.site/Blast-Deployment-Docs-b2f2b7b3c9a645fe8d6ce49fb963a467) for additional instructions. 41 | 42 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | services: 3 | # generate jwt.txt if it's absent 4 | generate-jwt: 5 | image: blastio/openssl 6 | pull_policy: always 7 | volumes: 8 | - $PWD:/blast:rw 9 | command: > 10 | sh -c "[ ! -f /blast/jwt.txt ] && openssl rand -hex 32 | tr -d '\n' > /blast/jwt.txt || exit 0" 11 | # initialise geth db 12 | geth-init: 13 | image: blastio/blast-geth:${NETWORK} 14 | pull_policy: always 15 | volumes: 16 | - $PWD:/blast:rw 17 | entrypoint: /bin/sh 18 | command: > 19 | -c "[ ! -d /blast/${GETH_DATA_DIR}/geth ] && /usr/local/bin/geth init --datadir=/blast/${GETH_DATA_DIR} /blast/${NETWORK}/genesis.json || exit 0" 20 | depends_on: 21 | generate-jwt: 22 | condition: service_completed_successfully 23 | env_file: 24 | - .env 25 | - ${NETWORK}/.config 26 | blast-geth: 27 | image: blastio/blast-geth:${NETWORK} 28 | pull_policy: always 29 | volumes: 30 | - $PWD:/blast 31 | ports: 32 | - "9545:9545" 33 | - "9546:9546" 34 | command: > 35 | --datadir=/blast/${GETH_DATA_DIR} 36 | --http 37 | --http.corsdomain="*" 38 | --http.vhosts="*" 39 | --http.addr=0.0.0.0 40 | --http.port=9545 41 | --http.api=web3,debug,eth,txpool,net,engine 42 | --ws 43 | --ws.addr=0.0.0.0 44 | --ws.port=9546 45 | --ws.origins="*" 46 | --ws.api=debug,eth,txpool,net,engine 47 | --authrpc.addr="0.0.0.0" 48 | --authrpc.port="8551" 49 | --authrpc.vhosts="*" 50 | --authrpc.jwtsecret=/blast/jwt.txt 51 | --syncmode=full 52 | --gcmode=archive 53 | --nodiscover 54 | --maxpeers=0 55 | --rollup.disabletxpoolgossip=true 56 | networks: 57 | - blast-net 58 | env_file: 59 | - .env 60 | - ${NETWORK}/.config 61 | depends_on: 62 | geth-init: 63 | condition: service_completed_successfully 64 | op-node: 65 | image: blastio/blast-optimism:${NETWORK} 66 | pull_policy: always 67 | volumes: 68 | - $PWD:/blast 69 | ports: 70 | - "9003:9003" 71 | command: > 72 | op-node 73 | --l1="$L1_RPC_URL" 74 | --l1.rpckind="$L1_RPC_KIND" 75 | --l2="http://blast-geth:8551" 76 | --l2.jwt-secret=/blast/jwt.txt 77 | --rollup.config="/blast/${NETWORK}/rollup.json" 78 | depends_on: 79 | - blast-geth 80 | networks: 81 | - blast-net 82 | env_file: 83 | - .env 84 | - ${NETWORK}/.config 85 | 86 | networks: 87 | blast-net: 88 | driver: bridge --------------------------------------------------------------------------------