Skip to content

Strata full node operator guide

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Docker: Make sure Docker is installed on your machine. You can download it from here.
  • Docker Compose: Ensure Docker Compose is installed. It typically comes bundled with Docker Desktop.
  • Git: To clone the repository. Download from here.

Installation

Follow these steps to set up and run the project.

1. Clone the strata repository

1
2
3
4
git clone https://github.com/alpenlabs/strata.git
cd strata
git checkout releases/0.1.0
cd docker/fullnode

Info

Only fullnode directory contents can be copied separately if it is not required to build the images from source. Adjust docker-compose.yaml file accordingly.

2. Configure environment variables

Create a .env file in the docker/fullnode directory of the repository with the following contents:

Devnet .env Content:

1
2
3
4
5
6
7
8
9
# signet
SIGNETCHALLENGE=51210367634ece54692b3a7c0e6fc15a95437bb5b39a0dbdb43886779c633af48d94c551ae
UACOMMENT=StrataSignet
NBITS=1e0377ae
ADDNODE=fnreth0dd0b1bdb71958f8cd4adcd.devnet-annapurna.stratabtc.org
# reth
SEQUENCER_HTTP=https://fnreth0dd0b1bdb71958f8cd4adcd.devnet-annapurna.stratabtc.org
# client
SEQUENCER_RPC=http://fnclient675f9eff3a682b8c0ea7423.devnet-annapurna.stratabtc.org

Warning

Fullnode must use the provided .env to connect to and sync from strata devnet chain.

3. Configure parameters

Create a params.json file in the docker/fullnode/configs directory with the following contents.

{
  "rollup_name": "alpenstrata",
  "block_time": 5000,
  "cred_rule": {
    "schnorr_key": "0xd8a85abeaa1fa435d172d82d68a0505fe7d6599b324c139e78ed9470c13b8760"
  },
  "horizon_l1_height": 50,
  "genesis_l1_height": 100,
  "operator_config": {
    "static": [
      {
        "signing_pk": "0x1e1748b8f062ce1139b5426756ad11b7e1a364daf3b16d084f46df5bf92dfefb",
        "wallet_pk": "0x94b25feb390fbefadd68f7c1eee7e0c475fea0d1fdde59ba66ab6ca819fce47c"
      },
      {
        "signing_pk": "0x737a8961bb5ea953e12b1670a9164ea00ffd612cd0a577811f53f038faf39f1a",
        "wallet_pk": "0x32ddc50b640a492959750e8a39a2c930f05a31084288d10cb855ae78e1811933"
      },
      {
        "signing_pk": "0xf96210068f4f893d8493b928706575dae7388422c402eacbc2e93f4792f9ae25",
        "wallet_pk": "0x35a40a762055beac26393847cb29eb0bc0922b06608afdec040b4454fc16c4b5"
      },
      {
        "signing_pk": "0x8d60d4af361e3cb79d921aab30427be8c73465d612919bf5bcea0f6ead3e5739",
        "wallet_pk": "0xa579fbaefafdfc69c8df75493a25a4ec5c8571e19ec09c282528655e1ae480bc"
      },
      {
        "signing_pk": "0x0b60af9549268b9351c2986f06467c0b1e10321d0d2f31a289307209d01e6121",
        "wallet_pk": "0xc03a4e02fca4e397a3ced1010b5f63225b8b4a43c7f7e6dee1873ede80337484"
      }
    ]
  },
  "evm_genesis_block_hash": "0xdebf7422deb9a84341da8cd64fcfc3867404b303920dc54d3f8444e48c168d43",
  "evm_genesis_block_state_root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  "l1_reorg_safe_depth": 4,
  "target_l2_batch_size": 64,
  "address_length": 20,
  "deposit_amount": 1000000000,
  "rollup_vk": {
    "s_p1_verifying_key": "0x005027dda93318eb6bb85acd3a924f9d6d63006672ed2ff14c87352acf538993"
  },
  "dispatch_assignment_dur": 64,
  "proof_publish_mode": {
    "timeout": 10800
  },
  "max_deposits_in_block": 8,
  "network": "signet"
}

Warning

Fullnode must use the provided params.json to be in consensus with the strata devnet chain.

4. Generate keys

Run the script to generate the necessary keys.

./genkeys.sh

Note

Ensure the script has execute permissions. You can set this using:

chmod +x genkeys.sh

The script will generate a jwt.hex file in the configs directory which is used for authentication between strata-reth and strata-client for engine-api auth-rpc.

5. Build images

Note

this step is optional. The images can be run directly from prebuilt images in ecr.

Build images for strata-client and strata-reth

docker compose build

Info

Image for signet can be built from the alpenlabs/bitcoin_signet repo.

Running the services

Once you have configured the environment and generated the necessary keys, you can start the services using Docker Compose.

docker compose up -d

Initial sync can take several hours based on network latency and machine load. The sync status can be checked using an rpc call to strata_syncStatus method:

1
2
3
4
5
6
7
8
curl --location 'localhost:8432' \
--header 'Content-Type: application/json' \
--data '{
 "jsonrpc":"2.0",
 "method":"strata_syncStatus",
 "params":[],
    "id": 1
}'

Troubleshooting

  • Service fails to start:

  • Ensure all environment variables in .env are correctly set.

  • Verify that params.json is correctly placed in the configs directory.
  • Check Docker logs for more details:

    docker compose logs -f
    
  • Ports already in use:

  • If any of the specified ports are already in use, either stop the conflicting service or modify the port mappings in the docker-compose.yml file.

  • Key Generation Issues:

  • Ensure you have the necessary permissions to execute genkeys.sh.

  • Verify that the scripts are correctly generating the jwt.hex file in the configs directory.

  • Initial Sync does not make progress or fails

  • Check that the urls provided in .env are accessible from the machine.
  • If tip_height reported from strata_syncStatus rpc call has not caught up to strata devnet and does not update over multiple calls, increase SYNC_THROTTLE_MS env in strata-client service in docker-compose.yaml and restart.
  • If FATAL ERROR: block not found: is seen in the strata-client logs after restart, delete .data/reth and .data/client directories and restart.