Repository navigation
Version Packages (alpha) - #191
Merged
brunomenezes merged 1 commit intoOct 2, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
tuler
force-pushed
the
prerelease/v2-alpha
branch
from
September 6, 2026 03:19
225cb99 to
0ca5694
Compare
github-actions
Bot
force-pushed
the
changeset-release/prerelease/v2-alpha
branch
from
September 6, 2026 03:20
9e130d1 to
6bd8e51
Compare
github-actions
Bot
force-pushed
the
changeset-release/prerelease/v2-alpha
branch
from
September 21, 2026 10:22
6bd8e51 to
62ca3b8
Compare
github-actions
Bot
force-pushed
the
changeset-release/prerelease/v2-alpha
branch
from
September 29, 2026 12:48
62ca3b8 to
c9791a3
Compare
github-actions
Bot
force-pushed
the
changeset-release/prerelease/v2-alpha
branch
from
October 2, 2026 07:19
c9791a3 to
73a6e62
Compare
github-actions
Bot
force-pushed
the
changeset-release/prerelease/v2-alpha
branch
from
October 2, 2026 16:10
73a6e62 to
81602d8
Compare
brunomenezes
self-requested a review
October 2, 2026 17:15
brunomenezes
approved these changes
Oct 2, 2026
This branch had an error being deployed
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to prerelease/v2-alpha, this PR will be updated.
prerelease/v2-alphais currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonprerelease/v2-alpha.Releases
@cartesi/client@2.0.0-alpha.38
Patch Changes
2da4195: Mirror the
@cartesi/rpcchanges for the node's PRT read models and bond events.Tournament,CommitmentandMatchgain asnapshot: current contract stateread at a stated
snapshot.asOfBlock, beside the immutable event fields theyalready carried.
tournament.winnerCommitment,finalStateHashandfinishedAtBlockmove totournament.snapshot, and reading them there is not thesame thing as reading a settled result — an expired inner candidate is still
snapshot.candidatewithout beingsnapshot.winnerCommitment, and two calls donot add up to one consistent snapshot.
Tournamentalso gainsinitialHash,baseCycle,kind,startInstant,allowanceandcreationEvent, which isnull for a root tournament.
MatchgainseliminableAt,leafSeal,deletionLogIndexand aMatchSnapshotdiscriminated on
phase;CommitmentandMatchAdvancedgainlogIndex, andMatchAdvancedalsosegmentStartPositionand its owneliminableAt.MatchSnapshotand the newBondEventare discriminated unions, sobisectionand
sealed— andrefundandrecovery— narrow on the discriminant instead ofbeing nullable fields you have to test one by one.
getMatchAdvancetakestxHashandlogIndexinstead ofparent. This is not arename: repeated other-parent hashes stay distinct events, so the parent hash
never identified one advance. Take both values from the
MatchAdvancedrecordslistMatchAdvancesreturns.Application.dataAvailabilityis gone, along with theDataAvailability,DataAvailabilityInputBoxandDataAvailabilityInputBoxAndEspressotypes and thelocally kept ABI that decoded them. The node no longer serves the field, so there
is nothing left to decode; an application's input box is on
Application.inputBoxAddress.Two actions are new.
listBondEventslists an application's partial-refund andbond-recovery events, ordered by block number and block-global log index, and
getBondEventfetches one bytxHashandlogIndex. A failed partial refundrecords the value that was requested rather than a payment — check
refund.successbefore treating
refund.valueas money that moved — and a failed terminal bondtransfer emits no recovery event at all, staying recoverable in the tournament
snapshot.
8f3051f: Stop generating the PRT contracts an application has no use for.
Codegen now excludes
prtInternals, so@cartesi/client/abicarries only thecontracts a consumer calls. The same list is excluded in
@cartesi/react, sothe two packages agree on which contracts exist.
What this removes:
tournamentAbi,tournamentAddressandtournamentConfig— useiTournamentAbiwith the address of the tournament you are acting on. Atournament is created per dispute by
MultiLevelTournamentFactory, so theaddress that was generated here was one devnet instance, never the contract a
consumer calls.
daveConsensusAbi— likewiseiDaveConsensusAbi, with the consensus addressof the application. It had no generated address either way, being deployed
per application rather than published.
iOwnableAbianderc165Abi, which are generic plumbing.all:
addressErrorsAbi,applicationCheckerAbi,iApplicationCheckerAbi,iApplicationFactoryErrorsAbi,binaryMerkleTreeErrorsAbi,clonesAbi,create2Abi,errorsAbi,iRefundOutputBuilderErrorsAbi,iSentryErrorsAbi,iWithdrawalOutputBuilderErrorsAbi,libMathAbi,machineValidationErrorsAbiandsafeCastAbi.Every other contract, ABI and address is unchanged,
daveAppFactoryandmultiLevelTournamentFactoryincluded.18d4e13: Add the PRT factories to the
cartesidevnet chain.cartesi.contractsfrom@cartesi/client/chainsgainsdaveAppFactoryandmultiLevelTournamentFactory, so a devnet application can be deployed throughPRT without hand-writing an address.
Both entries are the devnet (31337) address and nothing else. dave deploys these
two per chain, because the tournament parameters depend on the chain's block
time, so there is no single address to put on a chain record. On any other chain
read
daveAppFactoryAddress[chainId]andmultiLevelTournamentFactoryAddress[chainId]from@cartesi/client/abi, whichis the public way to reach them;
cartesi.contractsis for the devnet only.0ca5694: bump dependencies
59aebb8: Generate the PRT contracts.
wagmi.config.tsnow passesprt: true, so@cartesi/client/abicarries dave'scontracts alongside the core rollups ones. PRT Rollups is a superset — same
InputBox, portals and factories, at the same addresses — so nothing that wasexported before changes; this only adds.
The one worth knowing about is
tournamentAbi.tryRecoveringBond()takes noarguments and is
nonpayable, so anyone can claim a finished tournament's bondonce
tournament.snapshot.bondRecoverysays it isRECOVERABLE.Note the shape of the new address exports.
daveAppFactoryAddressandmultiLevelTournamentFactoryAddressare records keyed by chain ID rather than asingle address, because dave deploys those per chain — the tournament parameters
depend on the chain's block time. They cover the eight public chains plus the
devnet (31337); dave publishes nothing for cannon (13370), so there is no entry
for it. Everything dave shares with rollups-contracts keeps its single address.
662771d: Mirror the
INVALID_OUTPUTS_ROOTstatus the node added.InputStatusandApplicationStatuseach gainINVALID_OUTPUTS_ROOT, wideningthe unions
Input.statusandApplication.statuscarry. Both are re-exportedfrom
@cartesi/rpcand the converter passesstatusthrough untouched, sonothing in this package's source changed.
Additive on the wire, breaking for a consumer whose
switchover either unionis exhaustive — the same caveat the earlier additions to these unions carry.
waitForInputneeds no change and neither does your call to it.rejectErrorsaborts on any status that is neither
NONEnorACCEPTED, so it treats astatus the node adds later as a failure rather than mistaking it for success.
That is why it was written by exclusion.
5eebdd0: Mirror the
@cartesi/rpcchanges for the node's terminal machine outcomes andstate proofs.
EpochlosesoutputsMerkleRootandoutputsMerkleProofand gainstxBufferDataBlock/txBufferProof,iflagsYDataBlock/iflagsYProofandhtifTohostDataBlock/htifTohostProof, each proved againstmachineHash. Thenode no longer serves the outputs Merkle root at all — read it from the L1
Outputscontract instead. TheoutputsMerkleRootexported through@cartesi/client/abiis a different thing and is unchanged.Input.outputsHashis nowtxBufferDataBlock. This is a change of meaning,not a rename: the field was a digest of the input's outputs and is now the
32-byte CMIO TX-buffer memory block of the machine state the input produced.
Renaming the property without revisiting what you do with the value is wrong.
InputStatusgainsOVERFLOWandUNEXPECTED_YIELD;ApplicationStatusgains
GUEST_EXCEPTION,MACHINE_HALTED,MCYCLE_OVERFLOWandUNEXPECTED_YIELD. An exhaustiveswitchover either union no longercompiles.
reasonis non-null for every status butOK.waitForInputwithrejectErrorsnow aborts on any status that is neitherNONEnorACCEPTED, so it covers the two new outcomes. It is checked byexclusion rather than by listing the terminal statuses, so a status the node
adds later aborts instead of resolving as a success.
waitProcessingstillgoverns
NONEon its own.Updated dependencies [0ca5694]
Updated dependencies [475a5cd]
Updated dependencies [fa16494]
Updated dependencies [e233105]
@cartesi/codec@1.0.0-alpha.5
Patch Changes
@cartesi/machine@1.0.0-alpha.2
Patch Changes
@cartesi/react@2.0.0-alpha.42
Patch Changes
e064d20: Carry the PRT and bond-event changes of
@cartesi/clientthrough the hooks.useMatchAdvanceis the only existing hook whose own signature moved: it takestxHashandlogIndexwhere it tookparent, and both are gated byskipTokenand stringified into the query key. Its params come from the records
useMatchAdvancesreturns, since repeated other-parent hashes stay distinctevents and the parent hash never identified one advance.
Every other hook infers its result from the client action it wraps, so the new
shapes arrive on their own. What that means for consumers:
useTournamentanduseTournamentsno longer exposewinnerCommitment,finalStateHashorfinishedAtBlockat the top level. They are onsnapshot, together with the tournament's standing, candidate and bondrecovery, and what you read there is current contract state at
snapshot.asOfBlockrather than a settled result.useCommitment,useCommitments,useMatchanduseMatchesgainlogIndexand a
snapshotof their own — the commitment's live claimer and clocks, thematch's phase payload.
useMatchAdvanceanduseMatchAdvancesgainlogIndex,segmentStartPositionandeliminableAt.useApplicationanduseApplicationsno longer exposedataAvailability;the node stopped serving it.
snapshot.phaseorevent.typebefore readingbisection,sealed,refundorrecovery.useBondEventsanduseBondEventare new, wrapping the actions of the samename.
7988eca: Generate the PRT contract hooks.
wagmi.config.tsnow passesprt: true, so the generated hooks cover dave'scontracts alongside the core rollups ones. Nothing generated before changes;
this only adds.
The pair worth naming is
useSimulateTournamentTryRecoveringBondanduseWriteTournamentTryRecoveringBond.tryRecoveringBond()takes no argumentsand is
nonpayable, so any account can claim a finished tournament's bond oncetournament.snapshot.bondRecoveryreportsRECOVERABLE— simulate at thetournament's address, then write.
daveAppFactoryandmultiLevelTournamentFactoryare deployed per chain,because the tournament parameters depend on the chain's block time, so their
generated hooks resolve the address from the connected chain or from a
chainIdyou pass. They cover the eight public chains plus the devnet (31337); dave
publishes nothing for cannon (13370), so a hook for those two has no address
there.
0ca5694: bump dependencies
22cb049: Carry the node JSON-RPC changes of
@cartesi/clientthrough the hooks.No hook changed: each one infers its result from the client action it wraps, so
the new shapes arrive on their own. What that means for consumers:
useEpoch,useEpochByVirtualIndexanduseEpochsno longer exposeoutputsMerkleRoot/outputsMerkleProof, and expose the new TX-buffer,iflags.Yand HTIFtohostdata blocks and proofs instead.useInput,useInputsanduseWaitForInputexposetxBufferDataBlockwhere the data previously had
outputsHash— a change of meaning, not justa rename.
InputStatusandApplicationStatusunions the data carries gainedmembers, so an exhaustive
switchover either no longer compiles.useWaitForInputinherits therejectErrorschange: it now fails on anystatus that is neither
NONEnorACCEPTED.944f08a: Stop generating the PRT contracts an application has no use for.
Codegen now excludes
prtInternals, the same list@cartesi/clientexcludes,so the two packages agree on which contracts exist. This cuts the generated
output from 1745 exports to 1535 and the package's declaration file from
19.7 MB to 15.0 MB, which also brings the build back within the memory a 2 GB
Node heap allows.
What this removes:
Tournamenthooks, ABI, address and config. Claim a bond throughuseWriteITournamentTryRecoveringBondanduseSimulateITournamentTryRecoveringBond, passing the address of thetournament: a tournament is created per dispute by
MultiLevelTournamentFactory, so the generated address was one devnetinstance, never the contract a consumer calls.
ITournamentdeclares thesame eight events and all but one of the functions: the ERC-165
supportsInterfaceprobe is on the concrete contract only.DaveConsensushooks and ABI — likewiseIDaveConsensus, with theconsensus address of the application.
IOwnableandERC165hooks and ABIs, which are generic plumbing.all, which generated an ABI and no hooks:
AddressErrors,ApplicationChecker,IApplicationChecker,IApplicationFactoryErrors,BinaryMerkleTreeErrors,Clones,Create2,Errors,IRefundOutputBuilderErrors,ISentryErrors,IWithdrawalOutputBuilderErrors,LibMath,MachineValidationErrorsandSafeCast.Every other hook, ABI and address is unchanged,
daveAppFactoryandmultiLevelTournamentFactoryincluded, as are all of thepublicL2hooks.Updated dependencies [2da4195]
Updated dependencies [8f3051f]
Updated dependencies [18d4e13]
Updated dependencies [0ca5694]
Updated dependencies [59aebb8]
Updated dependencies [662771d]
Updated dependencies [5eebdd0]
@cartesi/rollup@1.0.0-alpha.3
Patch Changes
@cartesi/rpc@2.0.0-alpha.27
Patch Changes
0ca5694: bump dependencies
475a5cd: Track the terminal machine outcomes and state proofs the node added to its
JSON-RPC API.
Epochlosesoutputs_merkle_rootandoutputs_merkle_proof— the node nolonger serves the outputs Merkle root — and gains three data-block/proof pairs,
each proved against
machine_hash:tx_buffer_data_block/tx_buffer_prooffor the CMIO TX buffer,
iflags_y_data_block/iflags_y_prooffor theiflags.Yregister, andhtif_tohost_data_block/htif_tohost_prooffor theHTIF
tohostregister.Input.outputs_hashis nowtx_buffer_data_block. This is a change ofmeaning, not a rename: the field was a digest of the input's outputs and is now
the 32-byte CMIO TX-buffer memory block of the machine state the input
produced.
InputStatusgains the terminalOVERFLOWandUNEXPECTED_YIELD— newoutcomes, not replacements for the resource-limit statuses the node removed
earlier.
ApplicationStatusgainsGUEST_EXCEPTION,MACHINE_HALTED,MCYCLE_OVERFLOWandUNEXPECTED_YIELD. An exhaustiveswitchover eitherunion no longer compiles.
Application.reasonis non-null for every status butOK, where it waspreviously documented as non-null only for
FAILED,DIVERGEDandCORRUPTED. Foreclosure is still reported viaforeclose_block, not viastatus.fa16494: Mirror the
INVALID_OUTPUTS_ROOTstatus the node added.InputStatusandApplicationStatuseach gainINVALID_OUTPUTS_ROOT. The nodeadded it to both
InputCompletionStatusandApplicationStatusin its OpenRPCspecification and attached no description to either, so what it reports is the
node's to define; this package only mirrors that the member exists.
Additive on the wire — an older client reading a node that reports it sees a
status it does not know rather than a malformed response. Breaking for a
consumer whose
switchover either union is exhaustive, exactly as the earlieradditions to these unions were.
e233105: Track the PRT read-model changes the node made to its JSON-RPC API.
Tournament,CommitmentandMatchstop being flat rows of event data and gaina
snapshot: current contract state, read at a statedas_of_block, beside theimmutable event fields.
Tournamenttherefore loseswinner_commitment,final_state_hashandfinished_at_blocktosnapshot, and what you read thereis the tournament as of that block rather than a settled historical result — an
expired inner candidate is still a candidate, and separate calls do not add up to
one snapshot.
Tournamentalso gainsinitial_hash,base_cycle,kind,start_instant,allowanceandcreation_event, which is null for a root.Matchgainseliminable_at,leaf_seal,deletion_log_indexand aMatchSnapshotdiscriminated onphase;CommitmentandMatchAdvancedgainlog_index, andMatchAdvancedalsosegment_start_positionand its owneliminable_at.commitment_one,commitment_two,left_of_two,other_parentand
left_nodeare nowHashrather than a loose byte array, anddeletion_tx_hashis nullable.cartesi_getMatchAdvanceis keyed bytx_hashandlog_indexinstead ofparent. This is not a rename: repeated other-parent hashes stay distinct events,so the parent hash never identified an advance on its own. Take both values from
cartesi_listMatchAdvances.Applicationlosesdata_availability. The node no longer serves it, so there isnothing left to decode.
Two methods are new.
cartesi_listBondEventslists partial-refund andbond-recovery events for an application, ordered by block number and block-global
log index, and
cartesi_getBondEventfetches one bytx_hashandlog_index. Afailed partial refund records the value that was requested, not a payment, and a
failed terminal bond transfer emits no recovery event at all — it stays
recoverable in the tournament snapshot.
BondEventis discriminated ontype, sorefundandrecoveryare never both present.Uint256is a new scalar for the exact uint256 quantities these types carry. Thenode's
BondEventNotFoundreuses code-31001, whicherrorCodes.resourceNotFoundalready names.
@cartesi/wagmi-plugin@1.0.0-alpha.7
Patch Changes
27deaeb: Export
prtInternals, the PRT contracts an application has no use for.Pass it as
excludealongsideprt: trueto generate only the surface aconsumer calls:
It covers three kinds of contract:
TournamentandDaveConsensus, which arereached through
ITournamentandIDaveConsensusbecause an application holdsthe address of a tournament the factory created rather than of a published
deployment;
IOwnableandERC165, which are generic plumbing; and fourteenlibraries and error-only ABIs with no functions and no events at all.
Nothing is excluded by default, so what
rollupsContracts()generates isunchanged.
e7823b7: Move the default PRT release to dave
v3.0.0-alpha.5.PRT_DEFAULT_VERSIONand the three tarball hashes move to alpha.5. For thispackage the release is a version-and-hash bump: every contract ABI is identical
to alpha.4, and the dave commits since are node-side.
The pairing is unchanged. alpha.5 is still deployed against the
rollups-contracts
v3.0.0-alpha.10release thatartifactsdefaults to, andevery address the two releases share matches on all eight public chains, so the
cross-check that guards a mismatched pairing passes. The devnet tarball is still
anvil
1.5.1, soPRT_DEFAULT_ANVIL_VERSIONstays.prt.artifacts,prt.deploymentsandprt.anvilstill point wherever you aimthem, so pinning alpha.4 is a matter of passing its three tarballs — the
documented example does exactly that.