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

replay: feature flag consumption of duplicate proofs from blockstore #34372

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

AshwinSekar
Copy link
Contributor

Problem

#32962 needs to be feature flagged as it could cause a divergence in fork choice.

Summary of Changes

Add a feature gate to ensure smooth rollout to 1.17

@AshwinSekar AshwinSekar added feature-gate Pull Request adds or modifies a runtime feature gate v1.17 PRs that should be backported to v1.17 labels Dec 8, 2023
Copy link
Contributor

mergify bot commented Dec 8, 2023

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Merging #34372 (8af9e42) into master (bbeca16) will decrease coverage by 0.1%.
The diff coverage is 71.4%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34372     +/-   ##
=========================================
- Coverage    81.9%    81.8%   -0.1%     
=========================================
  Files         819      819             
  Lines      220998   221008     +10     
=========================================
- Hits       181019   180967     -52     
- Misses      39979    40041     +62     

@behzadnouri
Copy link
Contributor

How about this?
https://github.com/solana-labs/solana/blob/2971e84ec/core/src/replay_stage.rs#L1228

also adding @bw-solana to review since he reviewed original change.

@bw-solana
Copy link
Contributor

How about this? https://github.com/solana-labs/solana/blob/2971e84ec/core/src/replay_stage.rs#L1228

Yeah, it should be really minor because it's only during startup, but it impacts fork choice

.filter_map(|slot| bank_forks.bank_hash(slot).map(|hash| (slot, hash)));
let duplicate_slot_hashes = duplicate_slots.filter_map(|slot| {
let bank = bank_forks.get(slot)?;
bank.feature_set
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: could probably just check this once and set duplicate_slot_hashes to None when it's inactive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the problem is that the duplicate_slots_iterator could return slots from different epochs if the restart was performed right after the boundary, so I opted to check it for each bank.

Copy link
Contributor

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

LGTM

@AshwinSekar AshwinSekar merged commit 4a8d27d into solana-labs:master Dec 19, 2023
44 checks passed
mergify bot pushed a commit that referenced this pull request Dec 19, 2023
…34372)

* replay: feature flag consumption of duplicate proofs from blockstore

* pr feedback: reorder check, add flag for restart logic

(cherry picked from commit 4a8d27d)

# Conflicts:
#	sdk/src/feature_set.rs
AshwinSekar added a commit that referenced this pull request Dec 19, 2023
…kstore (backport of #34372) (#34515)

* replay: feature flag consumption of duplicate proofs from blockstore (#34372)

* replay: feature flag consumption of duplicate proofs from blockstore

* pr feedback: reorder check, add flag for restart logic

(cherry picked from commit 4a8d27d)

# Conflicts:
#	sdk/src/feature_set.rs

* fix feature set conflict

---------

Co-authored-by: Ashwin Sekar <ashwin@solana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-gate Pull Request adds or modifies a runtime feature gate v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants