-
Notifications
You must be signed in to change notification settings - Fork 301
SIMD-0297: Relax Invalid Nonced Transactions Constraint #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Benhawkins18
merged 12 commits into
solana-foundation:main
from
tao-stones:relax-invalid-nonce
Oct 13, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cec9094
draft
tao-stones 347bcaf
simd number
tao-stones f1f0b3a
do not charge fee on skipped nonce transaction
tao-stones abb4872
fix
tao-stones f6d0d6b
address feedbacks
tao-stones c613fef
add spec of not including failed tx in status cache
tao-stones 184854e
combine not-charged-fee with no-accounts-modified
tao-stones 110d420
clarify what part of CU to apply to block limits
tao-stones d530494
Update proposals/0297-relax-invalid-nonce.md
tao-stones 3ae6737
excluding stateless failure from being relaxed
tao-stones 6b825d6
highlight impact on rpc
tao-stones 4699ac6
nit fix
tao-stones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| --- | ||
| simd: '0297' | ||
| title: Relax Invalid Nonced Transactions Constraint | ||
| authors: Tao Zhu (Anza) | ||
| category: Standard | ||
| type: Core | ||
| status: Review | ||
| created: 2025-06-05 | ||
| feature: | ||
| --- | ||
|
|
||
| ## Summary | ||
|
|
||
| This proposal relaxes the handling of invalid durable nonce transactions during | ||
| block replay. Instead of rejecting the entire block when an invalid nonce is | ||
| encountered, the transaction should be marked as failed, skipped for state | ||
| modifications, but still committed to the block without charging a transaction | ||
| fee. | ||
|
|
||
| ## Motivation | ||
|
|
||
| The current consensus behavior specifies that invalid durable nonce transactions | ||
| should result in block failure during replay. This behavior hinders forward | ||
| compatibility with asynchronous block execution. The goal is to align invalid | ||
| nonce handling with the treatment of other soft transaction failures (e.g., | ||
| relax fee payer, relax ALT, etc). | ||
|
|
||
| ## New Terminology | ||
|
|
||
| None | ||
|
|
||
| ## Detailed Design | ||
|
|
||
| ### Current Behavior | ||
|
|
||
| A transaction using a durable nonce fails block replay (causing the entire | ||
| block to be rejected) if any of the following occurs: | ||
|
|
||
| - The nonce account is not a statically included account. | ||
| - The nonce account does not exist. | ||
| - The nonce account is not properly initialized. | ||
| - The stored nonce does not match the transaction's recent blockhash. | ||
| - The transaction fails to advance the nonce. | ||
|
|
||
|
|
||
| ### Proposed Change | ||
|
|
||
| Update replay logic to handle invalid nonce transactions differently: | ||
|
|
||
| 1. For failure that can be checked without accessing account state, namely: | ||
|
|
||
| - The nonce account is not a statically included account. | ||
|
|
||
| Replay logic remains unchanged - entire block is rejected; | ||
|
|
||
| 2. For failures require account state to verify, namely: | ||
|
|
||
| - The nonce account does not exist. | ||
| - The nonce account is not properly initialized. | ||
| - The stored nonce does not match the transaction's recent blockhash. | ||
| - The transaction fails to advance the nonce. | ||
|
|
||
| Replay treats these transactions as non-state-modifying and non-fee-charging | ||
| failures, as follows: | ||
|
|
||
| - The transaction is not executed. | ||
| - The transaction is not included in status cache. | ||
| - The transaction’s non-execution CU cost (i.e., transaction's static CUs, | ||
| plus actual CUs for loading accounts) still applies to the block limit. | ||
| - The transaction is recorded in the block (marked as failed). | ||
| - No account state is modified, including the nonce account (i.e., nonce is | ||
| not advanced) and fee payer account (it is not charged with the | ||
| transaction's fee). | ||
| - The block is not rejected as long as all other transactions replay | ||
| successfully. | ||
|
|
||
|
|
||
| ## Alternatives Considered | ||
|
|
||
| N/A | ||
|
|
||
| ## Impact | ||
|
|
||
| - Invalid nonce transactions may be included in multiple blocks but will not be | ||
| charged fees. | ||
|
|
||
| - The inclusion of the same nonce transaction in multiple blocks may affect RPC | ||
| behavior, such as querying a transaction by signature. The exact handling of | ||
| this is outside the scope of this proposal. | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| The relaxed model still prevents nonce reuse and enforces single-use semantics, | ||
| as the transaction does not advance the nonce if it fails. There is no impact | ||
| on replay safety, and the ledger remains consistent across nodes. | ||
|
|
||
| ## Backward Compatibility | ||
|
|
||
| This change is **not backward compatible** with current validator behavior. It | ||
| must be activated via a feature gate and coordinated with a network upgrade. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.