Skip to content

Conversation

@Mustang98
Copy link
Contributor

  • Activate improved compression for all types of broadcast
  • Activate compression with state for block_broadcast and block_full
  • Turn on compression for broadcast in public overlay and block_full
  • Extend benchmark logs with more details

All types of broadcast and compression configuration for them:
image

Depends on #1944

@github-actions
Copy link

  • Block proof parsing for state fetch is incorrect for shard blocks. extract_prev_blocks_from_proof (validator/full-node-serializer.cpp:144-170) unpacks a BlockProof record, but shard broadcasts/data-full carry a proof link, not a block proof (ValidateBroadcast still calls create_proof_link for non-masterchain). As soon as need_state_for_decompression returns true, all shard block broadcasts/data-full take this path (validator/full-node-shard.cpp:822-882; validator/net/download-block-new.cpp:229-265), the parser errors with “invalid block proof in broadcast”, and the message is dropped before decompression. With state-based compression now enabled by default, this would prevent processing shard broadcasts and shard block downloads entirely.

@github-actions
Copy link

Findings

  • crypto/vm/boc-compression.cpp:716 – When rebuilding a pruned branch from the provided state during “with state” decompression, the code strips the highest significant bit from the pruned branch mask (base_mask = mask & (highest_bit_mask - 1)), then builds the LevelMask and max_level from this reduced mask. The highest significant level is never marked/significant, so the reconstructed pruned branch omits its top-level hash/depth while still advertising the original mask. Finalization can fail or produce an incorrect cell hash whenever a Merkle Update’s left subtree contains a pruned branch with level >0. Use the full mask to build the LevelMask/max_level and iterate over all significant levels.

Notes / Risks

  • State-dependent decompression will still fail for any MU left subtree containing pruned branches until the mask handling is fixed.

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