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

[stateless_validaiton] Skip validation of state witness for chunk right after genesis #10487

Merged

Conversation

shreyan-gupta
Copy link
Contributor

We are skipping state witness validation for the chunk right after genesis chunk due to some complications of trying to run the genesis chunk in runtime (it's not possible to do so).

Initially this edge case check was a part of send_chunk_state_witness_to_chunk_validators and we didn't send state witness at all.

This has an issue that we do not process and send chunk endorsements either due to this. Instead pushed this check into process_chunk_state_witness and we send chunk endorsements for this special case.

@shreyan-gupta shreyan-gupta added the A-stateless-validation Area: stateless validation label Jan 24, 2024
@shreyan-gupta shreyan-gupta requested a review from a team as a code owner January 24, 2024 14:32
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (1367881) 71.93% compared to head (610bc55) 71.94%.
Report is 1 commits behind head on master.

Files Patch % Lines
chain/client/src/chunk_validation.rs 85.36% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #10487    +/-   ##
========================================
  Coverage   71.93%   71.94%            
========================================
  Files         720      720            
  Lines      145620   145776   +156     
  Branches   145620   145776   +156     
========================================
+ Hits       104755   104872   +117     
- Misses      36057    36082    +25     
- Partials     4808     4822    +14     
Flag Coverage Δ
backward-compatibility 0.08% <0.00%> (-0.01%) ⬇️
db-migration 0.08% <0.00%> (-0.01%) ⬇️
genesis-check 1.26% <0.00%> (-0.01%) ⬇️
integration-tests 36.84% <85.71%> (+0.03%) ⬆️
linux 71.34% <0.00%> (-0.01%) ⬇️
linux-nightly 71.51% <85.71%> (+0.01%) ⬆️
macos 55.22% <0.00%> (+0.01%) ⬆️
pytests 1.48% <0.00%> (-0.01%) ⬇️
sanity-checks 1.27% <0.00%> (-0.01%) ⬇️
unittests 67.92% <2.38%> (-0.02%) ⬇️
upgradability 0.13% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

chain/client/src/chunk_validation.rs Outdated Show resolved Hide resolved
@@ -421,10 +407,54 @@ fn apply_result_to_chunk_extra(
)
}

fn send_chunk_endorsement_to_block_producers(
Copy link
Member

Choose a reason for hiding this comment

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

We could name it endorse_chunk for demonstrativeness. Not a strong opinion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the current name as it's more explicit

@shreyan-gupta shreyan-gupta added this pull request to the merge queue Jan 24, 2024
Merged via the queue into master with commit 669df43 Jan 24, 2024
25 of 26 checks passed
@shreyan-gupta shreyan-gupta deleted the shreyan/stateless_validation/skip_validate_genesis branch January 24, 2024 16:07
github-merge-queue bot pushed a commit that referenced this pull request Jan 26, 2024
…r genesis (#10503)

This is mainly to solve issues related to testing where we were
initially not getting the chunk endorsements.

I've created an issue for this here:
#10502

Fixes issue in PR #10487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stateless-validation Area: stateless validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants