-
Notifications
You must be signed in to change notification settings - Fork 34
Change the return value type of Prover::SetupHeadersForUpdate
to support stream processing of huge headers
#166
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
Conversation
…pport stream processing of huge headers Signed-off-by: Masanori Yoshida <[email protected]>
Signed-off-by: Masanori Yoshida <[email protected]>
…r each header Signed-off-by: Masanori Yoshida <[email protected]>
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.
Pull Request Overview
This PR changes the return type of SetupHeadersForUpdate from a slice of headers to a channel-based stream to enable efficient processing of large header sets. Key changes include refactoring of the method signatures in both mock and Tendermint prover implementations, updating the interface in core/provers.go, and adding helper functions to stream and drain headers.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
provers/mock/prover.go | Updated SetupHeadersForUpdate to use a stream channel instead of a slice. |
core/provers.go | Updated the interface for SetupHeadersForUpdate to return a stream channel; comment still references slice. |
core/headers.go | Refactored to drain the header stream using a new helper function. |
core/header-stream.go | New file providing helper functions to create and drain header streams. |
core/channel-upgrade.go | Refactored to handle the stream-based header output by draining the channel. |
chains/tendermint/prover.go | Modified SetupHeadersForUpdate to return a header stream consistently with other prover implementations. |
Comments suppressed due to low confidence (1)
core/provers.go:51
- The documentation still refers to a header slice, but the function now returns a channel stream. Please update the comment to reflect the new return type accurately.
// SetupHeadersForUpdate returns the finalized header and any intermediate headers needed to apply it to the client on the counterpaty chain
b0eca8a
to
26b1241
Compare
Signed-off-by: Masanori Yoshida <[email protected]>
26b1241
to
982b875
Compare
…l the context used to SetupHeadersForUpdate in the end Signed-off-by: Masanori Yoshida <[email protected]>
@bluele I have converted |
Signed-off-by: Masanori Yoshida <[email protected]>
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.
@siburu LGTM👍
No description provided.