Skip to content

[DO NOT MERGE] chore(scripting): skip executor-role revocation in transferOwnership#708

Open
yahgwai wants to merge 353 commits into
mainfrom
chore/owner-no-revoke
Open

[DO NOT MERGE] chore(scripting): skip executor-role revocation in transferOwnership#708
yahgwai wants to merge 353 commits into
mainfrom
chore/owner-no-revoke

Conversation

@yahgwai

@yahgwai yahgwai commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

No description provided.

yahgwai added 30 commits April 14, 2026 17:07
Add AbsInbox ABI (v1.1) with allowlist functions, 4 new actions
(buildSetAllowList, buildSetAllowListEnabled, isAllowListEnabled,
isAllowed), zod schemas with transforms, type tests, schema coverage
tests for read actions, and CLI command registration.
Replace hand-written AbsInbox ABI with wagmi-generated full Inbox ABI
across all 4 versions (v1.1, v2.1, v3.1, v3.2). Rename contract
directory and export from AbsInbox to Inbox to match the deployed
contract name. Update all action imports accordingly.
The coverage framework's trackedObject proxy returned validHex(20) for
.address, which produces identical values regardless of input because
the counter resets between runs. Replace with deterministicHex(name)
so that toAccount(pk).address varies when pk changes, enabling schema
coverage tests for build* write actions.
The Inbox ABI barely changed across versions (v1.1/v2.1 identical,
v3.1/v3.2 identical, only a new error and event added in v3.1).
Keep just v3.2 for now; older versions can be added if needed.
…tion schemas

The build* actions take account: Address, not a private key. The schemas
should only require what the function actually needs.
…ction schemas

The build* actions take account: Address, not a private key. The schemas
should only require what the function actually needs.
# Conflicts:
#	package.json
#	pnpm-lock.yaml
Add publicClientSchema, parentChainPublicClientSchema, and
actionWriteBaseSchema to common.ts. Add withPublicClient helper to
viemTransforms.ts. Update 26 schema files to extend base schemas
instead of redeclaring fields. Simplify 9 destructure-and-spread
transforms to use withPublicClient.
Inline parentChainPublicClientSchema directly instead of assigning
it to a local alias. Use .extend().strict() instead of z.strictObject()
with .shape extraction.
Add connection transform functions (withPublicClient, withParentChainPublicClient,
withChainSign, withParentChainSign, withChildChainSign, withParentReadChildSign,
withPublicClientPositional, withPublicClientOptionalChain) to viemTransforms.ts.

Every schema now has its transform baked in via .transform(), eliminating
separate transform/resolver exports. Schemas export a single pre-transformed
schema that consumers use directly.

Move upgradeExecutor ?? false default into actionWriteBaseSchema.
…forms

cli.ts now uses cmd(schema, fn) directly since schemas have transforms
baked in. schemaCoverage.ts mocks updated for all connection transforms.
# Conflicts:
#	src/scripting/schemaCoverage.ts
yahgwai added 26 commits April 24, 2026 17:07
…i-rc

# Conflicts:
#	src/scripting/schemaCoverage.unit.test.ts
#	src/scripting/workflows/deployFullChain.ts
#	src/scripting/workflows/initializeTokenBridge.ts
# Conflicts:
#	src/scripting/commands.ts
#	src/scripting/schemaCoverage.unit.test.ts
Move deployFullChain, deployNewChain, initializeTokenBridge, and
transferOwnership from examples/ to workflows/ to reflect that they are
runnable end-to-end workflows rather than single-call demos. Update
commands.ts import paths accordingly. No content changes.
…i-rc

# Conflicts:
#	src/scripting/workflows/deployFullChain.ts
…d chainConfig

A populated genesisAssertionState bakes a precomputed L2 genesis block hash
into the assertion. Reproducing that hash at validator boot requires both
the on-chain init message's currentDataCost and the serialized chainConfig
to match what genesis-file-generator used; mismatches surface late as
ASSERTION_NOT_EXIST on the first stakeOnNewAssertion. The contract treats
dataCostEstimate=0 as a sentinel and substitutes block.basefee, so an
explicit non-zero value is required, and chainConfig must be supplied so
the SDK default doesn't silently diverge from genesis.json.

