Repository navigation
feat(explorer): decode Cartesi sequencer batches natively - #211
Merged
Merged
Conversation
With a Cartesi sequencer, the InputBox payloads from the batch submitter are SSZ batches of signed user operations, unreadable as one summary line plus JSON. The batch envelope is protocol-defined, so the explorer now decodes it itself, as it does portal deposits, and hands only each operation's data to the application's decoder. - Per-app batch-submitter setting on the Overview page, shareable as ?submitter= behind a confirmation banner. An input is a batch only when its sender is the submitter, as the scheduler classifies it. - Batch rows unfold into their user operations in the inputs list; the input page shows the batch frame by frame; each operation has its own page; a User ops tab scans the submitter's batches with a signer filter. - Batch decoding, signer recovery and fee conversion mirror the scheduler (ethereum_ssz, alloy) and are pinned by vectors generated from cartesi/sequencer@8a7c914 (scripts/fixturegen). - @deroll/decoder gains the UserOp record and the userOp decode method; input is no longer called for batches. - Operations are shown as submitted: outcomes beyond a malformed batch or an unrecoverable signature are not derivable from one batch. - The mock server gains signed batches for the perp-dex app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 3400a86 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@deroll/explorer and @deroll/mock-server are private and not tracked by changesets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully 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.
Why
With a Cartesi sequencer, the payloads the batch submitter posts to the InputBox are SSZ batches of signed user operations. Through a payload decoder they can only appear as one summary line plus a JSON blob, whether the batch carries 2 operations or 200. The batch envelope is protocol-defined, like portal deposits, so the explorer now decodes it itself. The application's decoder only sees each operation's
data.What
Classification and settings
?submitter=link param, but a banner asks before a link's suggestion is adopted.UI
inputs/:i/ops/:frame/:op.Decoding (
apps/explorer/src/sequencer)decodeBatchfollows ethereum_ssz's rules,recoverUserOpSignerfollows alloy's signature rules, andfeeToLinearfollowsfee_to_linear.cartesi/sequencer@8a7c914byscripts/fixturegen.generate-fixtures.shfirst checks that the generator uses the same crate versions as the sequencer.Decoder contract (
@deroll/decoder, minor)UserOprecord and optionaluserOpmethod.inputis no longer called for batches. Existing decoders are unaffected.Mock server
Not included, on purpose
Operations are labelled submitted. The explorer flags only the outcomes that follow from the bytes: a batch that fails to decode, and an operation whose signature recovers no signer. Other outcomes need more than one batch's bytes: stale or out-of-sequence batches, fee and application validation. Copying those scheduler rules into a UI risks misleading users if the copy drifts, so they are left out.
Testing
bunx tsc -b,bun run lintand the explorer's vitest suite (334 tests) pass.userOpdecoder:Follow-ups
6fa614d. The kit is types-only, so this needs no bump to work, but the pin can move once this lands.@cartesi/codeconce Add sequencer wallet extension cartesi/rollups-ts#141 settles.🤖 Generated with Claude Code