Skip to content

Conversation

@eserilev
Copy link
Member

Issue Addressed

During custody backfill sync there could be an edge case where we update CGC at the same time where we are importing a batch of columns which may cause us to incorrectly overwrite values when calling backfill_validator_custody_requirements. To prevent this race condition, the expected cgc is now passed into this function and is used to check if the expected cgc == the current validator cgc. If the values arent equal, this probably indicates that a very recent CGC occurred so we do not prune/update values in the epoch_validator_custody_requirements map.

@eserilev eserilev requested a review from jxs as a code owner October 22, 2025 17:36
@eserilev eserilev added bug Something isn't working fulu Required for the upcoming Fulu hard fork v8.0.0 Q4 2025 Fusaka Mainnet Release work-in-progress PR is a work-in-progress labels Oct 22, 2025
@michaelsproul michaelsproul changed the base branch from unstable to release-v8.0 October 27, 2025 23:50
@michaelsproul
Copy link
Member

Updated the target branch to release-v8.0, the new branch for the release

@eserilev eserilev added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Oct 28, 2025
// This should verify that a data column sidecar associated to a block root that doesn't exist in the store cannot
// be imported.
#[tokio::test]
async fn test_import_historical_data_columns_batch_no_block_found() {
Copy link
Member Author

Choose a reason for hiding this comment

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

this was a redundant test case

let store = get_store_generic(&db_path, StoreConfig::default(), spec);
let start_slot = Epoch::new(0).start_slot(E::slots_per_epoch()) + 1;
let end_slot = Epoch::new(0).end_slot(E::slots_per_epoch());
let cgc = 128;
Copy link
Member

Choose a reason for hiding this comment

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

nit: could use either E::number_of_columns or harness.chain.data_availability_checker.custody_context().custody_group_count_at_head(&sepc) instead.

.forwards_iter_block_roots_until(start_slot, end_slot)
.unwrap();

// Assert that data columns now exist for epoch 0
Copy link
Member

Choose a reason for hiding this comment

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

Nice, these comments help! Thanks

let store = get_store_generic(&db_path, StoreConfig::default(), spec);
let start_slot = Slot::new(1);
let end_slot = Slot::new(E::slots_per_epoch() * 2 - 1);
let cgc = 128;
Copy link
Member

Choose a reason for hiding this comment

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

Same as above

Copy link
Member

@jimmygchen jimmygchen left a comment

Choose a reason for hiding this comment

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

Nice, the logic looks correct to me. Just a small nit on hard coded values - i think the values is unlikely to change but would be good to keep hard coded values to a minimum for maintainability.

@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fulu Required for the upcoming Fulu hard fork v8.0.0 Q4 2025 Fusaka Mainnet Release waiting-on-author The reviewer has suggested changes and awaits thier implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants