feat: publish contract addresses and a release manifest with each release - #242
Conversation
CI Summary
Deploy ContractsDeployed addresses vs the committed manifestExpected is the committed manifest; actual is this CI deployment of the same pipeline.
Labelsdependencies, other, type: docs |
|
New release flow, documented in
A release that changes no contract code skips all of this. Step 3 is manual today. The next piece of work is for |
There was a problem hiding this comment.
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.
|
@re-gius please update branch not sure how the newly added contract affects this please check |
|
#239 also adds |
# Conflicts: # DEPLOYMENTS.md
## 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.
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) andrelease-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 thePINNED_FACTORYliteral indeploy-contracts.yml, now read from the manifest.deployments/<network>/<chain-id>.jsonbecomes the only tracked copy.New
scripts/js/release-metadata.mjs: it has no dependencies, usescastfor chain reads, withbuild,validate,changelogandverify. A small new workflow runsvalidateon PRs touchingdeployments/**or the contract list, so a duplicate address or malformed manifest fails there rather than when a release is cut.Type
Scope
Related Issues
Follows #222 , which made the ABI artifact trustworthy. This PR extends that artifact with addresses.
Fixes
Fixes #118 .
Checklist
Code
forge buildpassesforge testpassesTesting
Security
selfdestructordelegatecallDocumentation
Breaking Changes
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.mdwill no longer find it and should readdeployments/<network>/<chain-id>.jsonor the publisheddeployments.json.How to test
Not a contracts change, so
forge testexercises none of it. From a checkout of this branch: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.