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

fix: pass version when converting between proto consensus params types #1202

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

evan-forbes
Copy link
Member

Description

closes #1201 this issue only affects v0.34.x

@evan-forbes evan-forbes merged commit 93378ef into v0.34.x-celestia Jan 31, 2024
20 checks passed
@evan-forbes evan-forbes deleted the evan/fix-conversion branch January 31, 2024 19:13
@@ -105,6 +105,7 @@ func (tm2pb) ConsensusParams(params *cmtproto.ConsensusParams) *abci.ConsensusPa
},
Evidence: &params.Evidence,
Validator: &params.Validator,
Version: &params.Version,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have a few non-blocking questions.

  1. Is this function a translation layer from CometBFT protobuf types to ABCI protobuf types? Silly question but why does it need to exist? The types seem almost interchangeable.
  2. Was this broken upstream or a Celestia specific modification in celestia-core caused this issue? It looks like upstream is broken too: https://github.com/cometbft/cometbft/blob/e0e50aa9fca730ec208b67b54e48c8bdc630c17b/types/protobuf.go#L100-L109
  3. Should we add a unit test in protobuf_test.go to prevent regressions?

Copy link
Member Author

Choose a reason for hiding this comment

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

this isn't broken on main, where we just use the toProto method. here I wanted to minimize the number the changes, but the best approach would be to do what main does, which is to delete these and only use the ToProto methods and have round trip unit tests

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.

None yet

4 participants