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

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 15, 2023

This is an automatic backport of pull request #31180 done by Mergify.
Cherry-pick of 7cf50e6 has failed:

On branch mergify/bp/v1.14/pr-31180
Your branch is up to date with 'origin/v1.14'.

You are currently cherry-picking commit 7cf50e60fc.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   core/src/replay_stage.rs
	modified:   core/src/tvu.rs
	modified:   geyser-plugin-manager/src/slot_status_observer.rs
	modified:   rpc/src/optimistically_confirmed_bank_tracker.rs
	modified:   rpc/src/rpc.rs
	modified:   rpc/src/rpc_subscriptions.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   core/src/validator.rs
	both modified:   geyser-plugin-manager/src/geyser_plugin_service.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* Fixed missing Root notifications via geyser plugin framework

* Renamed a variable

* fmt issue

* Do not try the loop if no subscribers.

* Addressing some feedback -- passing parent roots from replay_stage to avoid race conditions

* clippy issue

* Address some reviewing findings

* Addressed some feedback from Carl

* fix a clippy issue

* Added comments on optimistically_confirmed_bank_tracker module to explain the workflow

* Addressed Trent's review

(cherry picked from commit 7cf50e6)

# Conflicts:
#	core/src/validator.rs
#	geyser-plugin-manager/src/geyser_plugin_service.rs
@codecov
Copy link

codecov bot commented May 16, 2023

Codecov Report

Merging #31650 (203e89e) into v1.14 (d38effa) will decrease coverage by 0.1%.
The diff coverage is 84.3%.

@@            Coverage Diff            @@
##            v1.14   #31650     +/-   ##
=========================================
- Coverage    82.1%    82.1%   -0.1%     
=========================================
  Files         664      664             
  Lines      185210   185288     +78     
=========================================
+ Hits       152162   152220     +58     
- Misses      33048    33068     +20     

@lijunwangs lijunwangs requested a review from CriesofCarrots May 16, 2023 15:52
@lijunwangs lijunwangs merged commit 2d610ee into v1.14 May 22, 2023
@lijunwangs lijunwangs deleted the mergify/bp/v1.14/pr-31180 branch May 22, 2023 15:27
bw-solana pushed a commit to bw-solana/solana that referenced this pull request Jan 10, 2025
…backport of solana-labs#31180) (solana-labs#31650)

Problem

It is reported that Geyser is missing some Root notifications for slots. solana-labs#31124
The Root notification is sent from replay_stage's code in handle_votable_bank. https://github.com/solana-labs/solana/blob/master/core/src/replay_stage.rs#L1981. However, the validator does not necessarily vote on every slot on the rooted chain. From @carllin

For instance if the rooted chain is 1->2->3->4

You might only vote on 1 and 4
But when 4 is rooted, 2 is also rooted
But handle_votavle_bank is not called on 2

As result of this, we may miss notifications for slot 2 and 3.

Summary of Changes

Enhanced BankNotification to add NewRootedChain enum to send the chains of parent roots.
Renamed BankNotification::Root -> BankNotification::NewRootBank
Introduced SlotNotification for SlotStatusObserver interfaces to send slot status without Bank.
In the OptimisticallyConfirmedBankTracker notify parents of a new root if these parents were not notified.
Modified and added unit test cases to verify the logic.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants