Skip to content

Version Packages (alpha) - #191

Merged
brunomenezes merged 1 commit into
prerelease/v2-alphafrom
changeset-release/prerelease/v2-alpha
Oct 2, 2026
Merged

brunomenezes merged 1 commit into
prerelease/v2-alphafrom
changeset-release/prerelease/v2-alpha

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

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-alpha is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on prerelease/v2-alpha.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@cartesi/client@2.0.0-alpha.38

Patch Changes

  • 2da4195: Mirror the @cartesi/rpc changes for the node's PRT read models and bond events.

    Tournament, Commitment and Match gain a snapshot: current contract state
    read at a stated snapshot.asOfBlock, beside the immutable event fields they
    already carried. tournament.winnerCommitment, finalStateHash and
    finishedAtBlock move to tournament.snapshot, and reading them there is not the
    same thing as reading a settled result — an expired inner candidate is still
    snapshot.candidate without being snapshot.winnerCommitment, and two calls do
    not add up to one consistent snapshot. Tournament also gains initialHash,
    baseCycle, kind, startInstant, allowance and creationEvent, which is
    null for a root tournament.

    Match gains eliminableAt, leafSeal, deletionLogIndex and a MatchSnapshot
    discriminated on phase; Commitment and MatchAdvanced gain logIndex, and
    MatchAdvanced also segmentStartPosition and its own eliminableAt.
    MatchSnapshot and the new BondEvent are discriminated unions, so bisection
    and sealed — and refund and recovery — narrow on the discriminant instead of
    being nullable fields you have to test one by one.

    getMatchAdvance takes txHash and logIndex instead of parent. This is not a
    rename: repeated other-parent hashes stay distinct events, so the parent hash
    never identified one advance. Take both values from the MatchAdvanced records
    listMatchAdvances returns.

    Application.dataAvailability is gone, along with the DataAvailability,
    DataAvailabilityInputBox and DataAvailabilityInputBoxAndEspresso types and the
    locally 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. listBondEvents lists an application's partial-refund and
    bond-recovery events, ordered by block number and block-global log index, and
    getBondEvent fetches one by txHash and logIndex. A failed partial refund
    records the value that was requested rather than a payment — check refund.success
    before treating refund.value as money that moved — and a failed terminal bond
    transfer 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/abi carries only the
    contracts a consumer calls. The same list is excluded in @cartesi/react, so
    the two packages agree on which contracts exist.

    What this removes:

    • tournamentAbi, tournamentAddress and tournamentConfig — use
      iTournamentAbi with the address of the tournament you are acting on. A
      tournament is created per dispute by MultiLevelTournamentFactory, so the
      address that was generated here was one devnet instance, never the contract a
      consumer calls.
    • daveConsensusAbi — likewise iDaveConsensusAbi, with the consensus address
      of the application. It had no generated address either way, being deployed
      per application rather than published.
    • iOwnableAbi and erc165Abi, which are generic plumbing.
    • Fourteen libraries and error-only ABIs with no functions and no events at
      all: addressErrorsAbi, applicationCheckerAbi, iApplicationCheckerAbi,
      iApplicationFactoryErrorsAbi, binaryMerkleTreeErrorsAbi, clonesAbi,
      create2Abi, errorsAbi, iRefundOutputBuilderErrorsAbi,
      iSentryErrorsAbi, iWithdrawalOutputBuilderErrorsAbi, libMathAbi,
      machineValidationErrorsAbi and safeCastAbi.

    Every other contract, ABI and address is unchanged, daveAppFactory and
    multiLevelTournamentFactory included.

  • 18d4e13: Add the PRT factories to the cartesi devnet chain.

    cartesi.contracts from @cartesi/client/chains gains daveAppFactory and
    multiLevelTournamentFactory, so a devnet application can be deployed through
    PRT 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] and
    multiLevelTournamentFactoryAddress[chainId] from @cartesi/client/abi, which
    is the public way to reach them; cartesi.contracts is for the devnet only.

  • 0ca5694: bump dependencies

  • 59aebb8: Generate the PRT contracts.

    wagmi.config.ts now passes prt: true, so @cartesi/client/abi carries dave's
    contracts alongside the core rollups ones. PRT Rollups is a superset — same
    InputBox, portals and factories, at the same addresses — so nothing that was
    exported before changes; this only adds.

    The one worth knowing about is tournamentAbi. tryRecoveringBond() takes no
    arguments and is nonpayable, so anyone can claim a finished tournament's bond
    once tournament.snapshot.bondRecovery says it is RECOVERABLE.

    Note the shape of the new address exports. daveAppFactoryAddress and
    multiLevelTournamentFactoryAddress are records keyed by chain ID rather than a
    single 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_ROOT status the node added.

    InputStatus and ApplicationStatus each gain INVALID_OUTPUTS_ROOT, widening
    the unions Input.status and Application.status carry. Both are re-exported
    from @cartesi/rpc and the converter passes status through untouched, so
    nothing in this package's source changed.

    Additive on the wire, breaking for a consumer whose switch over either union
    is exhaustive — the same caveat the earlier additions to these unions carry.

    waitForInput needs no change and neither does your call to it. rejectErrors
    aborts on any status that is neither NONE nor ACCEPTED, so it treats a
    status 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/rpc changes for the node's terminal machine outcomes and
    state proofs.

    Epoch loses outputsMerkleRoot and outputsMerkleProof and gains
    txBufferDataBlock/txBufferProof, iflagsYDataBlock/iflagsYProof and
    htifTohostDataBlock/htifTohostProof, each proved against machineHash. The
    node no longer serves the outputs Merkle root at all — read it from the L1
    Outputs contract instead. The outputsMerkleRoot exported through
    @cartesi/client/abi is a different thing and is unchanged.

    Input.outputsHash is now txBufferDataBlock. 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.

    InputStatus gains OVERFLOW and UNEXPECTED_YIELD; ApplicationStatus
    gains GUEST_EXCEPTION, MACHINE_HALTED, MCYCLE_OVERFLOW and
    UNEXPECTED_YIELD. An exhaustive switch over either union no longer
    compiles. reason is non-null for every status but OK.

    waitForInput with rejectErrors now aborts on any status that is neither
    NONE nor ACCEPTED, so it covers the two new outcomes. It is checked by
    exclusion rather than by listing the terminal statuses, so a status the node
    adds later aborts instead of resolving as a success. waitProcessing still
    governs NONE on its own.

  • Updated dependencies [0ca5694]

  • Updated dependencies [475a5cd]

  • Updated dependencies [fa16494]

  • Updated dependencies [e233105]

    • @cartesi/rpc@2.0.0-alpha.27

