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

hyperledger / fabric-x-committer / 34934205956
91%

Build:
DEFAULT BRANCH: main
Ran 15 Sep 2026 05:52AM 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

15 Sep 2026 05:47AM UTC coverage: 90.579% (+0.2%) from 90.422%
34934205956

push

github

web-flow
[sidecar] Stop allocating per transaction in key validation and TX references (#821)

#### Type of change

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

#### Description

- `checkKeys` now takes the namespace and walks its three read/write
sets through `nsKey`,
instead of the caller copying every key into one slice for it. It finds
duplicates by
comparing pairs, falling back to a set above `maxKeysForPairwiseCheck`
keys where the
  quadratic comparison would cost more than the map does.
- `mapBlock` allocates the block's `TxRef` and `TxWithRef` values as two
slabs, one entry per
message, instead of one of each per transaction. Only their addresses
are handed on; nothing
  copies an element out, which `go vet`'s copylocks check enforces.
- The mapping benchmarks now generate their transactions with an EDDSA
policy
(`benchTxProfile`) instead of `workload.DefaultProfile`'s `NoScheme`.
With no scheme every
namespace carries a nil endorsement, so mapping rejected all of them
with
`MALFORMED_MISSING_SIGNATURE` before validating a single key or building
a `TxWithRef`:
the benchmarks measured the rejection path, not the path this change
touches.
- Adds `TestKeyFormValidation`, covering empty and duplicate keys on
both sides of the
pairwise/set threshold and duplicates that span two of a namespace's
read/write sets. Neither
`MALFORMED_EMPTY_KEY` nor `MALFORMED_DUPLICATE_KEY_IN_READ_WRITE_SET`
had any coverage before.

#### Additional details (Optional)

On the fixed workload described above, `BenchmarkMapBlockSize` drops
from 24 to 19 allocations
and 1,359 to 1,246 bytes per transaction:

go test ./service/sidecar/ -run '^$' -bench '^BenchmarkMapBlockSize$'
-benchmem

Of that, `checkKeys` accounted for three allocations for the two-key
namespace this workload
generates — the map, the slice the keys were copied into, and the string
conversion per key —
and now allocates none at any key count. The remaining two are the
per-transaction `TxR... (continued)

40 of 40 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

9509 of 10498 relevant lines covered (90.58%)

11047.62 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
94.74
-2.11% mock/vcservice.go
Jobs
ID Job ID Ran Files Coverage
1 core-db-test - 34934205956.1 15 Sep 2026 05:54AM UTC 106
48.33
GitHub Action Run
2 unit-test - 34934205956.2 15 Sep 2026 05:53AM UTC 94
85.84
GitHub Action Run
3 db-test - 34934205956.3 15 Sep 2026 05:52AM UTC 139
78.41
GitHub Action Run
Source Files on build 34934205956
  • Tree
  • List 139
  • Changed 14
  • Source Changed 0
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 46ce2819 on github
  • Prev Build on main (#34933597226)
  • Next Build on main (#35705135807)
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