The check lives in refineV3Dot2CustomGenesis and is applied at every
consumer of paramsV3Dot2Schema (prepareDeploymentParamsConfigV32,
deployNewChain, deployFullChain).
Adds an optional `allowListParams` field to the deployFullChain input,
letting callers populate the parent-chain inbox allow-list and toggle the
gate as part of the same one-shot deploy. The new step runs between
token-bridge init and ownership transfer, while the deployer still holds
the parent EXECUTOR role; calls go through the parent UpgradeExecutor via
the existing buildSetAllowList / buildSetAllowListEnabled helpers.
# Conflicts:
#	src/scripting/workflows/deployFullChain.ts
Drop branch-specific cli-rc tags and restore multi-arch (amd64+arm64).
- Lift the workflow-local chainConfig schema into a shared
  chainConfigInputSchema in schemas/common.ts. Accepts either the tunable
  subset or a full ChainConfig pasted from genesis.json -- fixed fields are
  validated with z.literal and otherwise dropped, so callers don't have to
  filter genesis.json down to the Arbitrum-tunable subset.
- Add refineChainIdMatch in createRollupPrepareDeploymentParamsConfig and
  apply it from deployNewChain and deployFullChain. The top-level chainId
  (uint256, on the RollupCreator call) and chainConfig.chainId (number,
  baked into Nitro's runtime config) identify the same chain; mismatched
  values would launch the rollup contract and Nitro with broken state.
  chainId is no longer auto-generated since it must agree with the
  user-supplied chainConfig.chainId.
- Extend assertSchemaCoverage with a skip parameter for validator-only
  z.literal gates (the new chainConfigInputSchema fields whose presence
  cannot affect transform output) and surface parse failures as observable
  behavior so cross-field refines (refineChainIdMatch) keep their fields
  classified as live during fuzzing. The harness fails if a skip entry is
  not actually dead, so the lists stay accurate as the schema evolves.
Catches typos like InitialChainOnwer/MaxCodSize that previously slipped
through the transform's projection silently. Top level stays lax to
absorb future Nitro/Ethereum genesis additions.
Cross-field invariants like `refineChainIdMatch` cannot be exercised by
mutating one leaf in isolation -- the resulting fixture fails parse, so
the new value never reaches the SDK and coverage on those leaves can't
be observed by SDK output diffing.

Add an optional `mutations` config to `assertSchemaCoverage` that lets a
test declare paired updates: when a listed leaf is mutated, the harness
also applies derived values to the named siblings. The fixture stays
valid, the SDK is called with the new value, and dead-field detection
proceeds via the normal output-diff comparison.

Use it for the chainId pair on deployFullChain and deployNewChain.
Split dependency download from source copy: `pnpm fetch` only re-runs
when the lockfile changes, so source edits hit the install/build steps
without redownloading deps.

Run the final image as the unprivileged `node` user that ships with
node:alpine. `--chown=node:node` on the COPY commands ensures the
runtime files are owned by it.
Custom genesis bakes a precomputed L2 genesis hash into the assertion;
reproducing it at validator boot requires the serialized chainConfig to
match genesis-file-generator's exactly. Letting tunable arbitrum fields
fall through to prepareChainConfig defaults silently breaks that match
and validators revert with ASSERTION_NOT_EXIST on first stake.
- Limit GITHUB_TOKEN to contents:read (least privilege).
- Layer pnpm fetch separately so dependency download caches across
  source-only edits.
- Run container as non-root node user.
@yahgwai yahgwai changed the title chore(scripting): skip executor-role revocation in transferOwnership [DO NOT MERGE] chore(scripting): skip executor-role revocation in transferOwnership Apr 30, 2026
Base automatically changed from feat/cli-rc to main May 11, 2026 10:05
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