Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Gate nonce-overwrite change #11079

Merged
merged 1 commit into from
Jul 15, 2020

Conversation

CriesofCarrots
Copy link
Contributor

Problem

(From #11032)
As of #10973 , a successful nonce transaction advances the nonce to the most recent blockhash from the RecentBlockhashes sysvar instead of re-overwriting that nonce with the most recent bank blockhash. We expect those hashes to be the same, but in fact that can be different in the final tick of the slot, due to this:

if self.is_block_boundary(current_tick_height + 1) {

This caused a bank hash mismatch on our api nodes.

We fixed the discrepancy, but that fix needs gating due to changing the bank. Therefore the overwrite also needs gating to avoid breaking anything while nodes are upgrading.

Summary of Changes

  • Pass fix_recent_blockhashes_sysvar_delay into prepare_if_nonce_account() to gate overwrite in tandem with recent_blockhashes_sysvar_delay fix

@CriesofCarrots CriesofCarrots requested a review from t-nelson July 15, 2020 19:51
Copy link
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

Much less gross! 🎉

@CriesofCarrots CriesofCarrots added the automerge Merge this Pull Request automatically once CI passes label Jul 15, 2020
@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #11079 into v1.2 will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff           @@
##            v1.2   #11079   +/-   ##
======================================
  Coverage   82.1%    82.1%           
======================================
  Files        309      309           
  Lines      72593    72597    +4     
======================================
+ Hits       59608    59632   +24     
+ Misses     12985    12965   -20     

@mergify mergify bot merged commit b0addba into solana-labs:v1.2 Jul 15, 2020
@CriesofCarrots CriesofCarrots deleted the v1.2-gate-nonce-utils branch July 24, 2020 22:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants