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

Add messages when converting to protobuf version of block data #580

Merged
merged 7 commits into from
Nov 18, 2021

Conversation

evan-forbes
Copy link
Member

@evan-forbes evan-forbes commented Nov 17, 2021

Description

This PR is needed to properly submit messages, and fixes the "bug" where the chain halts after submitting a signed pay for message.

@evan-forbes evan-forbes self-assigned this Nov 17, 2021
@evan-forbes evan-forbes marked this pull request as ready for review November 17, 2021 13:03
@evan-forbes evan-forbes requested review from liamsi, tzdybal and Wondertan and removed request for tac0turtle November 17, 2021 13:04
types/block.go Outdated
Comment on lines 1258 to 1268
// need to add messages
protoMsgs := make([]*tmproto.Message, len(data.Messages.MessagesList))
for i, msg := range data.Messages.MessagesList {
protoMsgs[i] = &tmproto.Message{
NamespaceId: msg.NamespaceID,
Data: msg.Data,
}
}
tp.Messages = tmproto.Messages{MessagesList: protoMsgs}

return *tp
Copy link
Member

Choose a reason for hiding this comment

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

Yeaah, you found it. Congrats. LGTM

Copy link
Member

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

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

Is it expected that the test fails?

Copy link
Member

@liamsi liamsi left a comment

Choose a reason for hiding this comment

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

How did we not catch this before? 😅
Great find, straightforward fix!

@evan-forbes evan-forbes merged commit 7828d21 into v0.34.x-celestia Nov 18, 2021
@evan-forbes evan-forbes deleted the evan/fix-proto-block-data branch November 18, 2021 09:50
evan-forbes added a commit that referenced this pull request Apr 28, 2022
* export parsing functions

* add messages to proto version of data

* remove redundant test

* remove redundant test
evan-forbes added a commit that referenced this pull request May 3, 2022
* export parsing functions

* add messages to proto version of data

* remove redundant test

* remove redundant test
evan-forbes added a commit that referenced this pull request May 3, 2022
Add messages when converting to protobuf version of block data (#580)

* export parsing functions

* add messages to proto version of data

* remove redundant test

* remove redundant test
evan-forbes added a commit that referenced this pull request May 3, 2022
Add messages when converting to protobuf version of block data (#580)

* export parsing functions

* add messages to proto version of data

* remove redundant test

* remove redundant test
williambanfield pushed a commit to interchainio/celestia-core that referenced this pull request Jul 14, 2022
Add messages when converting to protobuf version of block data (celestiaorg#580)

* export parsing functions

* add messages to proto version of data

* remove redundant test

* remove redundant test
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.

4 participants