Skip to content

Linera bridge relayer runbook#6050

Draft
deuszx wants to merge 8 commits intotestnet_conwayfrom
dockerize-linera-bridge-relayer-impl
Draft

Linera bridge relayer runbook#6050
deuszx wants to merge 8 commits intotestnet_conwayfrom
dockerize-linera-bridge-relayer-impl

Conversation

@deuszx
Copy link
Copy Markdown
Contributor

@deuszx deuszx commented Apr 17, 2026

No description provided.

deuszx added 8 commits April 17, 2026 16:30
Returns HTTP 200 unconditionally when the axum handler runs, proving the
Tokio runtime and listener are responsive (not just the kernel TCP queue).
Used by the docker-compose healthcheck for the testnet deployment.
The bridge relayer needs MONITOR_START_BLOCK to begin its EVM scan at
the contract's deployment block instead of scanning from genesis on
every fresh deploy. Used by the testnet deployment env file generated
in the next task.
Adds a second output path next to --output that writes the env schema
expected by docker-compose.bridge-testnet.yml (different variable names
than the demo frontend env). The relayer-env file is the bridge between
provisioning (Phase 1) and the long-running relayer service (Phase 2).
Single-service compose: long-running relayer with bind-mounted persistence,
loopback metrics+health, journald logs, restart-unless-stopped. Reads its
env from /etc/linera-bridge/{.env,.env.secret} and its state from
/var/lib/linera-bridge/, both populated by setup.sh during provisioning.
Operator-facing documentation for provisioning, daily operations,
backup, observability, and troubleshooting of the long-running bridge
relayer on a testnet VM. Covers Base Sepolia + Testnet Conway.
Two related corrections from the final review:

* Healthcheck used wget, but the runtime image only ships netcat-openbsd
  (Dockerfile.bridge:95-99). Switch to a TCP probe with nc -z, matching
  the canonical pattern in docker-compose.indexer-test.yml. The /health
  route still serves any downstream collector probes.
* bridge-entrypoint.sh defaulted --port to 5001 while the Dockerfile pins
  ENV PORT=3001 and the testnet compose port-maps 3001. Aligning the
  default to 3001 removes the silent-mismatch footgun.
The previous direct-mode flow demanded --linera-bridge-chain-id and
--relay-owner from the operator, blocking testnet provisioning when
the operator hasn't manually procured a chain. Extend the wallet
resolution step to:

* Run `linera wallet init --faucet` if the wallet file doesn't exist
  at --linera-wallet
* Run `linera wallet request-chain --faucet` to claim a fresh chain
  for the bridge, capturing chain ID and owner from the output
* Skip auto-derive when the operator passed both --linera-bridge-chain-id
  and --relay-owner (backward compatible)

Pattern matches docker/docker-compose.bridge-test.yml's bridge-chain-init
service. Also: dedupe BRIDGE_DEPLOY_TX parse calls and accept either hex
or decimal in `cast receipt` blockNumber output.
* Link back to SPEC-linera-bridge-testnet-deployment.md as the plan
  intended.
* Run setup.sh as the linera-bridge user so wallet/keystore/storage
  end up uid-matched to the container; previous version silently
  created root-owned files the container couldn't read.
* Pass --shared-dir so provisioning artifacts land in
  /var/lib/linera-bridge/shared instead of a /tmp/<timestamp>/ that
  the operator can't easily find later.
* Document the new auto-bootstrap behavior so operators don't expect
  to need --linera-bridge-chain-id / --relay-owner.
* Replace Rust-identifier metric names (RELAYER_EVM_BALANCE_WEI etc.)
  with the real Prometheus names (linera_bridge_evm_balance_wei etc.);
  the previous alert rule expressions would never have matched real
  scrape data.
* Replace `curl -s .../health` with `curl -sI ... | head -1` so the
  operator actually sees the status line (the body is empty).
* Replace misleading "container should auto-restart" advice with a
  precise explanation of what `restart: unless-stopped` does + a new
  troubleshooting row for the hung-process case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant