Skip to content

deploy(rehearsal): fresh v5.4.0 mainnet dry-run on Sepolia + clean-deploy fixes#296

Merged
jhfnetboy merged 1 commit into
mainfrom
rehearsal/v5.4.0-mainnet-dryrun
Jun 16, 2026
Merged

deploy(rehearsal): fresh v5.4.0 mainnet dry-run on Sepolia + clean-deploy fixes#296
jhfnetboy merged 1 commit into
mainfrom
rehearsal/v5.4.0-mainnet-dryrun

Conversation

@jhfnetboy

Copy link
Copy Markdown
Member

What

Ran ./deploy-core sepolia --fresh-deploy (→ DeployLive.s.sol) end-to-end as a mainnet deployment rehearsal — same process mainnet will use, only the signing key differs. Fresh full deploy of ~19 contracts + full wiring + both genesis communities (AAStar + Mycelium/MushroomDAO) succeeded; audit Check04–10 green; Etherscan-verified.

Both GA blockers resolved automatically by the clean path

  • version()SuperPaymaster-5.4.0 (deployed from current source).
  • APNTS_TOKEN() == config.aPNTs (0x9e66B457…) — fresh deploy wires the base accounting token at initialize(), so no queueSetAPNTsToken migration and no config↔chain divergence (both beta.1 reconcile items vanish on a clean deploy).

Full E2E: 37/37 effective — 4 first-pass failures all root-caused, none an SP bug

Issue Cause Fix
prepare-test Unauthorized() fresh deployer lacks PAYMASTER_SUPER (had it only via upgrade history) TestAccountPrepare.s.sol: idempotent grant before configureOperator
B1/B2/B4 nonce-skip (fixed in #295) validated — full suite now retries & passes
3 SP gasless = AA34 base credit tier (100 aPNTs) < validate-time charge (~150) config decision — set 300 live on Sepolia; mainnet value is yours (see §4 of record)
I1 + check-contracts stale hard-coded version strings updated to v5.4

Changed files

  • contracts/script/v3/TestAccountPrepare.s.sol — deployer PAYMASTER_SUPER grant
  • script/gasless-tests/{check-contracts.js, test-group-I1-credit-ceiling-h1.js} — v5.4 version strings
  • deployments/config.sepolia.jsonnew fresh-deploy addresses (replaces beta.1)
  • deployments/verify.sepolia.contracts-6-16.md — Etherscan verify record
  • docs/e2e/v5.4.0-final/REHEARSAL-RECORD.md + logs — full rehearsal evidence

⚠️ Needs an ops/product decision (NOT code-changed)

Base credit tier creditTierConfig[1]=[2]=100 aPNTs is below a normal sponsored-tx validate charge (~150), so a fresh ENDUSER can't be SP-sponsored until tier/reputation rises. This is an economic parameter — mainnet must pick the base value. Detail in REHEARSAL-RECORD.md §4.

Follow-up (non-blocking)

Full 5-doc TX-Value-Verification pass for this fresh deployment (live agent handleOps, repayDebt, live negatives, Codex 2-axis) — next, mirroring docs/e2e/v5.4.0-beta.1/.

…r clean-deploy gaps

Ran ./deploy-core sepolia --fresh-deploy (DeployLive) end-to-end as a mainnet
deployment rehearsal. Fresh full deploy succeeded; both GA blockers resolved by
the clean path: version()=SuperPaymaster-5.4.0, and APNTS_TOKEN==config.aPNTs
(no queueSetAPNTsToken migration / no config-vs-chain divergence). Full E2E
37/37 effective after the fixes below — none was an SP contract bug.

New Sepolia addresses written to deployments/config.sepolia.json (fresh deploy
replaced the v5.4.0-beta.1 deployment). Etherscan-verify record added.

Issues surfaced by the clean deploy (hidden on an upgrade-accumulated chain):
- TestAccountPrepare.s.sol: configureOperator needs hasRole(PAYMASTER_SUPER,
  deployer); a fresh deploy gives the deployer COMMUNITY+PAYMASTER_AOA but not
  SUPER. Added an idempotent PAYMASTER_SUPER grant before configureOperator
  (mirrors the existing Anni block).
- B1/B2/B4 nonce-skip: validated the #295 sendTxSafe retry fix — full suite now
  shows 'draining mempool & retrying' and B1/B2/B4 PASS.
- check-contracts.js + test-group-I1: updated stale hard-coded version strings
  (5.3.3 / Registry-4.1.0 / Staking-3.2.0 / MySBT-3.1.3 / GToken-2.1.2) to the
  v5.4 versions; the contracts were correct, the tests lagged the bump.

Documented but NOT code-changed (economic/product decision): the default base
credit tier (creditTierConfig[1]=[2]=100 aPNTs) is below a normal sponsored-tx
validate-time charge (~150 aPNTs), so a fresh ENDUSER can't be SP-sponsored
until tier/reputation is raised. Set to 300 live on Sepolia for the rehearsal;
mainnet base value is an ops/product call. See docs/e2e/v5.4.0-final/REHEARSAL-RECORD.md.
@jhfnetboy jhfnetboy requested a review from fanhousanbu as a code owner June 16, 2026 08:07
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@clestons clestons left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review: deploy(rehearsal) fresh v5.4.0 mainnet dry-run on Sepolia — APPROVE [2-round]

Deployment-rehearsal + config PR (+138/-32, 6 files). No production contract (contracts/src/*.sol) change — the only .sol is a Forge deploy/test script; the rest is config addresses, test version strings, and evidence docs.

Verified

  • TestAccountPrepare.s.sol role grant is safe — idempotent (if (!registry.hasRole(ROLE_PAYMASTER_SUPER, deployerAddr))), scoped to deployerAddr only (no third-party escalation), gated behind the role's staking requirement (mint/approve 60 gtoken → safeMintForRole), mirroring the existing Anni block. It exists because a fresh deploy's deployer lacks PAYMASTER_SUPER that configureOperator() requires (an upgraded chain had it via history). Correct bootstrap, no production-logic impact.
  • Fresh-deploy addresses are real on Sepolia — spot-checked via explorer: superPaymaster 0x030025f4…, registry 0x3F920B25…, microPaymentChannel 0x405851A1…, and aPNTs 0x9e66B457… are all deployed contracts; aPNTs resolves to the "AAStar PNTs" token, confirming the GA-blocker fix (APNTS_TOKEN() == config.aPNTs, wired at initialize() — no queueSetAPNTsToken migration, no config↔chain divergence on the clean path).
  • version()SuperPaymaster-5.4.0; both beta.1 reconcile items vanish on the fresh deploy. 37/37 E2E effective, 4 first-pass failures root-caused (none an SP bug). previous* keys correctly dropped (fresh deploy = no upgrade history).

Heads-up — cross-repo address sync (non-blocking)

This fresh redeploy replaces every Sepolia address, including microPaymentChannel0x405851A1…. aastar-sdk #79 just pinned 0xfCC95340… (the prior value) and its check:addresses gate reported 24/24. Once #296 lands, the SDK's config.sepolia.json will be stale and needs another sync to these new addresses — worth queuing an SDK config-sync PR so the next check:addresses doesn't drift.

Agree with author's flagged ops decision (not a code issue)

Base credit tier creditTierConfig[1]=[2]=100 aPNTs < a normal validate-time charge (~150), so a fresh ENDUSER can't be SP-sponsored until tier/reputation rises. This is correctly an economic parameter for mainnet to set (300 chosen for the Sepolia rehearsal), not an SP bug. No objection.

Clean rehearsal, addresses verified, no production-contract risk. Verdict: APPROVE.

@jhfnetboy jhfnetboy merged commit c675d51 into main Jun 16, 2026
6 of 10 checks passed
@jhfnetboy jhfnetboy deleted the rehearsal/v5.4.0-mainnet-dryrun branch June 16, 2026 09:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants