-
Notifications
You must be signed in to change notification settings - Fork 1
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
Resume with blockchain progress endpoints #17
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e3cd9d3
to
b8c6063
Compare
37cf797
to
a2d65bf
Compare
6fc3ab3
to
d28f60a
Compare
a2d65bf
to
499a9ef
Compare
499a9ef
to
9b7e374
Compare
d28f60a
to
bf48eec
Compare
7c5672e
to
5b1d3c5
Compare
ingester/mainloop.go
Outdated
return ctx.Err() | ||
return nil |
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.
It's not an error if the context is canceled
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.
but we rely on this to stop the other threads I think
5b1d3c5
to
d826fa4
Compare
This PR adds Get and Post methods for the progress report API (duneanalytics/duneapi#559). We use the endpoints in #17 (and they work!). Towards CHAIN-1588.
d826fa4
to
e3bbdc6
Compare
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.
Some questions
ingester/mainloop.go
Outdated
if err != nil { | ||
return errors.Errorf("failed to get latest block number: %w", err) | ||
} | ||
progress, err := i.dune.GetProgressReport(ctx) |
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.
why not:
if startBlockNumber < 0 {
progress, err := i.dune.GetProgressReport(ctx)
...
startBlockNumber = progressReport.LastIngestedBlockNumber + 1
}
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.
aha yes, that's a good idea
ingester/mainloop.go
Outdated
return ctx.Err() | ||
return nil |
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.
but we rely on this to stop the other threads I think
e3bbdc6
to
e7ff6cd
Compare
912364b
to
d16a777
Compare
d16a777
to
353391b
Compare
Whew, time for a coffee |
This PR adds use of the GetBlockchainProgress endpoint on startup, and continuous calls to PostProgressEndpoint to update the progress.
Try with
Towards CHAIN-1588.