Skip to content

feat: forked transaction-view for increased limits - #33

Open
bmuddha wants to merge 2 commits into
solana-accountfrom
transaction-view
Open

feat: forked transaction-view for increased limits#33
bmuddha wants to merge 2 commits into
solana-accountfrom
transaction-view

Conversation

@bmuddha

@bmuddha bmuddha commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What changed

Forked agave-transaction-view into the workspace and adapted its framing parser for engine transaction sizes.

Why

Engine-private transactions can exceed packet-sized assumptions, so their zero-copy view must parse complete canonical lengths and validate larger offsets before unchecked access.

Closes #34.

Impact

  • Patches the workspace dependency graph to use the local transaction-view fork.
  • Replaces the packet-specific two-byte compact-u16 fast path with the complete canonical one-, two-, or three-byte parser.
  • Uses checked offset arithmetic and validated byte slices before exposing zero-copy transaction fields.
  • Preserves standard Legacy, v0, and V1 wire behavior while documenting the distinct Magicblock size and instruction-trace limits.

Reviewer notes

Unchecked iterators and typed views rely on the initial frame validation. Review the offset and length checks together with the standard-versus-Magicblock limit boundary.

Follow-up

The transaction-context and runtime forks consume this parser upstack.

@bmuddha
bmuddha force-pushed the transaction-view branch from de564a1 to acf36a7 Compare July 30, 2026 18:20
@bmuddha
bmuddha force-pushed the transaction-view branch 2 times, most recently from e7813be to ef28038 Compare July 31, 2026 13:48
@bmuddha
bmuddha force-pushed the transaction-view branch from ef28038 to 5136be2 Compare July 31, 2026 14:28
@bmuddha
bmuddha force-pushed the transaction-view branch 2 times, most recently from 67bda80 to 7ef5704 Compare August 3, 2026 13:23
@bmuddha
bmuddha marked this pull request as ready for review August 4, 2026 21:59
@bmuddha bmuddha self-assigned this Aug 4, 2026
@bmuddha
bmuddha requested a review from a team August 5, 2026 00:20
@bmuddha
bmuddha force-pushed the transaction-view branch 2 times, most recently from 54a8790 to 9aecd4e Compare August 5, 2026 13:27
@bmuddha

bmuddha commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9a1fe6a1-1290-4a92-924e-237c41348e24

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid input: expected boolean, received string at "reviews.auto_review.enabled"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

The pull request registers a local agave-transaction-view fork, adds package documentation, replaces wrapping offset arithmetic with checked parsing, and bounds unsafe typed accessors before pointer conversion. Most remaining changes reformat implementation and test code without changing behavior.

Changes

Transaction view fork

Layer / File(s) Summary
Workspace packaging and documentation
Cargo.toml, solana/transaction-view/Cargo.toml, solana/transaction-view/README.md, solana/transaction-view/benches/*
The workspace uses the local fork, package metadata declares version 4.1.1, benchmarks retain their configuration, and the README documents supported formats and validation rules.
Checked compact-length parsing
solana/transaction-view/src/bytes.rs, solana/transaction-view/src/instructions_frame.rs
Byte readers return ParseError when offset arithmetic overflows. Instruction-frame construction and tests are reformatted, with the V1 test using Message::serialize() and offset 42.
Bounded zero-copy accessors and validation
solana/transaction-view/src/transaction_frame.rs, solana/transaction-view/src/transaction_view.rs, solana/transaction-view/src/sanitize.rs, solana/transaction-view/src/resolved_transaction_view.rs
Pubkey and Hash references are created from bounded slices before casting. Related validation, view, resolved-view, and test expressions are reformatted without behavior changes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TransactionBytes
  participant ByteReader
  participant InstructionFrame
  participant Sanitizer
  TransactionBytes->>ByteReader: Read bytes and compact-u16 lengths
  ByteReader-->>InstructionFrame: Return values or ParseError
  InstructionFrame->>Sanitizer: Provide parsed frame metadata
  Sanitizer-->>InstructionFrame: Validate transaction limits
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the fork and its purpose of supporting increased transaction limits.
Description check ✅ Passed The description directly explains the fork, parser changes, validation safeguards, limits, and linked issue.
Linked Issues check ✅ Passed The changes address the coding objectives in [#34], including dependency patching, canonical lengths, checked offsets, limits, and validation boundaries.
Out of Scope Changes check ✅ Passed The changes remain within scope; documentation, metadata, formatting, and benchmark edits support the transaction-view fork.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch transaction-view

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bmuddha

bmuddha commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Cargo.toml`:
- Around line 50-55: Align the version requirements for agave-transaction-view
in the root dependency configuration and solana/transaction-view/Cargo.toml so
the local [patch.crates-io] entry applies. Preserve the intended local fork
resolution by making the declared dependency version compatible with the patched
package version.

In `@solana/transaction-view/README.md`:
- Around line 27-30: Update the transaction size and signature-limit
documentation to distinguish parser-enforced boundaries from
sanitization-enforced limits. In the README section describing Legacy, v0, V1,
and Magicblock transactions, state that Legacy parsing rejects the
over-signature case through TransactionView::try_new_unsanitized with
ParseError, while V1 signature validation occurs in sanitize_signatures; keep
other structural sanitization limits described separately.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b02b19fe-fd5a-4abe-bbf8-733802fe596c

📥 Commits

Reviewing files that changed from the base of the PR and between c684aa7 and 86c2748.

📒 Files selected for processing (11)
  • Cargo.toml
  • solana/transaction-view/Cargo.toml
  • solana/transaction-view/README.md
  • solana/transaction-view/benches/bytes.rs
  • solana/transaction-view/benches/transaction_view.rs
  • solana/transaction-view/src/bytes.rs
  • solana/transaction-view/src/instructions_frame.rs
  • solana/transaction-view/src/resolved_transaction_view.rs
  • solana/transaction-view/src/sanitize.rs
  • solana/transaction-view/src/transaction_frame.rs
  • solana/transaction-view/src/transaction_view.rs

Comment thread Cargo.toml Outdated
Comment thread solana/transaction-view/README.md Outdated
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.

[change] Fork transaction view for engine transaction limits

1 participant