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

hyperledger / fabric-x-committer / 34470402467
91%

Build:
DEFAULT BRANCH: main
Ran 10 Sep 2026 11:21AM UTC
Jobs 3
Files 139
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

10 Sep 2026 11:16AM UTC coverage: 90.679% (+0.4%) from 90.308%
34470402467

push

github

web-flow
[snapshot-hasher, vc] Hash snapshots in a dedicated service (#803)

#### Type of change

- New feature
- Improvement (improvement to code, performance, etc)
- Test update
- Documentation update

#### Description

- Add `service/snapshothasher`, a new single-instance service that owns
snapshot hashing end to end: it polls the latest durable `_snapshot`
record every `poll-interval` and hashes the record's clone inline, so
one path covers a fresh snapshot, a resubmitted one, and one orphaned
mid-hash by a restart. Start it with `committer start snapshot-hasher`
(gRPC 3001, monitoring 2120); it serves only health checks, since work
arrives through the state database, so `WaitForReady` is unconditionally
true -- the readiness handshake exists to hold back a gRPC server that
would otherwise answer requests before it can. It is named for hashing
rather than for snapshots because creating a snapshot and its clone
stays in the VC.
- Move the hasher (table discovery, keyset-paginated scans,
deterministic per-table and root digests) out of `service/vc` into that
service, and remove snapshot hashing from the VC entirely. The VC's only
snapshot duty is now to make the record durable atomically with its
clone.
- Because exactly one scheduler exists and hashing runs inline, no
cross-process exclusion is introduced at all: no lease, no ownership
token, no fenced state transitions, no leader election.
- Extract the durable `_snapshot` record contract into
`utils/statedb/snapshot_state.go` as a `SnapshotStateManager`
(latest-record pointer, encoding, `FOR UPDATE` read/update) and cover it
with unit tests. It lives in `statedb`, next to the schema it reads,
rather than in a package of its own; `utils/statedb` therefore joins
`REQUIRES_DB_PACKAGES` in the Makefile, since its tests now need a
database but not a particular one. Both processes share it: the VC reads
it to gate a new snapshot request and will write CHECKPOINTED through it
when checkpointing lands, while the ... (continued)

313 of 374 new or added lines in 16 files covered. (83.69%)

4 existing lines in 3 files now uncovered.

9505 of 10482 relevant lines covered (90.68%)

11114.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
22
77.55
service/snapshothasher/scheduler.go
20
75.31
utils/statedb/snapshot_state.go
17
82.83
service/snapshothasher/hasher.go
2
92.0
service/snapshothasher/snapshot_hasher_service.go

Coverage Regressions

Lines Coverage ∆ File
2
84.27
1.25% service/vc/database_snapshot.go
1
81.29
2.31% service/sidecar/sidecar.go
1
93.9
-1.22% loadgen/adapters/common.go
Jobs
ID Job ID Ran Files Coverage
1 core-db-test - 34470402467.1 10 Sep 2026 11:22AM UTC 106
48.43
GitHub Action Run
2 unit-test - 34470402467.2 10 Sep 2026 11:21AM UTC 94
85.79
GitHub Action Run
3 db-test - 34470402467.3 10 Sep 2026 11:21AM UTC 139
78.64
GitHub Action Run
Source Files on build 34470402467
  • Tree
  • List 139
  • Changed 26
  • Source Changed 0
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ffbda74e on github
  • Prev Build on main (#34463154028)
  • Next Build on main (#34933597226)
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