You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Materializing an account, deleting it, and materializing the same image before the blockhash changes can produce the same signed transaction. Signature deduplication then rejects necessary work as AlreadyProcessed.
Append a random u64 nonce as a signed MagicRoot no-op to distinguish separate private account mutations within one blockhash lifetime.
Related to magicblock-validator#1813. This covers Engine's account mutations; the scheduler's base-chain transaction builder is unchanged.
Impact
Each private mutation gains one built-in instruction. The nonce variant is appended to the MagicRoot enum, leaving existing instruction discriminants unchanged. Validator and verifier must both consume the updated Engine to replay these transactions.
Reviewing files that changed from the base of the PR and between 1bcb0bd and 3f52268.
⛔ Files ignored due to path filters: 1
Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 5
engine/Cargo.toml
engine/src/accessor.rs
engine/src/transaction.rs
programs/magic-root-interface/src/lib.rs
programs/magic-root-program/src/processor.rs
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
The magic-root interface adds a nonce instruction, and the processor handles it as a successful no-op after target-account lookup. The engine appends an authority-composed random nonce to private transactions and checks instruction-trace and account-lock limits. Accessor execution now passes owned instruction vectors.
Priority: ➖ Normal
Change: Bug fix
Merge Risk:🔵 Low · up to 3f522
At the exact trace-capacity boundary, some private transactions with nested actions may now fail; this is a narrow follow-up risk.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title clearly describes the main change: distinguishing repeated private account mutations.
Description check
The description directly explains the duplicate-signature problem, the nonce-based fix, its impact, and related issue.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. (1 skipped: 1 …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
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.
What changed
Materializing an account, deleting it, and materializing the same image before the blockhash changes can produce the same signed transaction. Signature deduplication then rejects necessary work as
AlreadyProcessed.Append a random
u64nonce as a signed MagicRoot no-op to distinguish separate private account mutations within one blockhash lifetime.Related to magicblock-validator#1813. This covers Engine's account mutations; the scheduler's base-chain transaction builder is unchanged.
Impact
Each private mutation gains one built-in instruction. The nonce variant is appended to the MagicRoot enum, leaving existing instruction discriminants unchanged. Validator and verifier must both consume the updated Engine to replay these transactions.