Skip to content

feat: publish contract addresses and a release manifest with each release - #242

Merged
re-gius merged 8 commits into
masterfrom
re-gius/publish-deployments-artifact
Aug 25, 2026
Merged

feat: publish contract addresses and a release manifest with each release#242
re-gius merged 8 commits into
masterfrom
re-gius/publish-deployments-artifact

Conversation

@re-gius

@re-gius re-gius commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Description

Releases currently ship ABIs but no contract addresses, so a consumer gets the interface and still doesn't know how to call the contracts without scraping a doc or hardcoding a set. This publishes deployments.json (addresses per network) and release-manifest.json (what the release contains) as standalone assets and at the root of the zip, generated from the committed deployment manifests. Both are in the pre-publish asset check, so a release either carries them or doesn't publish.

It also removes the repo's two other copies of addresses: the 17-address list in DEPLOYMENTS.md, which had already drifted once (6f1e6fbc), and the PINNED_FACTORY literal in deploy-contracts.yml, now read from the manifest.

deployments/<network>/<chain-id>.json becomes the only tracked copy.

New scripts/js/release-metadata.mjs: it has no dependencies, uses cast for chain reads, with build, validate, changelog and verify. A small new workflow runs validate on PRs touching deployments/** or the contract list, so a duplicate address or malformed manifest fails there rather than when a release is cut.

Type

  • Bug fix
  • Feature
  • Breaking change
  • Documentation
  • Chore
  • Refactor
  • Security

Scope

  • Registration
  • Resolver
  • Store
  • Proof of Personhood
  • Deployment scripts
  • Tests

Related Issues

Follows #222 , which made the ABI artifact trustworthy. This PR extends that artifact with addresses.

Fixes

Fixes #118 .

Checklist

Code

  • Follows project style
  • forge build passes
  • forge test passes
  • No new compiler warnings

Testing

  • New tests added for changed behavior
  • Fuzz tests added where applicable
  • Invariant tests verified

Security

  • No new selfdestruct or delegatecall
  • Access control reviewed
  • No storage layout conflicts (for upgradeable contracts)

Documentation

  • NatSpec updated on changed interfaces
  • README updated if needed

Breaking Changes

  • No breaking changes
  • Breaking changes documented below

Breaking changes: none for on-chain behaviour or for existing release assets, which keep their names and shapes. One thing to be aware of: anything scraping the address list out of DEPLOYMENTS.md will no longer find it and should read deployments/<network>/<chain-id>.json or the published deployments.json.

How to test

Not a contracts change, so forge test exercises none of it. From a checkout of this branch:

# the two release files, from the committed manifests plus the current build
forge build && bun scripts/js/release-metadata.mjs build --tag v0.0.0-test --out /tmp/rel
cat /tmp/rel/deployments.json /tmp/rel/release-manifest.json

# what CI now runs on a manifest change; needs no build
bun scripts/js/release-metadata.mjs validate

# check a network against a live chain (needs an eth-rpc endpoint)
bun run deployments:verify --network paseo-assethub --rpc <eth-rpc-url>

The end-to-end check that matters is a dry run of Publish Beta Package with a throwaway version, the same method used to validate #237. I will run it before merging it.

Notes

The manifest is updated by hand, and stays the single source of truth. A live deploy commits only its markdown report in dotns-releases; nothing writes addresses back here. The next step after this merges is for dotns-releases to open that PR automatically. RELEASE_ARTIFACTS.md states this plainly rather than implying a mechanism that doesn't exist. The manifest is accurate today, the latest report for each live network reproduces the canonical set with no differences.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

CI Summary

Check Result
Deploy Contracts Reproduces the committed manifest; resume verified
PR Title PR Title Valid
Labels Unknown
Secret Scan Passed - No secrets detected

Deploy Contracts

Deployed addresses vs the committed manifest

Expected is the committed manifest; actual is this CI deployment of the same pipeline.

Contract Expected Actual Match
Create3Factory 0x8533c79E058c5a6489CAFeCA86dc600E029D75f5 0x8533c79E058c5a6489CAFeCA86dc600E029D75f5 match
DotnsContentResolver 0x7F74D7CD50f5a834270E2ad395a01b01891AB37d 0x7F74D7CD50f5a834270E2ad395a01b01891AB37d match
DotnsNameEscrow 0x4881Afb78e7C908cAe818168B926229D93376520 0x4881Afb78e7C908cAe818168B926229D93376520 match
DotnsNameWhitelist 0x420166cD67Ca0233094E492a4BbA67045eD7C38C 0x420166cD67Ca0233094E492a4BbA67045eD7C38C match
DotnsPopController 0xCC932348606cc1f3318cADeC5A5Cd2CA447f8a4b 0xCC932348606cc1f3318cADeC5A5Cd2CA447f8a4b match
DotnsPopResolver 0xDaC984884EcA8Fc44011f1D6C49B27828390A72B 0xDaC984884EcA8Fc44011f1D6C49B27828390A72B match
DotnsProtocolRegistry 0xD19e3D0C97CF501125a04A97405e3e6592fa846E 0xD19e3D0C97CF501125a04A97405e3e6592fa846E match
DotnsRegistrar 0x4f06E818Ba3d987704fd91cf3d868E4b019106Ab 0x4f06E818Ba3d987704fd91cf3d868E4b019106Ab match
DotnsRegistrarController 0xBdaA01bD1bA67d709F2b1fF286Da0d854977EA30 0xBdaA01bD1bA67d709F2b1fF286Da0d854977EA30 match
DotnsRegistry 0xf34054fd76BbF85f216cf9908226D5f0A72E50CA 0xf34054fd76BbF85f216cf9908226D5f0A72E50CA match
DotnsResolver 0xbd1165E549DF96F083c0A16f61590927bC187009 0xbd1165E549DF96F083c0A16f61590927bC187009 match
DotnsReverseResolver 0xee3883d7eB60Ee9BCD7F3bcD8f2f05302A9Cc035 0xee3883d7eB60Ee9BCD7F3bcD8f2f05302A9Cc035 match
LabelStoreBeacon 0xb57Ebc2e7085616d4906D1fE49af1cE13f7dffeF 0xb57Ebc2e7085616d4906D1fE49af1cE13f7dffeF match
Multicall3 0xB4468000abD87D3c56cbFBd153161223D7b109e5 0xB4468000abD87D3c56cbFBd153161223D7b109e5 match
PopRules 0x747B456bE03aec0b42bd85C51513730FBD45DA31 0x747B456bE03aec0b42bd85C51513730FBD45DA31 match
RootGatewayDispatcher 0xa889CCA3Fb4B07b98a11cc54C10f13dDA20bc3db 0xa889CCA3Fb4B07b98a11cc54C10f13dDA20bc3db match
StoreFactory 0x709A027F446a9e2a4BB9cb9a9c754435b19e32B7 0x709A027F446a9e2a4BB9cb9a9c754435b19e32B7 match
UserStoreBeacon 0xb7C995601679840d36F37E86DB2d7dF30797eC5C 0xb7C995601679840d36F37E86DB2d7dF30797eC5C match

View full logs

Labels

dependencies, other, type: docs

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file other type: docs labels Aug 20, 2026
@re-gius
re-gius marked this pull request as ready for review August 20, 2026 10:10
@re-gius

re-gius commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

New release flow, documented in RELEASE_ARTIFACTS.md. For a release that changes contract code:

  1. Cut a pre-release. It carries the ABIs and release-manifest.json, and no addresses. The code is not deployed yet at this point, so the recorded addresses still belong to the previous deployment.
  2. Deploy that tag from dotns-releases. Deploying a tag rather than a branch is what ties the addresses to the code that produced them.
  3. Record the resulting addresses in deployments/<network>/<chain-id>.json (manually for now).
  4. Cut the release from a commit that differs from the deployed tag only by that record, after running deployments:verify against the network.

A release that changes no contract code skips all of this.

Step 3 is manual today. The next piece of work is for dotns-releases to open that PR itself and make everything automated (checks, recording addresses, ...).

@sphamjoli sphamjoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collapsing the three copies of the addresses into one tracked manifest and generating the rest from it fixes the drift from 6f1e6fb. Reading the factory out of the canonical manifest at CI time instead of repeating the literal means the two cannot disagree, and running validate on PRs fails a bad manifest before a release does. A few suggestions below, mostly non-blocking; the validate() tidy-up is the one worth doing.

Comment thread scripts/js/release-metadata.mjs Outdated
Comment thread scripts/js/release-metadata.mjs Outdated
Comment thread scripts/js/release-metadata.mjs Outdated
Comment thread scripts/js/release-metadata.mjs Outdated
Comment thread scripts/js/release-metadata.mjs Outdated
Comment thread RELEASE_ARTIFACTS.md Outdated
@re-gius
re-gius requested a review from sphamjoli August 21, 2026 13:16
@sphamjoli

Copy link
Copy Markdown
Member

@re-gius please update branch not sure how the newly added contract affects this please check

@re-gius

re-gius commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@re-gius please update branch not sure how the newly added contract affects this please check

fixed in a548bf9

@re-gius
re-gius requested a review from filip-parity August 24, 2026 17:26
@sphamjoli

Copy link
Copy Markdown
Member

#239 also adds DotnsNameWhitelist to .github/abi-contracts.txt and the manifest, at the same address 0x420166cD67Ca0233094E492a4BbA67045eD7C38C. Whichever of the two merges second will conflict on those lines. The content is identical, so the resolution is trivial.

@re-gius
re-gius merged commit b428041 into master Aug 25, 2026
8 checks passed
@re-gius
re-gius deleted the re-gius/publish-deployments-artifact branch August 25, 2026 08:42
mordamax added a commit that referenced this pull request Aug 28, 2026
## Description

Extends the release artifact with pallet-revive genesis state, so a
chain can carry DotNS from block zero instead of deploying it
afterwards. `build-genesis.sh` runs the existing deploy stages against
anvil, dumps the EVM state and converts it to a `GenesisConfig` account
list.

`paritytech/preview-net-v1` does this today by cloning this repo at a
moving `master` with its own copy of `FACTORY_DEPLOYER_KEY`. Building it
here ties the artifact to the same commit and keys as the ABIs beside
it, and lets that repo drop ~790 lines and two secrets.

Follows the pattern #242 set — standalone asset, in the strict
pre-publish check, plus a small path-filtered PR workflow
(`genesis-extractor-test.yml`) that tests the extractor, mirroring
`release-metadata.yml`. Addresses are deliberately not re-emitted;
`deployments.json` stays the only copy.

The filename carries the TLD (`dotns-genesis-test.json`) because
`DOTNS_TLD` is baked into the registry initialiser, so it suits **test
networks only** — the release body says so. Address parity against
`deployments/paseo-assethub/420420417.json` is asserted, so a wrong
factory key fails the build.

## Type

- [ ] Bug fix
- [x] Feature
- [ ] Breaking change
- [ ] Documentation
- [ ] Chore
- [ ] Refactor
- [ ] Security

## Scope

- [ ] Registration
- [ ] Resolver
- [ ] Store
- [ ] Proof of Personhood
- [x] Deployment scripts
- [ ] Tests

## Related Issues

Follows #242, which made the release carry addresses. This adds genesis
state to the same artifact.

## Fixes

## Checklist

### Code

- [x] Follows project style
- [x] `forge build` passes
- [x] `forge test` passes
- [x] No new compiler warnings

### Testing

- [x] New tests added for changed behavior
- [ ] Fuzz tests added where applicable
- [ ] Invariant tests verified

### Security

- [x] No new `selfdestruct` or `delegatecall`
- [x] Access control reviewed
- [x] No storage layout conflicts (for upgradeable contracts)

### Documentation

- [ ] NatSpec updated on changed interfaces
- [ ] README updated if needed

### Breaking Changes

- [x] No breaking changes
- [ ] Breaking changes documented below

## How to test

```bash
node --test scripts/genesis/extract-genesis.test.mjs   # also runs in CI via genesis-extractor-test.yml
DOTNS_ADMIN_KEY=<key> FACTORY_DEPLOYER_KEY=<key> bash scripts/genesis/build-genesis.sh ./release
```

Ran locally: five deploy stages, 33 genesis accounts, 19 names matching
the live manifest, 9 extractor tests.

## Notes

No Solidity changed, so the contract checkboxes are inherited state
rather than something this diff exercises.

1. This deploy overlaps `deployall.sh`, which also has a factory-exists
check and the `EXPECTED_CREATE3_FACTORY` guard. Driving `deploy:all`
would be DRY-er but needs the keystore flow and the `paseo_local` alias,
which I could not test locally. The constraint if you collapse it is in
the script: the signer must stay the admin key, not
`deploy-contracts.yml`'s public anvil account.
2. Unrelated, spotted on the way past:
`.github/PULL_REQUEST_TEMPLATE.md` has a **trailing space** in its
filename, so GitHub never loads it and new PRs open blank. Happy to fix
separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file other type: docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Publish deployments and manifest as part of ABI release artifacts

2 participants