Closed tayfunelmas closed 1 month ago
Attention: Patch coverage is 43.53312%
with 179 lines
in your changes missing coverage. Please review.
Project coverage is 71.43%. Comparing base (
0e6179a
) to head (7e54fdb
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Previously we added
ChunkEndorsementBitmap
toBlockInfo
to pass the information about which endorsements are received to theEpochManager
. We used this in a tool to simulate the validator rewards and kickoffs if we used the received endorsements stats (instead of chunk production stats).In this PR, we complete the picture by adding the bitmap to the
BlockHeader
. This bitmap is passed to theBlockInfo
when saving it for theEpochManager
. The bitmap is produced directly from the endorsement signatures in theBlockBody
, with the same number of shards and chunk validator assignments per shard.We also add validation logic for block body and header. For the block body, we can compare the endorsement signatures to the bitmap values. For the block header, we can compare the length of the bitmap to the number of validator assignments.
NOTE: I am currently reusing
ProtocolFeature::ChunkEndorsementsInBlockHeader
for the new block header version. And due to some tests assuming that only the last block header version is used, I moved this feature beyond Nightly. Once I can verify the easy mode works, I will send a PR to introduce a separate feature to start usingBlockHeaderV5
and in Nightly.