• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger / fabric-x-committer / 36565007287
91%

Build:
DEFAULT BRANCH: main
Ran 29 Sep 2026 12:03PM UTC
Jobs 3
Files 141
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Sep 2026 11:57AM UTC coverage: 90.735% (+0.2%) from 90.572%
36565007287

push

github

web-flow
[vc, coordinator, sidecar] Verify a checkpoint against the local snapshot hash before committing it (#804)

#### Type of change

- New feature
- Test update
- Documentation update

#### Description

- Add `service/vc/checkpoint.go`: before a `_checkpoint` write commits,
the VC compares the attested hash against the hash it computed for the
referenced snapshot. On a match the attestation commits and the
`_snapshot` record advances to CHECKPOINTED; otherwise the write is
dropped and either the TX is rejected (a snapshot this committer is not
awaiting) or a `CheckpointFeedback` gates block intake — HOLD while the
hash is still computing, HALT when local state contradicts it.
- Reject rather than halt on bad input. `_checkpoint` is
client-submittable, so halting on a checkpoint for a block that was
never snapshotted would let any authorized submitter stop the committer.
Both rejections reuse MALFORMED_CHECKPOINT_INVALID_KEY with a TODO: a
precise REJECTED_CHECKPOINT_NO_SUCH_SNAPSHOT has to land in
fabric-x-common first.
- Advance the record inside the commit transaction
(`statedb.MarkSnapshotCheckpointedInTx`). A second transaction would
leave a crash window where a durable attestation reads to the admission
gate as "still awaiting a checkpoint", rejecting every later snapshot.
Its invariant violations are non-retryable, so the commit retry now
treats ErrNonRetryable as terminal.
- Verify in the validator (`rejectCheckpointIfNotVerified`), which
already holds the database handle; the committer only forwards the
verdict. Report no per-TX status for a held checkpoint: `insertTxStatus`
would make the sidecar's re-submission a duplicate forever, so the
feedback carries the full `TxRef` instead.
- Forward the status-less batch in the coordinator and release the
checkpoint's node explicitly, or the re-delivered checkpoint deadlocks
behind its own stale node. Decrement `numTxsInProgress` for the feedback
via a shared `txCount` helper, or a feedback-only batch le... (continued)

214 of 242 new or added lines in 15 files covered. (88.43%)

12 existing lines in 8 files now uncovered.

9764 of 10761 relevant lines covered (90.74%)

10761.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
88.73
service/vc/checkpoint.go
8
74.77
-0.53% utils/statedb/snapshot_state.go
4
88.37
-2.71% service/coordinator/validator_committer_manager.go
4
92.19
-1.39% service/sidecar/relay.go
2
97.76
-0.87% service/vc/preparer.go
2
78.22
3.75% service/vc/validator.go

Coverage Regressions

Lines Coverage ∆ File
2
92.19
-1.39% service/sidecar/relay.go
2
88.37
-2.71% service/coordinator/validator_committer_manager.go
2
97.22
-2.78% service/verifier/verifier_server.go
2
91.94
0.54% service/vc/validator_committer_service.go
1
97.12
-0.96% mock/coordinator.go
1
82.22
2.31% service/sidecar/sidecar.go
1
85.33
-1.33% loadgen/adapters/verifier.go
1
93.9
-1.22% loadgen/adapters/common.go
Jobs
ID Job ID Ran Files Coverage
1 unit-test - 36565007287.1 30 Sep 2026 07:18AM UTC 95
86.13
GitHub Action Run
2 core-db-test - 36565007287.2 30 Sep 2026 07:18AM UTC 108
48.93
GitHub Action Run
3 db-test - 36565007287.3 29 Sep 2026 12:03PM UTC 141
78.62
GitHub Action Run
Source Files on build 36565007287
  • Tree
  • List 141
  • Changed 29
  • Source Changed 0
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b2e37863 on github
  • Prev Build on main (#36525890411)
  • Next Build on main (#36705432257)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc