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

hyperledger / fabric-x-committer / 34463154028
91%

Build:
DEFAULT BRANCH: main
Ran 10 Sep 2026 09:58AM UTC
Jobs 3
Files 135
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 09:53AM UTC coverage: 90.308% (-0.1%) from 90.424%
34463154028

push

github

web-flow
[sidecar] Replace the relay's sync maps with single-owner tracking (#814)

#### Type of change

- Improvement (improvement to code, performance, etc)

#### Description

- Replace `blkNumToBlkWithStatus` with `inFlightBlocks`: the submitted
blocks awaiting
statuses always form a contiguous block-number window, so they are held
in a ring buffer
and looked up by index instead of by map probe. It also owns the
next-block-to-commit
counter, which used to be a separate relay field, so that invariant
lives in one place.
- Replace `txIDToHeight` with `txIDDedup`: a plain map owned solely by
`preProcessBlock`,
which evicts a committed block's TX IDs by watching that counter rather
than having the
status goroutine remove each ID as its status arrives. Nothing else
touches it, so it
needs no synchronization, and it holds only IDs now that no caller reads
the height back.
- Route a status by the (block number, TX number, TX ID) triple of its
ref, against the
tracked block's own `txs`, instead of by a global TX ID lookup. This
subsumes both
reconnect cases the previous check covered and additionally validates
the TX number,
  which the block-number-only check did not.
- Remove `activeBlocksCount`, which was written on every block and never
read.

The dedup window widens as a result: a TX ID is now held until its block
commits rather
than until its own status arrives, so a duplicate submitted in that gap
is rejected by the
relay, with a status that is not stored in the state DB and so is not
notified, rather than
by the VC. That window already existed for a TX whose status had not yet
arrived.

#### Additional details (Optional)

Per transaction, the status and mapping paths together drop from four
`sync.Map` operations
to one uncontended mutex, and the relay's own allocations fall from 26
to 23 per TX. The
gain grows with the size of the in-flight set, since that is what made
the map probes
expensive:

    BenchmarkMapBlockSize/blockSize=100     433.4k -> 448.6k t... (continued)

106 of 107 new or added lines in 5 files covered. (99.07%)

25 existing lines in 8 files now uncovered.

9346 of 10349 relevant lines covered (90.31%)

11177.13 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.58
0.22% service/sidecar/relay.go

Coverage Regressions

Lines Coverage ∆ File
8
78.98
-1.85% service/sidecar/sidecar.go
5
90.53
-2.63% service/vc/validator_committer_service.go
4
83.7
-2.96% service/vc/committer.go
2
89.81
-1.27% service/coordinator/validator_committer_manager.go
2
91.08
-0.62% mock/orderer.go
2
83.44
-0.65% service/vc/database.go
1
93.58
0.22% service/sidecar/relay.go
1
85.33
-1.33% loadgen/adapters/verifier.go
Jobs
ID Job ID Ran Files Coverage
1 db-test - 34463154028.1 10 Sep 2026 09:58AM UTC 135
78.21
GitHub Action Run
2 core-db-test - 34463154028.2 10 Sep 2026 09:58AM UTC 102
48.03
GitHub Action Run
3 unit-test - 34463154028.3 10 Sep 2026 09:59AM UTC 97
85.16
GitHub Action Run
Source Files on build 34463154028
  • Tree
  • List 135
  • Changed 17
  • Source Changed 0
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bde235fe on github
  • Prev Build on main (#34451375825)
  • Next Build on main (#34470402467)
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