Skip to content

Assert ledger chunking#7637

Open
cjen1-msft wants to merge 27 commits intomicrosoft:mainfrom
cjen1-msft:ledger-asserts
Open

Assert ledger chunking#7637
cjen1-msft wants to merge 27 commits intomicrosoft:mainfrom
cjen1-msft:ledger-asserts

Conversation

@cjen1-msft
Copy link
Contributor

We currently are somewhat lax about two of the claims we make, that chunking is deterministic, which is often unchecked and unchecked in LTS; and that a chunk's end has the relevant tx flag set such that it is recreated on followers correctly.

This PR adds those checks, in draft mode for now until everything is fixed.

@cjen1-msft cjen1-msft added the run-long-test Run Long Test job label Feb 2, 2026
@cjen1-msft cjen1-msft changed the title [DON'T MERGE] Assert ledger chunking Assert ledger chunking Feb 5, 2026
@cjen1-msft cjen1-msft marked this pull request as ready for review February 5, 2026 13:57
@cjen1-msft cjen1-msft requested a review from a team as a code owner February 5, 2026 13:57
Copilot AI review requested due to automatic review settings February 5, 2026 13:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds assertions to verify ledger chunking determinism and ensures that chunk end transactions have the correct flags set. The PR introduces a new skip_verify_chunking parameter to allow selective bypassing of these checks in tests where ledger files are intentionally modified or when working with older CCF versions that may not have complete chunking flags.

Changes:

  • Added check_ledger_files_chunk_flags method to verify chunking flags in ledger files
  • Introduced skip_verify_chunking parameter throughout the network infrastructure
  • Added CCFVersion class for more robust version comparisons
  • Updated compatibility tests to skip chunk verification for pre-7.0.0 versions

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/infra/network.py Added chunking verification logic and skip_verify_chunking parameter support
tests/infra/node.py Added CCFVersion class for version comparisons and updated version_after logic
tests/infra/remote.py Updated ledger_paths to filter out non-existent paths
tests/lts_compatibility.py Added version-specific logic to skip chunk verification for older versions
tests/recovery.py Enabled skip_verify_chunking for recovery tests using pre-existing ledger files
tests/e2e_operations.py Enabled skip_verify_chunking for tests that intentionally modify ledger files

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-long-test Run Long Test job

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants