This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Avoid unsorted recent_blockhashes for determinism#7918
Merged
ryoqun merged 2 commits intosolana-labs:masterfrom Jan 23, 2020
Merged
Avoid unsorted recent_blockhashes for determinism#7918ryoqun merged 2 commits intosolana-labs:masterfrom
ryoqun merged 2 commits intosolana-labs:masterfrom
Conversation
ryoqun
commented
Jan 22, 2020
Codecov Report
@@ Coverage Diff @@
## master #7918 +/- ##
========================================
- Coverage 81.8% 81.8% -0.1%
========================================
Files 241 244 +3
Lines 52121 52170 +49
========================================
+ Hits 42678 42716 +38
- Misses 9443 9454 +11 |
Contributor
|
Oof! How'd I miss that... 🤔 Nice catch! This is absolutely the intention |
This was referenced Jan 22, 2020
Pull request has been modified.
mergify Bot
pushed a commit
that referenced
this pull request
Jan 23, 2020
* Avoid unsorted recent_blockhashes for determinism * Add a test: test_create_account_unsorted (cherry picked from commit e54bf56)
solana-grimes
pushed a commit
that referenced
this pull request
Jan 23, 2020
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
BinaryHeap::into_iteris not sorted, resulting in not-deterministicrecent_blockhashessysvar.This is surprising as a part of the Rust community voiced.
From the API reference (Emphasis mine):
Summary of Changes
Background
Found while working on #7892
Fixes #6663