@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/client through the hooks.

    useMatchAdvance is the only existing hook whose own signature moved: it takes
    txHash and logIndex where it took parent, and both are gated by skipToken
    and stringified into the query key. Its params come from the records
    useMatchAdvances returns, since repeated other-parent hashes stay distinct
    events 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:

    • useTournament and useTournaments no longer expose winnerCommitment,
      finalStateHash or finishedAtBlock at the top level. They are on
      snapshot, together with the tournament's standing, candidate and bond
      recovery, and what you read there is current contract state at
      snapshot.asOfBlock rather than a settled result.
    • useCommitment, useCommitments, useMatch and useMatches gain logIndex
      and a snapshot of their own — the commitment's live claimer and clocks, the
      match's phase payload.
    • useMatchAdvance and useMatchAdvances gain logIndex,
      segmentStartPosition and eliminableAt.
    • useApplication and useApplications no longer expose dataAvailability;
      the node stopped serving it.
    • A match snapshot and a bond event are discriminated unions, so narrow on
      snapshot.phase or event.type before reading bisection, sealed,
      refund or recovery.

    useBondEvents and useBondEvent are new, wrapping the actions of the same
    name.

  • 7988eca: Generate the PRT contract hooks.

    wagmi.config.ts now passes prt: true, so the generated hooks cover dave's
    contracts alongside the core rollups ones. Nothing generated before changes;
    this only adds.

    The pair worth naming is useSimulateTournamentTryRecoveringBond and
    useWriteTournamentTryRecoveringBond. tryRecoveringBond() takes no arguments
    and is nonpayable, so any account can claim a finished tournament's bond once
    tournament.snapshot.bondRecovery reports RECOVERABLE — simulate at the
    tournament's address, then write.

    daveAppFactory and multiLevelTournamentFactory are 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 chainId
    you 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/client through 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, useEpochByVirtualIndex and useEpochs no longer expose
      outputsMerkleRoot/outputsMerkleProof, and expose the new TX-buffer,
      iflags.Y and HTIF tohost data blocks and proofs instead.
    • useInput, useInputs and useWaitForInput expose txBufferDataBlock
      where the data previously had outputsHash — a change of meaning, not just
      a rename.
    • The InputStatus and ApplicationStatus unions the data carries gained
      members, so an exhaustive switch over either no longer compiles.
    • useWaitForInput inherits the rejectErrors change: it now fails on any
      status that is neither NONE nor ACCEPTED.
  • 944f08a: Stop generating the PRT contracts an application has no use for.

    Codegen now excludes prtInternals, the same list @cartesi/client excludes,
    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:

    • The Tournament hooks, ABI, address and config. Claim a bond through
      useWriteITournamentTryRecoveringBond and
      useSimulateITournamentTryRecoveringBond, passing the address of the
      tournament: a tournament is created per dispute by
      MultiLevelTournamentFactory, so the generated address was one devnet
      instance, never the contract a consumer calls. ITournament declares the
      same eight events and all but one of the functions: the ERC-165
      supportsInterface probe is on the concrete contract only.
    • The DaveConsensus hooks and ABI — likewise IDaveConsensus, with the
      consensus address of the application.
    • The IOwnable and ERC165 hooks and ABIs, which are generic plumbing.
    • Fourteen libraries and error-only ABIs with no functions and no events at
      all, which generated an ABI and no hooks: AddressErrors,
      ApplicationChecker, IApplicationChecker, IApplicationFactoryErrors,
      BinaryMerkleTreeErrors, Clones, Create2, Errors,
      IRefundOutputBuilderErrors, ISentryErrors,
      IWithdrawalOutputBuilderErrors, LibMath, MachineValidationErrors and
      SafeCast.

    Every other hook, ABI and address is unchanged, daveAppFactory and
    multiLevelTournamentFactory included, as are all of the publicL2 hooks.

  • Updated dependencies [2da4195]

  • Updated dependencies [8f3051f]

  • Updated dependencies [18d4e13]

  • Updated dependencies [0ca5694]

  • Updated dependencies [59aebb8]

  • Updated dependencies [662771d]

  • Updated dependencies [5eebdd0]

    • @cartesi/client@2.0.0-alpha.38

@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.

    Epoch loses outputs_merkle_root and outputs_merkle_proof — the node no
    longer serves the outputs Merkle root — and gains three data-block/proof pairs,
    each proved against machine_hash: tx_buffer_data_block/tx_buffer_proof
    for the CMIO TX buffer, iflags_y_data_block/iflags_y_proof for the
    iflags.Y register, and htif_tohost_data_block/htif_tohost_proof for the
    HTIF tohost register.

    Input.outputs_hash is now tx_buffer_data_block. 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.

    InputStatus gains the terminal OVERFLOW and UNEXPECTED_YIELD — new
    outcomes, not replacements for the resource-limit statuses the node removed
    earlier. ApplicationStatus gains GUEST_EXCEPTION, MACHINE_HALTED,
    MCYCLE_OVERFLOW and UNEXPECTED_YIELD. An exhaustive switch over either
    union no longer compiles.

    Application.reason is non-null for every status but OK, where it was
    previously documented as non-null only for FAILED, DIVERGED and
    CORRUPTED. Foreclosure is still reported via foreclose_block, not via
    status.

  • fa16494: Mirror the INVALID_OUTPUTS_ROOT status the node added.

    InputStatus and ApplicationStatus each gain INVALID_OUTPUTS_ROOT. The node
    added it to both InputCompletionStatus and ApplicationStatus in its OpenRPC
    specification 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 switch over either union is exhaustive, exactly as the earlier
    additions to these unions were.

  • e233105: Track the PRT read-model changes the node made to its JSON-RPC API.

    Tournament, Commitment and Match stop being flat rows of event data and gain
    a snapshot: current contract state, read at a stated as_of_block, beside the
    immutable event fields. Tournament therefore loses winner_commitment,
    final_state_hash and finished_at_block to snapshot, and what you read there
    is 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. Tournament also gains initial_hash, base_cycle, kind,
    start_instant, allowance and creation_event, which is null for a root.

    Match gains eliminable_at, leaf_seal, deletion_log_index and a
    MatchSnapshot discriminated on phase; Commitment and MatchAdvanced gain
    log_index, and MatchAdvanced also segment_start_position and its own
    eliminable_at. commitment_one, commitment_two, left_of_two, other_parent
    and left_node are now Hash rather than a loose byte array, and
    deletion_tx_hash is nullable.

    cartesi_getMatchAdvance is keyed by tx_hash and log_index instead of
    parent. 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.

    Application loses data_availability. The node no longer serves it, so there is
    nothing left to decode.

    Two methods are new. cartesi_listBondEvents lists partial-refund and
    bond-recovery events for an application, ordered by block number and block-global
    log index, and cartesi_getBondEvent fetches one by tx_hash and log_index. A
    failed 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. BondEvent is discriminated on type, so
    refund and recovery are never both present.

    Uint256 is a new scalar for the exact uint256 quantities these types carry. The
    node's BondEventNotFound reuses code -31001, which errorCodes.resourceNotFound
    already 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 exclude alongside prt: true to generate only the surface a
    consumer calls:

    rollupsContracts({ prt: true, exclude: prtInternals });

    It covers three kinds of contract: Tournament and DaveConsensus, which are
    reached through ITournament and IDaveConsensus because an application holds
    the address of a tournament the factory created rather than of a published
    deployment; IOwnable and ERC165, which are generic plumbing; and fourteen
    libraries and error-only ABIs with no functions and no events at all.

    Nothing is excluded by default, so what rollupsContracts() generates is
    unchanged.

  • e7823b7: Move the default PRT release to dave v3.0.0-alpha.5.

    PRT_DEFAULT_VERSION and the three tarball hashes move to alpha.5. For this
    package 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.10 release that artifacts defaults to, and
    every 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, so PRT_DEFAULT_ANVIL_VERSION stays.

    prt.artifacts, prt.deployments and prt.anvil still point wherever you aim
    them, so pinning alpha.4 is a matter of passing its three tarballs — the
    documented example does exactly that.

@vercel

vercel Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cartesi-playground Error Error Oct 2, 2026 4:11pm UTC

Request Review

@github-actions
github-actions Bot force-pushed the changeset-release/prerelease/v2-alpha branch from 73a6e62 to 81602d8 Compare October 2, 2026 16:10
@brunomenezes
brunomenezes self-requested a review October 2, 2026 17:15
@github-project-automation github-project-automation Bot moved this from 👁 In Review to 👍 Waiting Merge in Rollups Tooling Oct 2, 2026
@brunomenezes
brunomenezes merged commit 6dc08a9 into prerelease/v2-alpha Oct 2, 2026
1 of 6 checks passed
@brunomenezes
brunomenezes deleted the changeset-release/prerelease/v2-alpha branch October 2, 2026 17:16

This branch had an error being deployed

1 failed deployment
Preview — 81602d80 Deployed Oct 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📦 Done

Development

Successfully merging this pull request may close these issues.

1 participant