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

vocdoni / vocdoni-node / 8345233467 / 1
63%
main: 63%

Build:
DEFAULT BRANCH: main
Ran 19 Mar 2024 03:04PM UTC
Files 167
Run time 6s
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

19 Mar 2024 02:55PM UTC coverage: 48.435% (+0.03%) from 48.402%
8345233467.1

push

github

altergui
vochain/indexer: move away from protojson

We are starting to use sqlite backup snapshots from the indexer
as a way to bootstrap one node from another, and this system requires
the snapshots to be deterministic so that they may be hashed.

We encountered issues where protojson-encoded column values
had inconsistent whitespace depending on each node,
and after some investigation, we found the culprit:
https://go-review.googlesource.com/c/protobuf/+/194037

Since protojson is explicitly non-deterministic, to the point that it
inserts random spaces depending on the hash of the binary,
avoid it entirely and use proto encoding instead.

We had chosen protojson for the same reason that we encode other
structured bits of data in encoding/json: sqlite has some native
support for JSON, meaning it is a bit more flexible than binary formats.

Even though proto is also not a stable format per se,
we already use it as a deterministic encoding in the state messages,
and it does follow a relatively strict specification,
so it seems to be deterministic enough for us in practice.

Note that this is a breaking change for indexer databases;
any node with an existing indexer database should throw it away.
The alternative was to write a SQL migration with Go code
to decode protojson and re-encode as proto, but we decided that wasn't
worth the effort.

11108 of 22934 relevant lines covered (48.43%)

39017.79 hits per line

Source Files on job unit - 8345233467.1
  • Tree
  • List 0
  • Changed 19
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 8345233467
  • 74ad01c3 on github
  • Prev Job for on main (#8293207762.2)
  • Next Job for on main (#8346256550.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc