This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Fix nonce fee_calculator overwrite #10973
Merged
mergify
merged 2 commits into
solana-labs:master
from
CriesofCarrots:fix-nonce-overwrite
Jul 9, 2020
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
Prev
Previous commit
Pass fee_calculator to prepare_if_nonce_account; only overwrite in er…
…ror case
- Loading branch information
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CriesofCarrots I think this causes diverged bank hash because patched validator and unpatched validator save different things into the AccountsDB if
tx_result.is_err()
.So, I guess this needs gated release, actually.
FYI: @jstarry @mvines @t-nelson
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless we're seeing any fee fluctuation, I don't think this saves anything different if
tx_result.is_err()
. I think the issue may actually be with the success case, because the blockhash returned from the blockhashes sysvar in system_instruction_processor (and retained in the nonce account as of this pr) may not be the same as that returned from thebank.last_blockhash_with_fee_calculator
. @t-nelson , can you confirm?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CriesofCarrots I believe they should match. The
RecentBlockhashes
sysvar is updated inBank::new_from_parent()
and we don't touchbank.blockhash_queue
until the next slot boundaryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@t-nelson see test at CriesofCarrots@5239ed4
I believe there is one tick at the block boundary where that isn't true