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

Chaguar / common / 34126671263
82%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 01:20PM UTC
Jobs 1
Files 197
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

07 Sep 2026 01:18PM UTC coverage: 81.83% (+0.05%) from 81.783%
34126671263

push

github

web-flow
[blkstorage] Do not build tx index information no index will read (#166)

#### Type of change

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

#### Description

- `serializeBlock` takes an `indexNeeds`, and
`blockIndex.serializationNeeds` derives it from
the configured attributes, so the decision lives next to `indexBlock`,
which is the code that
consumes the result. Neither the txIDs nor the offsets are produced
unless an index reads them
  back.
- Split the offsets out into `constructTxIndexInfo`, which runs only
when an index wants them.
It derives each envelope's span from the envelope lengths rather than
observing them mid-append
(`protowire.AppendBytes` writes a length prefix plus the payload, so
`protowire.SizeBytes`
gives the same value the old `len(buf) - offset` did), and takes one
backing array each for the
  infos and their locations instead of two allocations per transaction.
- Pre-allocate the serialization buffer to `serializedBlockSize(block)`,
the exact length the
  writers produce, instead of growing it by append.
- Rename `addHeaderBytes` / `addMetadataBytes` to `appendHeaderBytes` /
`appendMetadataBytes` and
put the buffer first, matching the `protowire.Append*` shape. This
diverges from upstream
  Fabric's names.
- Drop the txID from the blockNum-tranNum `Debugf` in `indexBlock`: it
is only extracted when the
txID index is configured, so it would print empty for a store that
indexes by block number.
- Add `TestSerializeBlockIndexNeeds` (the serialized bytes are identical
for every combination,
and what was not asked for is absent),
`TestBlockIndexSerializationNeeds` (a table over the
attribute combinations), `TestSerializedBlockSizeIsExact`, and
`BenchmarkSerializeBlock` /
  `BenchmarkSerializedBlockSize`.

#### Additional details (Optional)

The txID is the expensive half: `GetOrComputeTxIDFromEnvelope`
unmarshals the whole envelope and
its payload header per transaction. On a 19-machine committer cluster
dri... (continued)

61 of 61 new or added lines in 3 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

13538 of 16544 relevant lines covered (81.83%)

0.82 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
94.04
-0.92% common/deliverclient/blocksprovider/bft_censorship_monitor.go
Jobs
ID Job ID Ran Files Coverage
1 34126671263.1 07 Sep 2026 01:20PM UTC 197
81.83
GitHub Action Run
Source Files on build 34126671263
  • Tree
  • List 197
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ce8ca3d6 on github
  • Prev Build on main (#33732769240)
  • Next Build on main (#34206250226)
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