Chains
Ethereum mainnet and four OP-Stack chains, all over their own devp2p network.
Supported chains
| Chain | ID | chain = |
|---|---|---|
| Ethereum | 1 | "mainnet" · default |
| Base | 8453 | "base" |
| OP Mainnet | 10 | "optimism" "op" |
| Unichain | 130 | "unichain" "uni" |
| World Chain | 480 | "world" |
The chain is a top-level key in the root config. Omit it and Sieve indexes Ethereum mainnet.
chain = "base" # default: "mainnet"
Everything else works the same on every chain. Contracts, events, calls, native transfers, factories, streaming, and the GraphQL API are all chain-independent.
One chain per process
The sync pipeline is built for the chain in chain = and dispatched once at startup. To index several chains, run one instance per chain, each with its own config, database, and ports. See Multiple Instances.
Databases are bound to a chain
A database is pinned to its chain on the first run. Pointing a mainnet database at chain = "base" (or any other mismatch) is refused, so state from two chains can never mix in one schema.
Use a separate database per chain, or wipe an existing one with sieve reset or --fresh.
OP-Stack notes
Blocks arrive over the chain's own devp2p network, no RPC, exactly like mainnet. Sieve follows the sequencer's unsafe head, typically within a block or two on ~1-2s blocks. Base runs its own partitioned basev0 discovery, which Sieve speaks. OP Mainnet, Unichain, and World Chain use standard superchain discovery.
Deposits (type 0x7E) are indexed like any other transaction. Events decode normally, and user deposits carrying value show up in native transfer tables with the deposit's from as the sender. The per-block L1-attributes deposit carries no value and is skipped by transfer indexing.
OP-Stack peer sets are smaller than mainnet, and many public nodes prune receipts (on Base, to roughly a month). For deep historical backfills, pin archive or serving nodes with trusted_peers. Sieve already avoids asking peers for history they advertise as pruned.
Trusted peers
Peers listed here stay connected at all times. Useful when you control an archive node and need it in the set for every backfill.
[p2p] trusted_peers = ["enode://<pubkey>@<ip>:<port>"]
Testing connectivity
sieve peers needs no database and no config. Point it at any chain to check that discovery works from your network.
sieve peers --chain base sieve peers --chain optimism sieve peers --chain unichain sieve peers --chain world
Hardforks
Base's unscheduled "Cobalt" hardfork introduces a new transaction type (0x79) and can be activated through L1 signalling. When it is scheduled, Sieve needs an update to keep following Base. The same applies to any future OP-Stack hardfork that changes the fork-id, since the handshake has to match.