Skip to content
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

Reject durable nonce txs that don't use an advanceable nonce #25832

Merged

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Jun 8, 2022

Problem

Durable nonce transactions that use the latest durable nonce hash will not result in the nonce account's nonce hash being advanced.

Summary of Changes

Add feature to reject durable nonce transactions that use the latest durable nonce hash

Feature Gate Issue: #25836

@jstarry jstarry added v1.9 feature-gate Pull Request adds or modifies a runtime feature gate labels Jun 8, 2022
@jstarry jstarry force-pushed the feat/reject-same-block-nonce-hash branch from 26c8d83 to e351678 Compare June 8, 2022 02:19
@jstarry jstarry changed the title Reject durable nonce txs that use the latest durable nonce hash Reject durable nonce txs that don't use advanceable nonce Jun 8, 2022
@jstarry jstarry force-pushed the feat/reject-same-block-nonce-hash branch from e351678 to 7f13e4e Compare June 8, 2022 03:25
jackcmay
jackcmay previously approved these changes Jun 8, 2022
@jstarry jstarry changed the title Reject durable nonce txs that don't use advanceable nonce Reject durable nonce txs that don't use an advanceable nonce Jun 8, 2022
runtime/src/bank.rs Outdated Show resolved Hide resolved
@mergify mergify bot dismissed jackcmay’s stale review June 8, 2022 16:34

Pull request has been modified.

behzadnouri
behzadnouri previously approved these changes Jun 8, 2022
Copy link
Contributor

@behzadnouri behzadnouri left a comment

Choose a reason for hiding this comment

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

lgtm

@jstarry jstarry added the automerge Merge this Pull Request automatically once CI passes label Jun 8, 2022
@mergify mergify bot dismissed behzadnouri’s stale review June 8, 2022 19:44

Pull request has been modified.

@mergify mergify bot merged commit 6a7edc0 into solana-labs:master Jun 8, 2022
mergify bot pushed a commit that referenced this pull request Jun 8, 2022
* Reject durable nonce txs that use the latest durable nonce hash

* feedback

(cherry picked from commit 6a7edc0)

# Conflicts:
#	runtime/src/bank.rs
#	sdk/src/feature_set.rs
mergify bot pushed a commit that referenced this pull request Jun 8, 2022
* Reject durable nonce txs that use the latest durable nonce hash

* feedback

(cherry picked from commit 6a7edc0)

# Conflicts:
#	sdk/src/feature_set.rs
jstarry added a commit that referenced this pull request Jun 8, 2022
* Reject durable nonce txs that use the latest durable nonce hash

* feedback
mergify bot added a commit that referenced this pull request Jun 9, 2022
…#25832) (#25855)

* Reject durable nonce txs that don't use an advanceable nonce (#25832)

* resolve conflicts

Co-authored-by: Justin Starry <justin@solana.com>
mergify bot added a commit that referenced this pull request Jun 9, 2022
…#25856)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback

Co-authored-by: Justin Starry <justin@solana.com>
@t-nelson
Copy link
Contributor

t-nelson commented Jun 9, 2022

these were still effectively rejected, but with an InstructionError, right?

@aeyakovenko aeyakovenko mentioned this pull request Jun 9, 2022
11 tasks
@jstarry
Copy link
Member Author

jstarry commented Jun 9, 2022

This PR will reject invalid durable nonce transactions from being added to a block. It doesn't impact how transactions are processed if they are included in a block. So no, it will not be an instruction error, it will be a transaction error that, if detected, will invalidate the full block.

jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 27, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 27, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 27, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 28, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 28, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 28, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 28, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 28, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 28, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
…labs#25832)

* Reject durable nonce txs that use the latest durable nonce hash

* feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this Pull Request automatically once CI passes feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants