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

Problem: state streaming is not supported in old versions #717

Closed

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Sep 23, 2022

Solution:

  • backport the feature to older version of cosmos-sdk
  • integration the basic file streamer, further processing can be done based on that

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

CHANGELOG.md Outdated Show resolved Hide resolved
tomtau added a commit to tomtau/chain-main that referenced this pull request Sep 29, 2022
Solution: backported state streaming (+ grpc nil fix) to 0.44.x fork
basic integration added based on crypto-org-chain/cronos#717
@yihuang yihuang marked this pull request as ready for review October 6, 2022 01:51
@yihuang yihuang requested a review from a team as a code owner October 6, 2022 01:51
@yihuang yihuang requested review from mmsqe and leejw51crypto and removed request for a team October 6, 2022 01:51
CHANGELOG.md Outdated
@@ -7,6 +7,10 @@
- [#693](https://github.com/crypto-org-chain/cronos/pull/693) Clear `From` field when building cosmos tx in `eth_sendTransaction`.
- [cronos#715](https://github.com/crypto-org-chain/cronos/pull/715) Add option `iavl-disable-fastnode` to disable iavl fastnode indexing migration, and enable `iavl-cache-size` to have effect on app (backport #714).

### Improvements

\- [#717](https://github.com/crypto-org-chain/cronos/pull/717) Integrate file streamer to stream the states of legacy blocks.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
\- [#717](https://github.com/crypto-org-chain/cronos/pull/717) Integrate file streamer to stream the states of legacy blocks.
- [#717](https://github.com/crypto-org-chain/cronos/pull/717) Integrate file streamer to stream the states of legacy blocks.

@@ -146,6 +147,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
func addModuleInitFlags(startCmd *cobra.Command) {
crisis.AddModuleInitFlags(startCmd)
cronos.AddModuleInitFlags(startCmd)
startCmd.Flags().String(cronosclient.FlagStreamers, "", "Enable streamers, only file streamer is supported right now")
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitty picky but would it be better to support enum type there?

maybe ok for the backporting version

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There'll be a better configuration system for streamers in another PR in cosmos-sdk.
For this version I think we just need to generate the stream files, then convert to version db with some offline script.

@yihuang yihuang marked this pull request as draft October 14, 2022 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants