Skip to content

fix: use the latest blockhash in durable nonce instructions - #443

Merged
Aursen merged 1 commit into
LiteSVM:masterfrom
senzenn:fix/nonce-env-blockhash
Oct 25, 2026
Merged

Aursen merged 1 commit into
LiteSVM:masterfrom
senzenn:fix/nonce-env-blockhash

Conversation

@senzenn

@senzenn senzenn commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Problem

LiteSVM passes the transaction's recent blockhash to EnvironmentConfig::new. Agave passes the bank's last blockhash (bank.rs). In a nonce transaction, the recent blockhash is the stored nonce. So one nonce can be used many times under one blockhash. Agave rejects the second use with BlockhashNotFound.

Summary of Changes

Pass self.latest_blockhash to EnvironmentConfig::new.

Testing

Extend test_durable_nonce. A second nonce use under the same blockhash now fails with BlockhashNotFound. Without the fix, it returns Ok.

@senzenn

senzenn commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@Aursen

@Aursen
Aursen merged commit a98802f into LiteSVM:master Oct 25, 2026
23 checks passed
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.

2 participants