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

vocdoni / vocdoni-node / 8345233467
63%

Build:
DEFAULT BRANCH: main
Ran 19 Mar 2024 03:04PM UTC
Jobs 2
Files 183
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

19 Mar 2024 02:55PM UTC coverage: 60.94% (+0.04%) from 60.905%
8345233467

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.

19 of 19 new or added lines in 4 files covered. (100.0%)

15817 of 25955 relevant lines covered (60.94%)

38065.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit - 8345233467.1 19 Mar 2024 03:04PM UTC 0
48.43
GitHub Action Run
2 integration - 8345233467.2 19 Mar 2024 03:04PM UTC 0
51.28
GitHub Action Run
Source Files on build 8345233467
Detailed source file information is not available for this build.
  • Back to Repo
  • 74ad01c3 on github
  • Prev Build on main (#8293207762)
  • Next Build on main (#8346256550)
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