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

feat(network/messages): normalize from_block field to be uint or common.Hash #4191

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

EclesioMeloJunior
Copy link
Member

@EclesioMeloJunior EclesioMeloJunior commented Sep 19, 2024

Changes

Changes how we deal with BlockRequest messages, inspired by #4114 (comment)

  • use a uint as a single integer type and common.Hash for the from_block protobuf message field
  • Previously was able to use int/uint32/uint which has problem considering that the default block number type is uint and we should do casting from uint to uint32.

Tests

go test -tags integration github.com/ChainSafe/gossamer

Issues

N/A

Copy link
Contributor

@jimjbrettj jimjbrettj left a comment

Choose a reason for hiding this comment

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

Looks good, just a few small questions/comments

Copy link
Contributor

@haikoschol haikoschol left a comment

Choose a reason for hiding this comment

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

only nits except for the issue/question regarding SCALE encoding the block number

dot/network/messages/block.go Outdated Show resolved Hide resolved
dot/network/messages/block.go Outdated Show resolved Hide resolved
dot/network/messages/block.go Outdated Show resolved Hide resolved
dot/network/messages/block.go Outdated Show resolved Hide resolved
dot/network/messages/block.go Outdated Show resolved Hide resolved
dot/network/messages/block.go Outdated Show resolved Hide resolved
dot/network/messages/block.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jimjbrettj jimjbrettj left a comment

Choose a reason for hiding this comment

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

lgtm!

@EclesioMeloJunior EclesioMeloJunior merged commit 44f1e86 into development Sep 20, 2024
24 checks passed
@EclesioMeloJunior EclesioMeloJunior deleted the eclesio/variadic-uint branch September 20, 2024 15:50
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