Skip to content

[release/6.x] Always emit transaction entry flag for primary-dictated chunks#7640

Merged
eddyashton merged 5 commits intomicrosoft:release/6.xfrom
eddyashton:backport/release/6.x/7097
Feb 5, 2026
Merged

[release/6.x] Always emit transaction entry flag for primary-dictated chunks#7640
eddyashton merged 5 commits intomicrosoft:release/6.xfrom
eddyashton:backport/release/6.x/7097

Conversation

@eddyashton
Copy link
Member

See discussion in #7636 for motivation.

This is primarily a backport of #7097, which contains a stack of changes to move chunking decisions to a central in-enclave LedgerChunker, and using this rather than a per-tx flag on the in-memory Store to indicate that a chunk should be created at the next signature. The one big difference is that backups can still choose independently to create their own chunks, which will then not have the flag set in the transaction header. This version thereby creates a bridging release - it can interop with older nodes (consistent chunk threshold => consistent chunks on every node, decided locally by each backup), as well as with 7.x nodes (every chunking decision made by the primary is transmitted with the ledger, so that a peer can choose to rely on it authoritatively). This produces a few diffs in the unit tests between this branch and main, patched with a bit of trial-and-error reasoning.

@eddyashton eddyashton requested a review from a team as a code owner February 3, 2026 15:37
@eddyashton eddyashton added the 6.x-backport Highlight PRs targeting the 6.x branch label Feb 3, 2026
@achamayou
Copy link
Member

@eddyashton I suggest we add a line of INFO logging around https://github.com/microsoft/CCF/blob/release/6.x/src/host/ledger.h#L1434 which triggers if file->get_current_size() >= chunk_threshold && !force_chunk_after).

That will only trigger in:

  1. a mixed pre-6.0.21/post-6.0.21 network if the primary is pre-6.0.21 (which is fine)
  2. unexpected situations that warrant a closer look

@achamayou
Copy link
Member

Genoa CI failure caused by primary unexpectedly stuck for a very long time trying to write something:

2026-02-03T17:42:28.778970Z        100 [info ] CCF/src/host/time_bound_logger.h:54  | Operation took too long (  2.781s): Writing ledger entry - 2119 bytes, committable=true

@eddyashton
Copy link
Member Author

Genoa CI failure caused by primary unexpectedly stuck for a very long time trying to write something:

2026-02-03T17:42:28.778970Z        100 [info ] CCF/src/host/time_bound_logger.h:54  | Operation took too long (  2.781s): Writing ledger entry - 2119 bytes, committable=true

Took me a while to find this, since we had a green rerun after.

https://github.com/microsoft/CCF/actions/runs/21640210587/job/62377754657#step:6:244

Seems fishy, but so does everything.

@achamayou
Copy link
Member

@eddyashton yeah I kicked it off again, because this is unrelated to this PR. It's unfortunate we have such I/O spikes on C-ACI, but I don't know what we can do about it. We've already shrunk the CI there to the bare useful minimum.

Less! Enthusiastic!!
@eddyashton eddyashton marked this pull request as draft February 4, 2026 10:56
@eddyashton
Copy link
Member Author

Converting this to draft for now, while we investigate #7637.

@eddyashton eddyashton marked this pull request as ready for review February 5, 2026 11:41
@eddyashton eddyashton merged commit 91f1cc0 into microsoft:release/6.x Feb 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.x-backport Highlight PRs targeting the 6.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants