Repository navigation
Conversation
…ion, and default block
…puts, and reports Changes include: - Added optional from and to JSON-RPC parameters. - Added IndexRange *Range to all four repository filters. - Added index-backed >= from and <= to PostgreSQL predicates shared by COUNT(*) and list queries. - Added shared hex-bound parsing and from <= to validation returning -32602 (invalid params). - Preserved positional-parameter compatibility by appending new fields after existing parameters. - Updated the OpenRPC specification. - Added repository tests confirming range composition with total count, descending order, offset, and limit. - Added no-database tests for reversed and malformed bounds.
…ctors
Changes:
- Added optional executed *bool to ListOutputsParams.
- output_type now accepts either one selector string or a non-empty selector array.
- Empty arrays return -32602 (invalid paramters).
- Changed OutputFilter.OutputType to a selector slice and added Executed.
- PostgreSQL now uses IN for selector OR semantics.
- Extracted shared execution and selector predicates reused by GetNumberOfPendingExecutableOutputs.
- Updated OpenRPC with string-or-array schema and executed.
- Added tests for:
- Single-selector compatibility
- Selector arrays
- Empty-array rejection
- Executed tri-state decoding
- Combined selector/execution filtering
- Unchanged nil-filter behavior required by validator claim generation
Targeted tests, package compilation, OpenRPC validation, and git diff --check pass. Validator compilation remains blocked by the environment’s missing
Cartesi machine C header.
- Added flag '--executed' to `read outputs`
- '--executed' filters for executed outputs.
- '--executed=false' filters for unexecuted outputs.
- Omitting the flag leaves execution status unfiltered.
- Updated the CLI example.
- Flag '--output-type' now can be repeated multiple times.
- All selectors are forwarded in request order.
- The help example and flag description were updated.
…utputs
Methods added:
- cartesi_getExecutedOutputCount
- cartesi_getPendingExecutableOutputCount
Each method:
- Accepts an application parameter.
- Returns {"data":"0x..."}.
- Explicitly checks application existence before querying the aggregate.
- Returns -32002 (application not found) for unknown applications.
- Is registered in the dispatch table.
Also updated the OpenRPC specification with the requested descriptions and added tests distinguishing unknown applications from existing applications with zero outputs.
- 'status' now accepts either a string or string array. - Every status is validated through 'EpochStatus.Scan'. - Invalid values return -32602 (invalid params) and identify the bad value. - An explicit empty array returns -32602 with Invalid epoch status: expected at least one status. - Added coverage for scalar/list decoding, multiple-status filtering, invalid list elements, and empty arrays. - Documents 'status' as 'oneOf': a single EpochStatus or a non-empty array of EpochStatus. - Documents omission as no filter and rejects empty arrays. - Documents the non-terminal watch set. - Clarifies terminal statuses never regress, preventing settled epochs from being re-read.
- '--status' now uses a repeatable string-array flag. - Multiple values are sent as StringOrList. - Updated help text and example.
Added 'UnsignedInteger256' schema for uint256 reference it in field 'Voucher.value'. Updated uint256 field 'prev_randao' to reference 'UnsignedInteger256': Kept 'EvmAdvance.index' and other genuine uint64 indexes on 'UnsignedInteger'.
…hAdvance - Renamed handler to handleGetMatchAdvance. - Renamed params struct to GetMatchAdvanceParams across node and CLI. - Updated OpenRPC discovery and JSON-RPC tests. - Normalized the parsed parent hash before repository lookup. - Added a mixed-case parent-hash regression test.
Tests covers all structs declared in `params.go`, comparing positional decoding against equivalent named decoding.
- Added 'executed' plus multiple 'output_type' selector coverage for 'cartesi_listOutputs'. - Added inclusive 'from'/'to' DB-fixture requests for epochs, inputs, outputs, and reports. - Updated count fixture to execute two vouchers, asserting executed 2 and pending 0.
- Warns at both cartesi_listOutputs and its executed parameter that executions occur out of index order. - Explicitly rejects output indexes, offsets, and counts as resume cursors. - Documents the complete count → bounded pending-set query → diff workflow. - Repeats the workflow on both output-count methods. - Notes that a race-free cursor belongs to a future ingestion API.
- Documented budgetWriter and limitedWriter behavior, including:
- Shared batch budget.
- Atomic response buffering.
- Exact-budget boundary behavior.
- Poison-on-overflow semantics.
- No budget consumption by the overflowing response.
- Updated constant documentation to cover both single and batch requests.
- Updated the OpenRPC description to document the 10 MB limit, -31003, retry guidance, and poison semantics.
- Omitted params - Top-level params: null - Empty positional arrays - Positional over-arity - Struct fields marked json:"-"
… a batch
The JSON-RPC server now:
- Calculates 'sum(limit)' for every list operation before dispatching a batch.
- Normalizes limits consistently with handlers:
- Omitted or zero → 50
- Above 10,000 → 10,000
- Allows a cumulative limit of exactly 10,000.
- Rejects totals above 10,000 before any handler or database query runs.
- Returns one batch-level -31003 error: Batch list item limit exceeded.
- Supports both named and positional parameters across every list method.
- Includes a registry coverage test so future list methods cannot silently
bypass the budget.
The client contract is documented in 'jsonrpc-discover.json', and operator
guidance—including the residual unbounded 'COUNT(*)' cost—is documented in
'docs/http-posture.md'.
…imeout to avoid incomplete responses - Added a 25-second JSON-RPC dispatch timeout, leaving five seconds before the HTTP 30-second WriteTimeout. - Applied the deadline at the top of handleRPC, propagating it through request dispatch. - Added an integration-style regression test through the actual server handler, verifying remaining batch entries receive -32070 responses. - Focused JSON-RPC regression tests pass.
- Added shared validation rejecting list offsets above math.MaxInt64 with JSON-RPC -32602 / "Invalid offset". - Validation occurs before repository access, preventing negative int64 conversion and erroneous operator alarms. - Covers all ten list methods plus named and positional parameters. - Updated every OpenRPC offset schema with maximum: 9223372036854775807.
…ed clients - Added a shared repository-error handler that passes wrapped context.Canceled errors through without Error logging. - Updated all JSON-RPC repository failure paths to use it. - Request dispatch now silently stops on cancellation without writing an internal-error response. - context.DeadlineExceeded retains existing logging and response behavior. - Added regression coverage for cancellation during an active repository operation.
- RPC method names are now capped at 64 bytes in every log path. - Truncation preserves valid UTF-8. - Single-request method visibility remains at Info. - Batch-entry method logging remains at Debug. - Updated and added tests verifying long method names are truncated and never logged in full.
… batch - Added per-entry panic recovery around dispatchOneRequest. - Panics are logged at Error with the method, panic value, and stack trace. - The affected entry receives JSON-RPC -32603. - Its private response buffer is discarded. - Remaining batch entries continue normally. - Added regression coverage proving the batch remains valid after a middle-entry panic.
- List input/output decoding failures now log per-row details at Debug instead of Error.
- Each list operation emits one aggregate Warn containing:
- Application
- Failure count
- First failing index
- Malformed rows remain in responses as partial decoded structures.
- Added regression coverage verifying four malformed rows produce four Debug logs, two aggregate Warns, and no Error logs.
…errors
- Request and response IDs now use json.RawMessage.
- Numeric and string IDs are echoed without decoding or precision loss.
- Validation still accepts omitted, null, string, and numeric IDs.
- Boolean, array, and object IDs remain invalid and receive a null response ID.
- Updated existing batch assertions for raw IDs.
- Added exact round-trip coverage for:
- 9007199254740993
- Values beyond uint64
- String IDs
- Both success and error responses
Persist deployment assessments with captured reset generations. Return actual owned values only after successful commit and read completion and control through one closed repeatable-read transaction. Reset the restriction and advance its generation atomically whenever an operator enables an application. Preserve current health, prefix, and watch state.
Gate joins, staging, acceptance, and machine-state verdicts on fresh acknowledged deployment evidence. Preserve passive observation, bond recovery, valid-table completion, and obligation clocks. Fence closed database completion reads with the cache reader revision. Repeat useful-action admission after protocol reads and preserve the final neutral recheck. Keep healthy held priority while unknown held admission may yield to independently authorized work. Preserve normal claim and output-proof completion before generation drain. Keep the epoch and control fences through the transaction outcome. Retain same-episode restrictions after an ambiguous commit. Limit repeated root alerts while reporting clock and episode transitions immediately. BREAKING CHANGE: Refuse join, stage, and accept for incompatible deployment generations. Refuse joining another valid tournament table.
Define tournament bonds, contested states, responder deadlines, leaf seal facts, and standing changes. Preserve full-width quantities, nullable references, null root creation events, participant zero hashes, and hexadecimal JSON instants. Map standing changes to the tournament observation cursor.
Store positive tournament bonds and complete child creation identity. Require null root creation fields. Require child contested states, responder schedules, complete leaf seal facts, and unique match advance heights. Add standing history with scoped references, timing checks, ordered reads, and timestamp updates. BREAKING CHANGE: Change migration 000001 in place. Recreate databases created before this change.
Generate builders for tournament bonds, contested states, responder schedules, leaf seal facts, advance heights, and standing history. Preserve all unaffected inherited builders.
Persist tournament bonds, contested states, responder schedules, leaf seals, advance heights, and standing history with full-width bindings. Compare immutable facts during replay and commit facts, projection, and cursors in one transaction. Preserve child creation provenance and require null root creation fields. Read scoped standing history in repeatable-read pages and count actual standing rows with the existing completeness query.
Observe child creation, root descriptors, bonds, schedules, leaf seals, contested states, and standing history within each pinned interval. Validate child creation provenance and complete projections before committing cursors. Retain historical seal facts and observe other valid tournament tables.
Expose standing history by application, epoch, tournament, and event identity. Advertise nullable root creation, complete child creation, schedule, and seal fields while preserving full-width encodings, scoped totals, and request budgets.
Read standing history through repository and JSON-RPC backends. Select one event by transaction hash and log index or list a tournament page. Preserve unsigned quantities, optional references, and page controls.
Show responder deadlines and advance heights in contract event output. Preserve unsigned quantities through collection, conversion, and JSON.
Check both tournament levels, leaf sealing, child creation, recovery, standing history, and deleted match facts in the passive observer suite. Compare stored and public facts with the emitted dispute events.
Check the deployed transition identity and both tournament table rows at the node commitment block. Match the joined bond, sender, recipient, and receipt with the persisted node commitment.
Compare node commitments with the machine CLI across empty, accepted, rejected, later-epoch, and snapshot-restart paths. Build CLI inputs from chain events and compare emitted and stored commitment identities. Include the oracle suite in the PRT integration shards.
Align go.mod, the source build requirement and the Docker toolchain. Update the official Linux amd64 and arm64 archive checksums.
Update runtime dependencies and the OpenAPI and Jet generation tools. Keep speakeasy-api/openapi at v1.24.0, speakeasy-api/jsonpath at v0.6.3, and go-yit at 9ba8df137936, matching oapi-codegen v2.8.1. Later versions change the YAML node types and are incompatible with the generator.
Pass the tournament count subqueries directly as SELECT projections. Jet 2.16.1 serializes integer wrappers without the parentheses needed around scalar subqueries, producing invalid SQL.
Regenerate for both supported Linux architectures and CGO modes. Include the Apache-2.0 attribution for otel/log.
Clarify the Apache-2.0 and LGPL-3.0 options for independent code reuse. Keep the README and distributed third party notices consistent.
renatomaia
approved these changes
Nov 11, 2026
mpolitzer
approved these changes
Nov 11, 2026
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 brings the 2.0 development line into
main, somainreflects the current state of the node going forward.Note that 2.0 is still in alpha and is not yet recommended for production use.