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 nil hash validation #2296

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add nil hash validation #2296

wants to merge 3 commits into from

Conversation

AnkushinDaniil
Copy link
Contributor

@AnkushinDaniil AnkushinDaniil commented Dec 1, 2024

Fix #2239
Continue #2290

This pull request introduces protobuf hash validation

This PR can be simplified with #2342

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.44%. Comparing base (5107487) to head (fac578b).
Report is 37 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2296      +/-   ##
==========================================
+ Coverage   75.42%   75.44%   +0.01%     
==========================================
  Files         107      107              
  Lines       11406    11406              
==========================================
+ Hits         8603     8605       +2     
+ Misses       2150     2149       -1     
+ Partials      653      652       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AnkushinDaniil AnkushinDaniil enabled auto-merge (squash) December 2, 2024 10:36
@pnowosie pnowosie self-requested a review December 2, 2024 10:38
Copy link
Contributor

@pnowosie pnowosie left a comment

Choose a reason for hiding this comment

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

👍

Makefile Show resolved Hide resolved
Copy link

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

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

What does using buf in this PR is improving over not using buf?

Would adding buf means an extra dependency to compile Juno successfully or just for development? Should the use of buf be documented somewhere as dependency?

Some questions, trying to understand the code base

@AnkushinDaniil
Copy link
Contributor Author

What does using buf in this PR is improving over not using buf?

Because we need to import "buf/validate/validate.proto";, which is external proto. protoc requires all proto files to be in the project.

Would adding buf means an extra dependency to compile Juno successfully or just for development? Should the use of buf be documented somewhere as dependency?

This is for development only. buf and protoc are tools that allow you to generate go files from proto files. The main difference is that buf generates remotely and has a more convenient configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Juno panics when receiving Transaction message with nil transaction_hash in P2P sync
3 participants