docs: fix validator address uniqueness to match implementation (ZELLIC-67)#2865
Open
docs: fix validator address uniqueness to match implementation (ZELLIC-67)#2865
Conversation
📊 Tempo Precompiles Coverage |
SuperFluffy
approved these changes
Feb 26, 2026
Amp-Thread-ID: https://ampcode.com/threads/T-019c963d-1942-7219-a89a-b0e727c3dadb Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c963d-1942-7219-a89a-b0e727c3dadb Co-authored-by: Amp <amp@ampcode.com>
The test needs a non-zero key (so V1 accepts it) that is also not a valid Ed25519 curve point (so V2 rejects it during migration). The previous simplification to [0u8;32] was rejected by V1's zero-check, and [0xFF;32] is actually a valid Ed25519 point. Restore dynamic search starting from 1. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c96b6-f605-736c-859a-4fae7636a1e2
Amp-Thread-ID: https://ampcode.com/threads/T-019c9723-aad6-7169-8dcb-627b96589df3 Co-authored-by: Amp <amp@ampcode.com>
…ated ZELLIC-64: initialize_if_migrated only checked validator count parity between V1 and V2 but did not verify each validator's activity state. A validator could be deactivated in V2 during migration while still active in V1 (or vice versa), leading to inconsistent state. Add a per-validator check that V1.active matches V2.deactivatedAtHeight and revert with MigrationStateMismatch(idx) on mismatch. Amp-Thread-ID: https://ampcode.com/threads/T-019c964b-0561-763e-9d3c-c62a3398ca66 Co-authored-by: Amp <amp@ampcode.com>
…C-67) The spec incorrectly stated that validator addresses must be globally unique across all validators including deleted ones. The actual implementation (and invariant tests) correctly enforce uniqueness only among active validators, allowing deactivated addresses to be reused. Updated tip-1017.md and IValidatorConfigV2.sol to reflect that: - Addresses are unique among active validators (reusable after deactivation) - Public keys remain globally unique (including deleted) Amp-Thread-ID: https://ampcode.com/threads/T-019c964b-0f84-721b-aac0-f08b136ae43f Co-authored-by: Amp <amp@ampcode.com>
ccbd4ba to
291efa7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the spec (TIP-1017) and Solidity interface to accurately reflect that validator addresses are unique among active validators only, not globally including deleted ones. Deactivated addresses may be reused.
Public keys remain globally unique (including deleted) — no change there.
Changes
tips/tip-1017.md— 6 corrections across interface comments, param docs, uniqueness constraints section, comparison table, and invariants listtips/ref-impls/src/interfaces/IValidatorConfigV2.sol— 3 matching corrections in interface/struct/function docsContext
ZELLIC-67: Zellic flagged that
require_new_addressallows reuse of deactivated addresses, contradicting the spec. The implementation and invariant tests (TEMPO-VALV2-11) are correct — the spec was wrong.