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

Randomized tests for BeaconBlockBodyDeneb round trip. #2466

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

Conversation

sbudella-gco
Copy link
Collaborator

@sbudella-gco sbudella-gco commented Feb 3, 2025

Property-based test for BeaconBlockBody serialization round trip, using karalabe-ssz

types.BeaconBlockBody needs a custom generator in order to avoid nil-pointer dereference during serialization, which is not an issue, provided that the same field is deserialized as an empty slice (see also here); indeed, the initial aim was to ensure that serializing nil pointers would not result in a nil pointer after deserialization, which is the reason why the roll function is biased towards returning zero half of the times.

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 21.17%. Comparing base (1aff871) to head (c768d7f).
Report is 3 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (1aff871) and HEAD (c768d7f). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (1aff871) HEAD (c768d7f)
2 1
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2466       +/-   ##
===========================================
- Coverage   32.36%   21.17%   -11.20%     
===========================================
  Files         350        3      -347     
  Lines       15592       85    -15507     
  Branches       20       20               
===========================================
- Hits         5047       18     -5029     
+ Misses      10182       66    -10116     
+ Partials      363        1      -362     

see 347 files with indirect coverage changes

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.

1 participant