-
Notifications
You must be signed in to change notification settings - Fork 5
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: batch process bug #39
Merged
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
parketh
requested review from
bap2pecs,
SebastianElvis and
lesterli
and removed request for
bap2pecs and
SebastianElvis
November 6, 2024 16:04
SebastianElvis
approved these changes
Nov 7, 2024
config/config.go
Outdated
@@ -19,6 +19,7 @@ type Config struct { | |||
GRPCListener string `long:"grpc-listener" description:"host:port to listen for gRPC connections"` | |||
HTTPListener string `long:"http-listener" description:"host:port to listen for HTTP connections"` | |||
BitcoinDisableTLS bool `long:"bitcoin-disable-tls" description:"disable TLS for RPC connections"` | |||
DebugLogLevel bool `long:"debug-log-level" description:"set log level to debug (true) or info (false)"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use a log level enum for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense - fixed!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR fixes a bug introduced in the batch processing refactor in #35.
here, we incorrectly assume that the returned
results
channel is ordered by height. since block fetching is now async, this channel is actually unordered and needs to first be sorted.finality-gadget/finalitygadget/finalitygadget.go
Lines 623 to 632 in 0409cd8
the impact of this change was that not all finalized blocks were inserted to the db, even though the latest finalized height advances correctly
besides the fix, we also update FG to:
config.toml
to set the log level at runtimeTest plan
This bug wasn't caught by previous tests because it doesn't fall under scope of the unit tests (we mock DB inserts to keep the DB implementation generic). It would have been caught by e2e tests, but we deferred this task in favour of testing on the live network.
In the future, we should: