Skip to content

Conversation

@ksn6
Copy link
Contributor

@ksn6 ksn6 commented Nov 29, 2025

Problem and Summary of Changes

block_component.rs is getting hard to manage. Let's use wincode to solve this.

Notes:

  • block_component_v2.rs now has close to zero custom serde code, and is much simpler to maintain. We have tests to validate that behavior identically matches that of block_component.rs.

  • Once this lands, we'll entirely remove block_component.rs.

  • This PR does not use wincode to serde EntryBatch-es just yet. We'll do this as soon as we upstream to agave. I tried cherry-picking the PRs to get Entry to implement SchemaRead / SchemaWrite, but ran into some versioning problems. Could probably get this to work with some effort, but there's no point, since we'll be upstreaming soon anyways.

@ksn6 ksn6 force-pushed the block-component-via-wincode branch from 0c03888 to cd6a2f7 Compare November 29, 2025 00:51
@ksn6 ksn6 force-pushed the block-component-via-wincode branch from cd6a2f7 to ec10bcf Compare November 29, 2025 00:55
@ksn6 ksn6 changed the title block component: use wincode block component: introduce wincode Nov 29, 2025
Copy link
Contributor

@cpubot cpubot left a comment

Choose a reason for hiding this comment

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

A few suggestions, and a question about LengthPrefixed. Will have more follow-up after I understand LengthPrefixed -- it probably shouldn't use SeqLen.

@ksn6 ksn6 force-pushed the block-component-via-wincode branch from 6683bdd to b554bed Compare December 2, 2025 01:02
@ksn6 ksn6 requested a review from cpubot December 2, 2025 01:02
@ksn6 ksn6 requested a review from cpubot December 2, 2025 05:20
Copy link
Contributor

@cpubot cpubot left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@ksn6 ksn6 merged commit be86cc6 into anza-xyz:master Dec 2, 2025
7 checks passed
@ksn6 ksn6 deleted the block-component-via-wincode branch December 2, 2025 15:32
ksn6 added a commit that referenced this pull request Dec 4, 2025
#### Problem and Summary of Changes
PR #615 introduced `block_component_v2.rs`, which:

- Is identical to `block_component.rs` from a functionality standpoint
(demonstrated via tests)
- Is written via `wincode`, resulting in far cleaner logic

This PR:

- Moves the contents of `block_component_v2.rs` into
`block_component.rs`, removing the old `BlockComponent` implementation
- Updates call-sites (all cosmetic 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.

2 participants