Skip to content

STR 3717 add snark acct inbox range rpc#1941

Merged
storopoli merged 1 commit into
mainfrom
STR-3717
Jun 8, 2026
Merged

STR 3717 add snark acct inbox range rpc#1941
storopoli merged 1 commit into
mainfrom
STR-3717

Conversation

@krsnapaudel
Copy link
Copy Markdown
Contributor

@krsnapaudel krsnapaudel commented Jun 4, 2026

Description

Adds strata_getSnarkAcctInboxMsgRange(account_id, start, end) to OLClientRpc.
The range is half-open [start, end). The RPC returns
Vec<RpcIndexedEntry<RpcMessageEntry>>, pairing each Snark account inbox message
with its absolute inbox index.

The implementation reuses the existing
OLRpcProvider::get_account_inbox_messages storage/MMR path.

Changes:

  • crates/ol/rpc/types/src/account_summary.rs: add generic RpcIndexedEntry<T> (Serialize / Deserialize / JsonSchema).
  • crates/ol/rpc/types/src/lib.rs: re-export RpcIndexedEntry.
  • crates/ol/rpc/api/src/lib.rs: add getSnarkAcctInboxMsgRange to OLClientRpc with [start, end) semantics.
  • bin/strata/src/rpc/node.rs: validate start <= end, call the provider, and enumerate results from start. Includes a debug_assert! against storage range regressions and delegates unknown-account behavior to the existing storage/MMR lookup.
  • bin/strata/src/rpc/node_tests.rs: add tests for valid range, empty range, reversed range, and provider error mapping.

This PR was created with help from Codex and Claude Code.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency Update

Notes to Reviewers

Is this PR addressing any specification, design doc or external reference document?

  • Yes
  • No

If yes, please add relevant links:

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added (where necessary) tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.
  • I have disclosed my use of AI in the body of this PR.

Related Issues

STR-3717

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c9132534c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bin/strata/src/rpc/node.rs
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.41%. Comparing base (b5d34b8) to head (2563d1a).

@@            Coverage Diff             @@
##             main    #1941      +/-   ##
==========================================
- Coverage   84.42%   84.41%   -0.01%     
==========================================
  Files         637      637              
  Lines       76805    76817      +12     
==========================================
+ Hits        64840    64845       +5     
- Misses      11965    11972       +7     
Flag Coverage Δ
functional 66.50% <0.00%> (-0.01%) ⬇️
unit 69.52% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
bin/strata/src/rpc/node.rs 83.25% <100.00%> (+0.11%) ⬆️
crates/ol/rpc/types/src/account_summary.rs 83.33% <100.00%> (+1.28%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@krsnapaudel krsnapaudel requested a review from irnb June 4, 2026 17:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Commit: 1e4fc6d

SP1 Execution Results

program cycles gas
EVM EE Chunk 824,732 969,394
EVM EE Account 404,056 498,593
Checkpoint 2,601,550 3,007,194

Copy link
Copy Markdown
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty minor comment, approving otherwise.

Comment thread crates/ol/rpc/types/src/account_summary.rs
@krsnapaudel krsnapaudel mentioned this pull request Jun 5, 2026
16 tasks
Copy link
Copy Markdown
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 2563d1a

Comment thread bin/strata/src/rpc/node_tests.rs
@storopoli storopoli added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit d6564db Jun 8, 2026
49 of 53 checks passed
@storopoli storopoli deleted the STR-3717 branch June 8, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants