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

tari-project / tari / 27135121061
60%

Build:
DEFAULT BRANCH: development
Ran 08 Jun 2026 12:34PM UTC
Jobs 1
Files 702
Run time 2min
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

08 Jun 2026 11:40AM UTC coverage: 61.308% (-0.007%) from 61.315%
27135121061

push

github

web-flow
fix(base_node): reject duplicate validator node registrations within a block (#7870)

Description
---
Adds a chain-linked validation rule
(`verify_no_duplicate_validator_node_registrations`) that rejects a
block body containing more than one validator node registration for the
same `(sidechain id, validator node public key)`, with a new
`DuplicateValidatorNodeRegistration` validation error.

Motivation and Context
---
A validator node registration UTXO is only checked against the validator
node set as of the **parent** block (`check_validator_node_registration`
→ `validator_node_exists`). That check cannot see other registrations in
the **same** block body, and `contains_duplicated_outputs` only compares
whole-output equality. So two outputs registering the same validator
node public key (with different commitments) both pass validation.

They then collide at commit time: the validator node set is keyed by
sidechain id + public key and inserted with LMDB `NO_OVERWRITE`
(`ValidatorNodeStore::insert`), so the second insert returns `KeyExists`
and the block is aborted during the DB write (`reorganize_chain`
restores the chain and returns an error — see the "this should typically
never happen unless there is a bug in the validator" comment there)
instead of being rejected cleanly during validation.

This makes the invariant ("at most one active registration per validator
node") an explicit validation rule rather than an accidental side effect
of the storage layer. The new error is classified as a long ban, so an
offending block is recorded as bad rather than silently retried. The
check runs before commit on both the block path
(`BlockBodyFullValidator::validate`) and the mempool transaction path
(`TransactionChainLinkedValidator`).

Note: this does not change the canonical chain — such blocks were
already uncommittable; it converts a commit-time abort into a clean
validation rejection.

How Has This Been Tested?
---
- New unit tests: distinct registration... (continued)

41 of 45 new or added lines in 2 files covered. (91.11%)

29 existing lines in 9 files now uncovered.

71978 of 117403 relevant lines covered (61.31%)

222669.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
71.43
4.18% base_layer/core/src/validation/aggregate_body/aggregate_body_chain_validator.rs
1
16.98
-0.33% base_layer/core/src/validation/error.rs

Coverage Regressions

Lines Coverage ∆ File
8
59.31
-1.42% comms/dht/src/connectivity/mod.rs
6
92.14
-1.27% comms/dht/src/outbound/broadcast.rs
3
64.41
-1.27% comms/core/src/connectivity/requester.rs
3
86.7
-0.38% comms/dht/src/actor.rs
2
85.42
-0.46% base_layer/p2p/src/services/liveness/service.rs
2
63.05
-0.23% comms/core/src/connectivity/manager.rs
2
81.36
-3.39% comms/core/src/pipeline/outbound.rs
2
83.12
-0.32% comms/core/src/protocol/rpc/client/mod.rs
1
98.88
-1.12% base_layer/common_types/src/dammsum.rs
Jobs
ID Job ID Ran Files Coverage
1 27135121061.1 08 Jun 2026 12:34PM UTC 702
61.31
GitHub Action Run
Source Files on build 27135121061
  • Tree
  • List 702
  • Changed 15
  • Source Changed 2
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27135121061
  • d584707b on github
  • Prev Build on development (#26880005178)
  • Next Build on development (#27141517531)
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