Add a prt option to rollupsContracts, and move to rollups-contracts 3.0.0-alpha.10 - #162
Merged
tuler merged 5 commits intoSep 2, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: 298f0f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
tuler
force-pushed
the
claude/wagmi-plugin-version-bump-e8wqpt
branch
from
August 17, 2026 12:44
5fbf1fc to
0c9a591
Compare
This was referenced Aug 19, 2026
Base automatically changed from
claude/wagmi-plugin-version-bump-e8wqpt
to
prerelease/v2-alpha
August 19, 2026 19:24
tuler
force-pushed
the
claude/rollups-prt-contracts-import-202p0s
branch
3 times, most recently
from
August 24, 2026 19:57
b7fa215 to
b524656
Compare
tuler
force-pushed
the
claude/rollups-prt-contracts-import-202p0s
branch
from
August 31, 2026 22:47
b524656 to
4b33b74
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…a.10 The release is additive in its ABIs: it publishes the ERC-165, ERC-20, ERC-721 and ERC-1155 interfaces its contracts are compiled against, 12 names in all, and no existing ABI changed. `@cartesi/client` and `@cartesi/react` generate those alongside what they generated before; `@cartesi/codec` keeps its own `include` list and is unaffected. Every deployment address changed, though, on the livenets and the devnet alike, so regenerating breaks all three for anyone reading an address off them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dyPxGkLKcxgyECXkVKqae
tuler
force-pushed
the
claude/rollups-prt-contracts-import-202p0s
branch
from
September 1, 2026 01:46
9d48ba7 to
43b0253
Compare
tuler
marked this pull request as ready for review
September 1, 2026 01:51
guidanoli
reviewed
Sep 1, 2026
Generate the contracts of a PRT (Permissionless Refereed Tournaments) deployment from a dave release, defaulting to v3.0.0-alpha.4. A PRT deployment *is* a rollups deployment: it runs against the same InputBox, portals and factories, at the same addresses, and adds the consensus and tournament contracts that settle epochs by tournament rather than by authority. So this is not a second plugin but an option, and what it generates is a strict superset of `rollupsContracts()` — every contract it generated before, with the same ABI and the same address, plus 31 more. It is one or the other in a config, never both. dave publishes the PRT contracts and the deployment addresses, but does not rebuild the rollups contracts: 44 of them, `InputBox` and the portals among them, have no artifact in its release. So `Release.artifacts` takes a list of tarballs, and `prt` reads the rollups ABIs from the rollups-contracts one and everything else from dave, whose addresses cover both. The two releases have to pair — dave alpha.4 is built and deployed against rollups-contracts alpha.10 — which is why one `prt: true` picks the defaults for both rather than letting them drift apart. Modelling it this way retires two workarounds the separate plugin needed: the shared-contract exclusion list, since one plugin emitting a merged set cannot collide with itself, and the "deployment without an artifact" escape hatch, since the merged artifacts now cover every address dave publishes. The tarball reading shared with a plain rollups release moves to release.ts, and grows what the dave layout needs: `.sol` directories are searched at any depth, so a tarball holding one foundry build per contracts project works as well as one holding a single `out`; and a contract several tarballs build is generated once, its copies compared as unordered sets of canonicalized ABI entries so that compiler ordering does not make equivalent ABIs look like a conflict. Extractions are also collected as they land rather than awaited together, so the directories of the downloads that succeeded are removed when a sibling download fails. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dyPxGkLKcxgyECXkVKqae
0.8.0 is a breaking release, but only for the web entrypoint: it dropped the gzip helpers, changed what `createTarDecoder()` returns, and narrowed some packing result types. This package imports `unpackTar` from `modern-tar/fs` and nothing else, whose signature, `UnpackOptionsFS` and path-traversal guards are byte-identical between 0.7.7 and 0.8.4. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dyPxGkLKcxgyECXkVKqae
tuler
force-pushed
the
claude/rollups-prt-contracts-import-202p0s
branch
from
September 1, 2026 18:37
29d96ce to
8c4eb9d
Compare
guidanoli
reviewed
Sep 1, 2026
Take @guidanoli's review suggestions on the PRT documentation. They give the context the pages were missing — what PRT is, and why an application would want it over Authority or Quorum — and drop the low-level framing where the higher-level statement is what matters: that the ABIs of a contract several projects build have to match, not how they are compared. They also settle the wording. `prt` reads as additive throughout now rather than as a choice between two things: PRT Rollups is a superset of the core rollups contracts, so the option generates code for them "as well" rather than "instead". The plugin's own doc comment, CLAUDE.md and the changeset followed, since they carried the contrasting phrasing the suggestions removed from the docs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dyPxGkLKcxgyECXkVKqae
guidanoli
reviewed
Sep 2, 2026
A PRT deployment includes the rollups one, so dave and rollups-contracts both publish the addresses they share. Only dave's were read, which made the union a superset by happenstance of the current pins rather than by construction: a rollups-contracts release deploying something dave's tarball does not list would have gone missing from `prt`, and a pairing that had drifted would have silently taken dave's addresses. `deployments` and `anvil` now take a list of tarballs like `artifacts` does, and `mergeDeployments` raises on an address two of them disagree on instead of letting the last one win. The public options are unchanged — `Release` is internal, and the plugin passes both releases' sources when `prt` is set. `anvil: false` still drops the devnet entirely; `prt.anvil: false` now drops only dave's half of it, leaving the core contracts their devnet addresses. Also from review: `collapseAddress` compares with viem's `isAddressEqual` rather than lowercasing strings, and the fallback for a deployments tarball whose addresses sit at the root is gone — every release the plugin accepts, back to rollups-contracts 3.0.0-alpha.8 and dave 3.0.0-alpha.3, nests them under `deployments/`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017dyPxGkLKcxgyECXkVKqae
guidanoli
approved these changes
Sep 2, 2026
guidanoli
left a comment
There was a problem hiding this comment.
Thank you for taking my suggestions into consideration.
Looks good to me!
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.
Three commits, reviewable in order.
1. Default rollups-contracts → 3.0.0-alpha.10
Version and three hashes. Additive in its ABIs — it now publishes the ERC-165/20/721/1155 interfaces its contracts compile against (12 names), and no existing ABI changed. Every deployment address changed, though, so this breaks
@cartesi/client,@cartesi/codecand@cartesi/reactfor anyone reading an address off them; hence theirmajorchangesets.2.
rollupsContracts({ prt: true })Following review: not a second plugin, an option. A PRT (Permissionless Refereed Tournaments) deployment is a rollups deployment — same
InputBox, portals and factories, at the same addresses — plus the consensus and tournament contracts that settle epochs by tournament rather than by authority.So what it generates is a strict superset of
rollupsContracts(), verified on the output: all 52 contracts present with identical ABIs and identical addresses, plus 31 PRT-only, for 83 total. It is one or the other in a config, never both.Where each piece comes from
dave publishes the PRT contracts and the deployment addresses, but does not rebuild the rollups contracts — 44 of them have no artifact in its release,
InputBox,Inputs,Outputsand all five portals among them. SoRelease.artifactstakes a list, andprtreads:artifactsThe union covers every address dave publishes: the only deployment without an artifact is
TestUsdWithdrawalOutputBuilder, which the existing interface alias already handles.What this retires
Modelling PRT as a superset rather than a sibling removed two workarounds the separate plugin needed:
SHARED_CONTRACTSandexcludeSharedContractsare gone. One plugin emitting a merged set cannot collide with itself, so the seven-name exclusion list — and its standing instruction to re-check on every version bump — disappears.externalDeploymentsis gone. With merged artifacts every dave address resolves to an ABI, so "deployment without a build artifact" goes back to being a plain error.The one constraint the option must carry is that the releases pair: dave alpha.4 is built and deployed against rollups-contracts alpha.10, so
prt: truepicks both defaults together, and the docs flag it for anyone overridingprtalone.Review fixes folded in
JSON.stringifywas order-sensitive both across entries and within them. This check matters more now that the shared interfaces land in one merged set instead of being excluded from one of two plugins.tryonly began afterPromise.allresolved, so a rejection stranded whatever had already extracted.3. modern-tar → 0.8.4
0.8.0 is breaking only in the web entrypoint. This package imports
unpackTarfrommodern-tar/fs, whose signature, options and path-traversal guards are byte-identical between the two versions.Verification
Each commit was verified independently, so the history bisects.
rollupsContracts(): 52 contracts.prt: true: 83, a verified strict superset (no ABI or address differs).prt: { anvil: false }: no chain 31337.… predates dave 3.0.0-alpha.4, and rollups-contracts alpha.7 with… predates rollups-contracts 3.0.0-alpha.8.changeset versionaccepts all four changesets.One caveat about the sandbox, not the diff:
turbo run buildhitsfetch failedwhen several packages download release tarballs concurrently. It reproduces on the base branch with this diff stashed; building packages one at a time succeeds.🤖 Generated with Claude Code
https://claude.ai/code/session_017dyPxGkLKcxgyECXkVKqae