Repository navigation
Fix mainnet variant so legacy web3signer users can migrate to the generic package - #70
Merged
Merged
Conversation
…rate
- mainnet: build postgres from Dockerfile.debian. Existing mainnet
postgres_data volumes are owned by the Debian postgres uid (999); the
Alpine image (uid 70) cannot read them, which is what broke 2.0.10 in
Nov 2024.
- flyway: migrate ${POSTGRES_DB} instead of the hardcoded "web3signer"
database, and connect as ${POSTGRES_USER}. The migrate path was dormant
(schema has been at V12) but would fail for mainnet and gnosis on the
next slashing-protection migration.
- web3signer: --http-host-allowlist=* to match the legacy mainnet package
(changed there in 2.0.12).
- postgres: add the pg_isready healthcheck the legacy package had.
- mainnet manifest: restore the legacy warnings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 26, 2026
web3signer depends on flyway completing successfully. Exiting 1 while postgres is still starting relies on docker compose waiting through the restart policy; compose versions that abort `up` on the first non-zero exit make the DAppManager roll the update back. Wait up to 10 minutes (below the DAppManager's 15 minute compose timeout) for pg_isready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
We want to publish
web3signer.dnp.dappnode.eth(mainnet) from this repo instead of the archivedDAppNodePackage-web3signer. The last attempt, in Nov 2024, broke existing users and was rolled back. I checked the published IPFS images for each release in that window:PGPASSWORD=password,POSTGRES_DB=web3signer, so web3signer couldn't reach the slashing DB.mainstill builds the mainnet postgres fromDockerfile.alpine, so publishing mainnet from here today would break every existing user again.Changes
Dockerfile.debian, the samepostgres:14.1-bullseyebase, uid 999 and PG14.1-1.pgdg110+1as the legacy package. This is the critical fix.${POSTGRES_DB}instead of the hardcodedweb3signerdatabase, and connects as${POSTGRES_USER}. This path has been dormant because the schema has been at V12 for years. On the next slashing-protection migration it would fail withdatabase "web3signer" does not existfor mainnet and gnosis, and web3signer would not start.--http-host-allowlist=*, matching the legacy package since its 2.0.12. This affects all variants.pg_isreadyhealthcheck the legacy package had. This affects all variants.With these changes, the release
docker-compose.ymlthe SDK generates for mainnet matches the on-chain 2.0.17 compose except for image tags. I diffed both withdocker compose config: volumes, user, healthchecks, depends_on and restart policies are all the same.Testing
I built the mainnet variant with
dappnodesdk build --variant mainnet(arm64) and tested it against the real on-chain 2.0.17 images (/ipfs/QmYRtGpa…L9My) in a harness that mimics the DAppManager:dncorenetwork with*.web3signer.dappnodealiases, plus thesigner.mainnet.dncore.dappnodealias the stakers module adds;Upgrade 2.0.17 → this build → rollback to 2.0.17 → upgrade again: 35/35 checks passed
Database version: 12 … Exitingand exits 0./upcheckand/healthcheckrespond.brain-db.jsonare preserved.signer.mainnet.dncore.dappnodewith no signer or DB errors.Fresh install: 6/6 checks passed. Schema at V12, import, signing and slashing protection all work.
Flyway migration path: I started a DB at schema V11.
mainentrypoint fails withFATAL: database "web3signer" does not exist, and the DB stays at V11.web3signer-mainnet, and web3signer comes up healthy and signs.Negative control: the same upgrade to the
mainbuild (Alpine postgres) reproduces the 2024 failure:initdb: could not access directory "/var/lib/postgresql/data": Permission denied, postgres and flyway crash-loop, and web3signer staysCreated.dappnodesdk build --all-variantspasses. Gnosis, lukso and hoodi were only build-tested. Their runtime changes are the relaxed host allowlist, the healthcheck, and a flyway path that doesn't run while the schema is at V12.Not covered: the tracker, which needs a live beacon node and crash-loops identically on 2.0.17 in the harness, and a real DAppNode with a running consensus client.
Before publishing mainnet
release_on_demandwithvariants: mainnet) from a single commit.PGPASSWORD=mainnetandPOSTGRES_DB=web3signer-mainnet.publish patchproduces. Skipping a patch number is harmless.Added since opening
527a114):docker compose uperrors.upon that.Validation of every release order (#70, #71, #72)
I tested every state
maincan end up in:Local matrix (arm64), for mainnet, gnosis, lukso and hoodi:
Real DAppNode (amd64, DAppManager 0.2.129, Docker 29.9, Compose v5.6), installed through the DAppManager installer:
Release risk outside these PRs: DAppNode's IPFS gateways sometimes cut the trustless
?format=cardownload of large images partway (terminated). On the test node, 3 registry installs failed this way. I reproduced it once from another machine, and later attempts succeeded. It fails safe (nothing is installed), but expect some "download failed" reports right after publishing; the infra team should look at it.🤖 Generated with Claude Code