-
Notifications
You must be signed in to change notification settings - Fork 951
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
fix(core): Do not propagate blocks if subscribed to blocks from incorrect chain #3086
Merged
Conversation
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
renaynay
added
area:core_and_app
Relationship with Core node and Celestia-App
kind:fix
Attached to bug-fixing PRs
labels
Jan 10, 2024
renaynay
requested review from
Wondertan,
vgonkivs,
distractedm1nd,
walldiss and
ramin
as code owners
January 10, 2024 15:07
renaynay
commented
Jan 10, 2024
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3086 +/- ##
==========================================
+ Coverage 51.29% 51.42% +0.13%
==========================================
Files 177 177
Lines 11151 11165 +14
==========================================
+ Hits 5720 5742 +22
+ Misses 4935 4930 -5
+ Partials 496 493 -3 ☔ View full report in Codecov by Sentry. |
vgonkivs
previously approved these changes
Jan 10, 2024
Error in swamp test:
|
distractedm1nd
previously approved these changes
Jan 10, 2024
Nice example of how i don't check the swamp tests. |
renaynay
dismissed stale reviews from distractedm1nd and vgonkivs
via
January 10, 2024 16:18
ad8febe
vgonkivs
approved these changes
Jan 11, 2024
ramin
approved these changes
Jan 11, 2024
walldiss
reviewed
Jan 12, 2024
walldiss
approved these changes
Jan 15, 2024
renaynay
added a commit
that referenced
this pull request
Jan 23, 2024
…rect chain (#3086) Right now, it is possible for a **bridge** node that was initialised and started on one chain (e.g. `mocha-4`) to be stopped and restarted on a different chain (e.g. `mainnet`) and propagate headers from the old chain (`mocha-4`) into the different network (`mainnet`). This PR fixes this issue by causing the listener to fatal if the listener recognises it is receiving blocks from a different chain to that which it expects. Error will look like this: ``` 2024-01-10T16:06:22.001+0100 ERROR core core/listener.go:175 listener: received block with unexpected chain ID: expected arabica-11, received mocha-4 2024-01-10T16:06:22.001+0100 INFO core core/listener.go:177 listener: listening stopped 2024-01-10T16:06:22.001+0100 FATAL core core/listener.go:126 listener: invalid subscription ``` Resolves #3071
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Right now, it is possible for a bridge node that was initialised and started on one chain (e.g.
mocha-4
) to be stopped and restarted on a different chain (e.g.mainnet
) and propagate headers from the old chain (mocha-4
) into the different network (mainnet
).This PR fixes this issue by causing the listener to fatal if the listener recognises it is receiving blocks from a different chain to that which it expects.
Error will look like this:
Resolves #3071