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

v1.18: replay: do not early return when marking slots duplicate confirmed (backport of #2700) #2771

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 28, 2024

Problem

When processing duplicate confirmed slots from gossip or replay we early return if we have already duplicate confirmed this slot.

This can cause the following situation:

  • Slot S is DC through gossip and marked as valid in fork choice.
  • Later replay of a slot S + 2 indicates that S and S + 1 are DC.
  • We see that we've already marked S as DC through gossip, so we early exit.
  • S + 1 is never marked as valid in fork choice.

And vice versa if S is first marked DC through replay.

Summary of Changes

continue instead so we can process any new slots later in the queue.


This is an automatic backport of pull request #2700 done by [Mergify](https://mergify.com).

…2700)

* replay: do not early return when marking slots duplicate confirmed

* pr feedback: catch panic explicitely, comments, add root test case

* pr feedback: add custom string to panic message

* pr feedback: add slot to log, use should_panic

* pr feedback: notification for {slot} -> notification for slot {slot}

(cherry picked from commit 1444baa)

# Conflicts:
#	core/src/replay_stage.rs
@mergify mergify bot requested a review from a team as a code owner August 28, 2024 17:29
@mergify mergify bot added the conflicts label Aug 28, 2024
Copy link
Author

mergify bot commented Aug 28, 2024

Cherry-pick of 1444baa has failed:

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

You are currently cherry-picking commit 1444baa426.
  (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)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   core/src/replay_stage.rs

no changes added to commit (use "git add" and/or "git commit -a")

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

@AshwinSekar
Copy link

This change has been backported to 2.0, however I believe it should also be backported to 1.18 in order to cover our bases for mainnet.

It changes 2 early returns to continues and adds 2 tests.

Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

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

Conflict resolution looks good, but was also only in the unit tests

@AshwinSekar AshwinSekar merged commit fdd4cd7 into v1.18 Aug 29, 2024
35 checks passed
@AshwinSekar AshwinSekar deleted the mergify/bp/v1.18/pr-2700 branch August 29, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants