Skip to content

refactor: remove validator regions and the region-shuffle fork gate - #1328

Draft
MavenRain wants to merge 8 commits into
mainfrom
1327-region-shuffle-threat-model-observability
Draft

refactor: remove validator regions and the region-shuffle fork gate#1328
MavenRain wants to merge 8 commits into
mainfrom
1327-region-shuffle-threat-model-observability

Conversation

@MavenRain

@MavenRain MavenRain commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Replaces this PR's previous scope (#1327 items 1 and 2). Closes #1327: the seat guarantee it documents no longer exists.

Problem

Standup (2026-09-04): the network does not support validator regions yet. A future spec will decide how regions are consumed. Until then the client carries a region-aware committee draw behind a dormant fork gate (#1294), the per-region seat tally this branch had added (#1327), and a setValidatorRegion binding with no caller. Dead machinery on a consensus-critical path costs review and audit time and gives nothing back.

Changes

Threat model

Out of scope

  • The contract side: ValidatorInfo.region, setValidatorRegion and the ValidatorRegionUpdated event in tn-contracts, plus the "Region-Aware Committee Shuffle" section of design.md and invariants.md that says the client implements it. Those are tn-contracts PRs, and the submodule pin is untouched here.
  • The future region spec.

Testing

  • cargo +nightly fmt -- --check on tn-reth, tn-types and telcoin-network-cli.
  • cargo +1.94 check -p tn-reth -p tn-types -p telcoin-network-cli --all-targets.
  • cargo +1.94 test -p tn-reth --lib -- assemble: the four pre-existing committee-assembly tests, including the seed-pinned golden order.
  • cargo +1.94 test -p tn-types --lib -- forks::: the remaining fork-gate tests.
  • CI runs the nightly clippy and the workspace nextest lane on push; the pinned +1.94 attest runs on the second machine.

🤖 Generated with Claude Code

… gate (#1279)

Implement the region-aware committee shuffle documented in tn-contracts
design.md, deferred out of PR #653 because the RNG draw order is
consensus-critical. The ordering step of assemble_new_committee now
branches on a new REGION_SHUFFLE_FORK_EPOCH gate (dormant u32::MAX on
adiri, active from genesis elsewhere), keyed on the epoch the committee
will serve. The region arm partitions by GSMA region, Fisher-Yates
shuffles each group, the unassigned pool, and the region visit order,
then round-robins one seat per region per round before the unassigned
pool fills the rest. With every region 0 the sequence draws identically
to the flat shuffle, so an armed fork changes nothing until governance
assigns a region. The legacy arm keeps the historical draws verbatim.

Closes #1279.

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
…e-committee-shuffle

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
…e-committee-shuffle

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
…1327)

A region assignment under the region-aware shuffle (#1279) is a governance
attestation with a guaranteed committee seat attached: round one seats one
validator from every assigned region, so a validator alone in its claimed
region is always seated while the flat shuffle gave it C/N, and the protocol
cannot verify where a validator runs.

Document the seat-probability analysis on `region_aware_order` and on the
`REGION_SHUFFLE_FORK_EPOCH` rollout notes, and make the advantage observable
at every region-aware epoch close: `RegionSeatReport` tallies per-region pool
and seat counts, `record_region_seats` logs the tally, warns on any assigned
singleton region, and publishes `tn_reth.epoch_close_region_pool{region}`,
`tn_reth.epoch_close_region_seated{region}` and
`tn_reth.epoch_close_singleton_regions`. The draw sequence is untouched and
the flat pre-fork arm publishes nothing.

Closes #1327 (items 1 and 2).

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
…hreat-model-observability

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>

# Conflicts:
#	crates/tn-reth/src/evm/block.rs
#	crates/tn-reth/src/metrics.rs
#	crates/types/src/forks.rs
@MavenRain MavenRain added the cantina anticipated cantina findings - addressed before report label Sep 4, 2026
@MavenRain MavenRain self-assigned this Sep 4, 2026
@MavenRain

Copy link
Copy Markdown
Contributor Author

Putting into draft in preparation for eradication of the region concept

@MavenRain
MavenRain marked this pull request as draft September 4, 2026 17:23
…shuffle fork gate

Standup decision (2026-09-04): the network does not support validator
regions yet, and a future spec will decide how they are consumed.  Remove
every client-side trace: the region-aware committee draw and its
REGION_SHUFFLE_FORK_EPOCH gate (#1294), the per-region seat
observability this branch had added on top (#1327), and the unused
setValidatorRegion binding.

crates/tn-reth/src/evm/block.rs, crates/types/src/forks.rs and
crates/telcoin-network-cli/src/node.rs are byte-identical to their
pre-#1294 content (main 286888c): assemble_new_committee is the flat
Fisher-Yates draw again, forks.rs keeps every other fork constant and
gate, and the startup fork-schedule log drops the region entry.
metrics.rs and the tn-reth README are back to main, without the region
seat tally and gauges.

No fork is needed.  The gate was dormant (u32::MAX) on adiri, no
validator carries a nonzero on-chain region, and with every region 0 the
removed arm drew identically to the flat shuffle.  The committee draw
sequence is unchanged on every network, and the restored code is the
code that produced the chain's history.

ValidatorInfo.region stays in the ConsensusRegistry sol! binding: the
pinned contract still returns it, so the struct layout must match for
ABI decoding.  The client never reads it.  Removing the field from the
contract, and the design.md claim that the client shuffles
region-aware, are tn-contracts work.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
@MavenRain MavenRain changed the title feat(tn-reth): document and publish the region-aware seat guarantee (#1327) refactor: remove validator regions and the region-shuffle fork gate Sep 4, 2026
…hreat-model-observability

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>

# Conflicts:
#	crates/telcoin-network-cli/src/node.rs
#	crates/types/src/forks.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cantina anticipated cantina findings - addressed before report

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Region-aware shuffle (#1294): a misreported region buys a guaranteed committee seat, and no attestation, monitoring, or slash path exists

1 participant