Skip to content

feat(platform)!: add a RedPallas signer key type with its own purpose (PV15) - #5736

Draft
QuantumExplorer wants to merge 40 commits into
v5.2-devfrom
feat/hecate-signer-key-type
Draft

QuantumExplorer wants to merge 40 commits into
v5.2-devfrom
feat/hecate-signer-key-type

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

Private document types will let an identity send an entry to another identity without revealing which identity sent it. A zero-knowledge proof will show that the sender holds one of the signer keys registered on Platform, without saying which one. This PR adds that key. From protocol version 15, an identity can register one RedPallas key, the curve and signature scheme Zcash's Orchard uses, under a new purpose of its own.

The PR only registers the key: nothing proves membership with it yet. The key can never sign a state transition or a document.

Issue being fixed or feature implemented

A proof that "some registered identity sent this" needs every sender's key to be one a Halo 2 circuit can work with cheaply. Platform's ECDSA and BLS keys are not, but a RedPallas key is: Orchard proves spend authority with one. The tree that will collect these keys, and the proofs over it, are separate work. This PR lets identities register the key on chain so that the tree can later be built from what is there.

What was done?

From protocol version 15 (note 27 of v15.rs):

The key.

  • KeyType::REDPALLAS_HECATE (5): 64 bytes of data, ak || Poseidon(nk).
    • ak (32 bytes): a RedPallas spend-authorization verification key, encoded as Orchard encodes it, with its sign bit clear.
    • Poseidon(nk) (32 bytes): a commitment (Poseidon P128Pow5T3, one input) to a second key, nk, which a later proof uses.
  • Purpose::HECATE_SIGNER (7), wire name "hecate_signer".
  • The type and the purpose require each other, at security level MEDIUM only.

Before, at protocol version 14 and earlier, key type 5 and purpose 7 do not decode, so no transition can carry them. After, an identity update can add one:

IdentityPublicKeyInCreation {
    id: 3,
    purpose: HECATE_SIGNER,        // 7
    security_level: MEDIUM,
    key_type: REDPALLAS_HECATE,    // 5
    read_only: false,
    contract_bounds: None,
    data: ak (32 bytes) || Poseidon(nk) (32 bytes),
    signature: RedPallas signature by ak over the transition's signable bytes,
}

Rules.

Rule Where Refusal
The type and the purpose go together key structure validation 2 InvalidIdentityPublicKeyTypeForPurposeError (10540, new)
MEDIUM only key structure validation 2 InvalidIdentityPublicKeySecurityLevelError (10519)
The data is such a key: 64 bytes, ak a Pallas point other than the identity with its sign bit clear, Poseidon(nk) a canonical Pallas base element the proof of possession, which parses the data; key structure validation 2 parses no curve point, as v1 leaves an ECDSA or BLS key's data to its proof BasicRedPallasError (20018, new)
At most one per transition key structure validation 2 TooManyHecateSignerKeysError (10541, new)
No budget or expiry unchanged: refused on every key that is not for authentication unchanged
Proof of possession: a RedPallas signature by ak the added keys' signature check, which check_tx runs under its proof capacity and charges as a signature verification BasicRedPallasError (20018, new); unpaid on an identity update (identity update advanced structure 1, note 2)
One enabled per identity identity update state 2, from the identity's signer index IdentityAlreadyHasHecateSignerKeyError (40223, new); the nonce is bumped
Unique platform-wide unchanged: by ripemd160(sha256(data)) unchanged

Rotation. An identity update that disables the enabled signer key and adds a new one is admitted.

The signer index. Drive keeps an identity's enabled signer keys in a tree under its key references, at the purpose's key [7]: a reference per enabled HECATE_SIGNER key, keyed by key id. The tree is created with the identity's first signer key. Adding the key writes its reference, and disabling the key removes it, so the index holds at most one entry.

An update adding a signer key reads the index (fetch_identity_hecate_signer_key_ids, Some(0) in DRIVE_IDENTITY_METHOD_VERSIONS_V3, which DRIVE_VERSION_V10 selects) and bills the read. It reads one entry more than the update disables, however many keys the identity has ever had, which decides the rule exactly. Other updates read nothing more than before.

Before:

identities/<id>/key_references/   [0] authentication, [3] transfer, [5] voting

After an identity adds signer key 4:

identities/<id>/key_references/   [0] authentication, [3] transfer, [5] voting,
                                  [7] -> { 4: reference to keys/4 }

After it disables key 4, [7] stays and is empty.

Never a signing key. The node already refuses, before it verifies a signature, any key whose type or purpose a transition does not accept for signing. verify_identity_signed_signature also refuses this key type. Purpose::full_range() is unchanged, so a document type's keyRequirements cannot name HECATE_SIGNER, and contract bounds on such a key are refused as on any purpose without them.

Fee. FeeSignatureVersion gains verify_signature_redpallas:

  • 0 in FEE_SIGNATURE_VERSION1, never charged, since no earlier version holds such a key;
  • 50,000 credits in the new FEE_SIGNATURE_VERSION2, which FEE_VERSION4 (protocol version 15) selects.

That is about 3.3 times a secp256k1 verification (15,000) and a sixth of a BLS one (300,000). It is an estimate, not a benchmark.

Stored platform states from before fee version 4 embed their fee table (FeeVersionFieldsBeforeVersion4). Its signature table is now the frozen five-field FeeSignatureVersionFieldsBeforeVersion4, as was already done for the storage fees, so states saved before this change still decode.

Gate. active_version_range_for_keys_in_creation makes an identity create or update carrying a REDPALLAS_HECATE or HECATE_SIGNER key active from protocol version 15 only (HECATE_SIGNER_KEY_INITIAL_PROTOCOL_VERSION). Decoding refuses it unpaid before then, as software that cannot decode key type 5 or purpose 7 refuses it. This is the same pattern protocol version 14 uses for contract-group bound keys and version 1 keys.

Deriving a key (client side). The private key is a 32-byte secret:

  • ask is the scalar from BLAKE2b-512(personal "DashHecateExpand", secret || 0), negated when its ak would have the sign bit set (Orchard's rule);
  • nk is the base element from the same function with || 1;
  • signatures are deterministic.

RedPallasHecateSecretKey lives in dpp behind a new redpallas feature, which pulls in reddsa, pasta_curves and halo2_poseidon but not Orchard's proving system. It holds only the 32-byte secret, in a Zeroizing buffer, and derives ask and nk on each call. Signing borrows the private key rather than copying it, and nk() returns its copy in a Zeroizing buffer; reddsa's SigningKey, pasta's field elements and rand's StdRng have no zeroize support, so those short-lived copies are not wiped. simple-signer signs with it. The platform wallet does not derive such keys yet and refuses to, as their derivation path is not decided: its identity_key_derivation_type says which key types it derives at an identity's key slots (not Hecate signer keys or script hashes), and derive_identity_key_bytes derives by it. The wallet's stored key rows follow it too: a key of a type it doesn't derive is stored with no wallet id or derivation indices, whatever breadcrumb a landed update, discovery or an add gave it. Before, a landed update gave such a key its wallet slot, and a client would derive that slot's ECDSA key and keep it as the key's private key.

Bindings.

  • wasm-dpp and wasm-dpp2 map the type, the purpose and the new errors.
  • rs-sdk-ffi accepts key type 5 and purpose 7.
  • Swift (KeyType.redpallasHecate, KeyPurpose.hecateSigner) and Kotlin (KeyType.REDPALLAS_HECATE, KeyPurpose.HECATE_SIGNER) know them; Swift's KeyValidation passes key type 5 to the FFI. A private key's size is DPP's (KeyType::private_key_size, 32 bytes for every type), which rs-sdk-ffi exposes as dash_sdk_private_key_size_for_key_type and Swift's KeySizeValidator reads instead of keeping its own sizes.
  • The example apps name the type and purpose where they display keys; neither adds them to its add-key form. KotlinExampleApp's key health sheet offers a re-derive only for a key whose row records its wallet slot, which the wallet records for none of the keys it doesn't derive, so a Hecate signer key whose private key isn't stored shows as not checked instead of offering a repair that always fails.
  • The wallet checks an identity key against its own key at the key's slot: platform-wallet's check_identity_key_from_master derives where signing derives (identity_key_derivation_path, shared with derive_identity_key_bytes), compares with DPP's validate_private_key_bytes, and answers not derived, matches, mismatch or not compared. The wallet runs it (IdentityWallet::check_identity_key and check_identity_keys, which take a wallet handle over FFI): when every key's outcome is known without the seed it answers without resolving it; otherwise it resolves the master once, checks that it derives the wallet's persisted account xpub (verify_master_binds, the check the signer uses) and refuses another wallet's seed with SeedMismatch before comparing anything. rs-platform-wallet-ffi exposes them as platform_wallet_check_identity_key_with_resolver and platform_wallet_check_identity_keys_with_resolver (which release the wallet registry before the host resolver runs), and Swift as ManagedPlatformWallet.checkIdentityKey and checkIdentityKeys.
  • SwiftExampleApp's key health sheet asks it for every key, then only reads the Keychain and renders. A key the wallet doesn't derive (a Hecate signer key or a script hash) shows as "Not checked": it leaves the identity's status alone and offers no repair. Before, such a key was reported as an orphan, which offered to delete the identity. BLS and EdDSA keys now get a verdict (the sheet used to compare only ECDSA keys), and a check that fails (a locked Keychain, say) shows as "Not checked" instead of an orphan. The sheet no longer checks the seed binding itself: a recovery phrase from another wallet makes the check throw, and the sheet shows every key as "Not checked". platform-wallet also decides whose identity it is (check_identity_keys, FFI platform_wallet_check_identity_keys_with_resolver, Swift checkIdentityKeys): IdentityWalletOwnership is Owned when an enabled master key is the wallet's, NotOwned when every enabled master is another key and no enabled key is the wallet's, and Undetermined otherwise. Disabled keys never count, so a foreign master replaced by a wallet-derived one doesn't count against the identity. NotOwned also needs every key compared: key rows the sheet can't read (passed as unreadable_key_count) and an ECDSA key that isn't in the 33-byte compressed form DPP compares (a new NotCompared outcome; discovery and signing treat such keys as not wallet-derived too) rule it out. A key whose id is past the last hardened index is at no wallet slot and reports not derived. The sheet offers to delete an identity only on NotOwned, and confirming re-checks it on Platform first: check_identity_keys_on_platform (FFI platform_wallet_check_identity_keys_on_platform_with_resolver, Swift checkIdentityKeysOnPlatform) re-fetches the identity with refresh_identity, which stores the refreshed rows, and checks the keys Platform returns at the identity's own slot in this wallet, which it reads from the wallet's identity manager rather than taking from the caller; an identity held with no slot in this wallet (observed, or another wallet's) is refused with IdentityIndexNotSet before the fetch and before the seed is read. Anything but NotOwned, or an error, deletes nothing. One removal runs per identity at a time (IdentityRemovalGate): both Delete actions are disabled while it runs, and it deletes the row the store holds after the check, so a second confirmation during a slow fetch does nothing and a row already gone is a no-op. The sheet's re-check skips identities deleted since it opened. The delete wipes only this wallet's Keychain keys for the identity (KeychainManager.deleteAllIdentityPrivateKeys(forIdentityIdBase58:walletId:)); any key that isn't the wallet's shows as "Not this wallet's key" with no action. Re-derive stores Rust's path and key, with the key's on-chain public key in the Keychain metadata (for an ECDSA_HASH160 key, the hash the signer looks up rather than the full key).

In-place changes to shipped generations

Each change below is reached only with a REDPALLAS_HECATE or HECATE_SIGNER key. No transition carrying one is active before protocol version 15, so no identity holds one before then, and none of these changes what an earlier version does:

  • KeyType decodes 5 and Purpose decodes 7. Before this change such a transition failed to decode; now it decodes and is refused as inactive before version 15. Both refusals happen at decode, unpaid.
  • Key structure validation 1 (protocol version 14): its key-data size rule gains a REDPALLAS_HECATE => true arm, which refuses the key and is unreachable. Its tests now pin protocol version 14 instead of latest().
  • verify_identity_signed_signature v0: refuses REDPALLAS_HECATE with InvalidIdentityPublicKeyTypeError.
  • from_public_key_signed_external v0: signs a REDPALLAS_HECATE key's proof of possession as it signs an ECDSA or BLS key's.
  • Drive add_estimation_costs_for_purpose_in_key_reference_tree v0: HECATE_SIGNER describes the signer index, as TRANSFER describes its references.
  • Drive insert_new_unique_key v1 (protocol versions 14 and 15) writes a HECATE_SIGNER key's reference, and insert_key_searchable_references v0 writes it into the signer index, creating the index when it is missing.
  • Drive disable_identity_keys v1 (protocol versions 14 and 15) removes a disabled HECATE_SIGNER key's reference from the signer index.
  • KeyType methods (default_size, is_unique_key_type, signature_verify_cost, public_key_hash_for_key_data, private key checks) and signing.rs: new arms for the new type.
  • FEE_SIGNATURE_VERSION1 gains verify_signature_redpallas: 0, which only a RedPallas key reads. FEE_VERSION4 keeps fee_version_number 1: the fee history serves only KnownCostItem costs, and none reads the RedPallas tariff.

How Has This Been Tested?

  • dpp redpallas_hecate.rs (10 tests):
    • a key derives deterministically from its secret, with the sign bit clear;
    • nk is committed with Poseidon;
    • a key verifies its own signatures and refuses others;
    • malformed data is refused;
    • known-answer vectors for two secrets, one per branch of ask's negation: each pins the expansions, ask, nk and the key data. The BLAKE2b expansions and field reductions were checked separately in Python, and so were ak and the signatures (verified, not regenerated);
    • a fixed signature vector, and verification of a literal one that refuses any one-bit change;
    • the key holds only its 32-byte secret.
  • dpp key structure validation 2 (10 tests):
    • one signer key is accepted beside other keys, and when creating an identity;
    • malformed data (a byte short, ak the identity, sign bit set) is left to the proof of possession;
    • refused: above MEDIUM, a mismatched type and purpose, two in one transition (whatever their data), limits on the key, and purposes a user cannot add;
    • refused at protocol version 14.
  • dpp key_type.rs: size, uniqueness and decoding of type 5.
  • dpp state_transition/mod.rs: should_make_a_transition_adding_a_hecate_signer_key_active_from_protocol_version_15.
  • drive-abci identity create: should_create_identity_with_one_hecate_signer_key (one key is admitted; two are refused with 10541).
  • drive-abci identity update state 2, end to end:
    • should_add_a_hecate_signer_key_with_its_proof_of_possession;
    • should_refuse_a_hecate_signer_key_whose_proof_of_possession_does_not_verify (unpaid);
    • should_refuse_a_second_enabled_hecate_signer_key_and_rotate_by_disabling_the_first (40223, then rotation at revision 2);
    • should_refuse_a_hecate_signer_key_as_the_signer_of_a_transition;
    • should_not_admit_a_hecate_signer_key_at_protocol_version_14.
  • drive-abci identity update, malformed signer key data (a byte short, ak the identity, sign bit set):
    • should_answer_busy_at_check_tx_an_identity_update_adding_malformed_hecate_signer_key_data_while_the_proof_capacity_is_in_use (busy while the capacity is in use, then 20018 once it is free);
    • should_refuse_at_check_tx_an_identity_update_adding_two_hecate_signer_keys_while_the_proof_capacity_is_in_use (10541, with no capacity);
    • should_refuse_unpaid_an_identity_update_adding_malformed_hecate_signer_key_data (20018 in a block, the identity and nonce left as they were).
  • drive fetch_identity_hecate_signer_key_ids:
    • should_hold_only_the_enabled_hecate_signer_keys: no index before the first signer key, then it holds the key, is empty after disabling, and holds the next;
    • should_read_the_signer_index_at_a_cost_that_does_not_grow_with_the_identity_keys: the read costs the same for an identity with 4 keys and one with 40.
  • platform-version: should_decode_the_five_field_encoding_of_pre_1_4_platform_states decodes five independently encoded fees as the frozen pre-1.4 signature fee table and checks the RedPallas fee converts to 0.
  • drive should_read_a_signer_key_added_in_the_transaction_it_reads_in (an uncommitted transaction reads its own signer key, committed state doesn't), and the rotation test reads with limit 1.
  • drive signer index estimates, each estimating first (apply false, checked to write nothing), then running, and asserting the estimate covers the run's processing and storage fees: should_estimate_a_first_signer_key_at_least_at_its_execution_cost (the add creates the index), should_estimate_disabling_a_signer_key_at_least_at_its_execution_cost, and should_estimate_rotating_a_signer_key_through_the_index_at_least_at_its_execution_cost (a second key joins the index, then the first leaves it).
  • platform-wallet: should_say_which_identity_key_types_the_wallet_derives, should_refuse_to_derive_a_hecate_signer_key, and should_store_a_hecate_signer_key_without_derivation_coordinates (an externally generated Hecate key added by a landed update, with the cache behind it or at it, and disabled after a refresh, is stored without coordinates; an ECDSA key beside it keeps them).
  • platform-wallet key check: matches and mismatches for ECDSA, ECDSA_HASH160, BLS and EdDSA keys, signing with the key the check matches, every ownership verdict (a foreign master replaced by a wallet one, a disabled matching key, an unreadable key row, an uncompressed ECDSA key), should_refuse_another_wallets_seed_instead_of_calling_the_identity_foreign, should_answer_without_the_seed_when_no_key_needs_comparing, should_check_one_key_with_the_wallets_seed_only, should_not_derive_a_key_whose_id_is_past_the_last_hardened_index, should_bind_a_master_exactly_as_the_signer_check_does, and, with a mocked Platform fetch, should_check_the_identity_platform_returns_not_the_stale_rows, should_refuse_an_identity_the_wallet_does_not_hold_without_the_seed, should_refuse_an_identity_platform_does_not_return, should_check_a_held_identity_at_its_own_wallet_slot (an identity at slot 1 is Owned, where the explicit check at slot 0 says NotOwned) and should_refuse_a_held_identity_with_no_wallet_slot_without_the_seed (observed, or in another wallet's bucket: IdentityIndexNotSet, nothing fetched, the seed not read).
  • rs-platform-wallet-ffi identity_key_wallet_check (21 tests, on a wallet handle; the Platform re-check refuses an identity the wallet doesn't hold, and one it holds with no wallet slot, without reading the mnemonic): both entry points refuse another wallet's mnemonic, report not derived and not compared without reading the mnemonic, refuse unknown discriminants, null pointers and an unknown wallet, and free safely; should_release_the_wallet_registry_before_the_resolver_runs answers while the resolver writes the registry; the resolver waits at most 10 s for its write and answers either way, so code that holds the registry fails the test and then releases it, rather than hanging the test process.
  • dpp should_serve_every_known_cost_of_a_protocol_version_from_its_fee_version_number: for every protocol version, each known cost item is the same in its fee schedule and in the entry its number resolves to.
  • KotlinExampleApp WalletKeyHealthStatusTest (4 tests, run): a key whose private key doesn't open is repairable only with its whole wallet slot recorded, so a Hecate signer key with neither shows as not checked, and an identity counts healthy unless a key needs a repair.
  • drive structure: a hecate_signer_keys fixture reaches the index, held and emptied; grovedb-structure.json regenerated.
  • drive-abci should_refuse_every_contract_bound_on_a_hecate_signer_key: a signer key bound to a contract, a document type or a contract group (each existing) is refused with InvalidKeyPurposeForContractBoundsError by the dispatcher identity create and update both call.
  • The 345 existing drive-abci identity and stored platform state tests pass.
  • Builds:
    • cargo check --workspace --all-targets;
    • the verify-only drive build and a minimal dpp build;
    • clippy on every touched crate.
  • Bindings:
    • the rs-sdk-ffi key and signer tests pass, and dash_sdk_private_key_size_for_key_type's tests (every type, unknown types and a null pointer refused);
    • Kotlin compiles;
    • Swift: the SDK, its tests and the example app compile against the new C headers. They were linked against an older prebuilt library, which lacks only this PR's two new FFI functions, so the Swift tests were not run. IdentityKeyWalletCheckTests decodes hand-built C results through the internal projections the bridges call: every outcome, the key and hash bytes in order, key order and every ownership value of an identity check, unknown values refused, and the Swift values intact after the C buffers are wiped and freed. SwiftExampleAppTests IdentityRemovalGateTests (6 tests, typechecked, not run) holds the ownership check pending while removal is confirmed again before and during it, and asserts one check and one delete; it also covers a kept identity, a failed check, a row removed during the check, a failed delete, and two identities removed independently.

Breaking Changes

Consensus, from protocol version 15 only: identities can register the new key, with the rules above, and a RedPallas signature costs 50,000 credits to verify. Earlier protocol versions are unchanged.

Rust API:

  • KeyType and Purpose gain a variant each, so an exhaustive match on either needs a new arm;
  • KeyType::all_key_types() returns six types;
  • FeeSignatureVersion gains a field;
  • DriveIdentityKeysFetchMethodVersions gains fetch_identity_hecate_signer_key_ids.

GroveDB structure, from protocol version 15: an identity's key references gain the signer index at [7], created with its first signer key.

FFI, Swift and Kotlin: new enum values for the key type and purpose.

Checklist:

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request
  • If I added or changed a system contract's document schemas, I checked the contract viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added RedPallas Hecate identity signer keys, including signing and signature verification across SDKs.
    • Protocol version 15 supports signer-key proof-of-possession checks and allows one enabled signer key per identity. Replace it by disabling the existing key in the same update.
    • Added signer-key lookup and clearer errors for invalid or conflicting signer keys.
    • Wallet key checks can identify keys derived by the wallet and assess identity ownership.
    • Wallet key health checks distinguish recoverable, repairable, and unchecked keys.

… (PV15)

Identities can register one RedPallas key for Hecate sender leaves from
protocol version 15: key type REDPALLAS_HECATE (5) with the new purpose
HECATE_SIGNER (7), MEDIUM security level only. The 64-byte key data is
ak || Poseidon(nk); registering it needs a RedPallas signature by ak over
the transition's signable bytes. A transition may add at most one, and an
identity update may not add one while another is enabled unless it
disables that one (rotation). The key never signs transitions or
documents.

A transition carrying the key type or purpose is inactive before
protocol version 15, so shipped validation generations never see it.
New rules live in structure validation v2 and identity update state v2.
Signature fee tables gain verify_signature_redpallas (50,000 credits in
FEE_VERSION4); the pre-version-4 signature table is frozen so stored
platform states still decode.

New consensus errors: 10540, 10541, 20018, 40223.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The changes add REDPALLAS_HECATE and HECATE_SIGNER, with protocol-version-15 validation, signer indexing, and signature support. They also add wallet identity-key checks and update SDK interfaces and wallet-health screens.

Changes: Hecate signer key support

Layer / File(s) Summary
Key format and signing
packages/rs-dpp/src/identity/identity_public_key/*, packages/rs-dpp/src/signing.rs, packages/simple-signer/*, packages/rs-dpp/src/errors/consensus/*
DPP adds the REDPALLAS_HECATE key type and HECATE_SIGNER purpose. RedPallas key derivation, key-data validation, signing, signature verification, and associated consensus errors are added.
Key admission and protocol activation
packages/rs-dpp/src/state_transition/..., packages/rs-platform-version/src/version/*
Version-2 validators enforce key-purpose pairing, signer limits, proof-of-possession checks, and protocol-version-15 activation.
Signer index and identity updates
packages/rs-drive/src/drive/identity/*, packages/rs-drive-abci/src/execution/validation/state_transition/...
Drive stores, removes, and fetches signer-index entries. Identity-update validation checks enabled signer IDs and permits rotation when the existing key is disabled in the same update.
Wallet identity-key checks
packages/rs-platform-wallet/src/wallet/identity/network/*, packages/rs-platform-wallet-ffi/src/identity_key_wallet_check.rs, packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/ManagedPlatformWallet.swift, packages/swift-sdk/SwiftExampleApp/.../WalletKeyHealthSheet.swift
Wallet checks compare identity keys with wallet-derived keys and determine identity ownership. FFI and Swift expose the results, which the health view uses for classification, re-derivation, and deletion checks.
SDK and language bindings
packages/kotlin-sdk/*, packages/swift-sdk/Sources/SwiftDashSDK/*, packages/rs-sdk-ffi/*, packages/wasm-dpp/*, packages/wasm-dpp2/*
SDK and WASM interfaces recognize the new key and purpose values. FFI adds a private-key-size query, and the wallet-health screens update key status handling.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IdentityUpdate
  participant IdentityUpdateValidator
  participant DriveSignerIndex
  IdentityUpdate->>IdentityUpdateValidator: Add signer key and provide disabled key IDs
  IdentityUpdateValidator->>DriveSignerIndex: Fetch enabled signer key IDs
  DriveSignerIndex-->>IdentityUpdateValidator: Return signer IDs and read fee
  IdentityUpdateValidator->>IdentityUpdateValidator: Check fetched IDs against disabled IDs
Loading

Possibly related issues

  • dashpay/platform#5740: The PR adds resolver-backed wallet identity-key checks, but the issue’s requested native key-source refactoring is not included.

Suggested reviewers: shumkov, romchornyi, llbartekll

Merge Risk: Minimal · previous review 6034c

This change adds the RedPallas Hecate signer key and its protocol-version-15 validation, indexing, and wallet checks. The earlier concerns about validation cost, key-health checks, and orphan deletion have been addressed. The signer-index test that was still open now exists, so no actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 62.32% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding a RedPallas signer key type with its own purpose for protocol version 15.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 62.32% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 138 functions across 72 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 44ba1aa and 6034c67.

Files selected for processing: 13

  • packages/kotlin-sdk/KotlinExampleApp/app/src/main/java/org/dashfoundation/example/ui/wallet/WalletKeyHealthSheet.kt
  • packages/kotlin-sdk/KotlinExampleApp/app/src/main/java/org/dashfoundation/example/ui/wallet/WalletKeyHealthStatus.kt
  • packages/kotlin-sdk/KotlinExampleApp/app/src/test/java/org/dashfoundation/example/ui/wallet/WalletKeyHealthStatusTest.kt
  • packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/methods/validate_identity_public_keys_structure/v2/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/mod.rs
  • packages/rs-drive/src/drive/identity/key/fetch/fetch_identity_hecate_signer_key_ids/mod.rs
  • packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_method_versions/v3.rs
  • packages/rs-platform-version/src/version/v15.rs
  • packages/rs-platform-wallet-ffi/src/identity_key_wallet_check.rs
  • packages/rs-platform-wallet/src/wallet/identity/network/identity_handle.rs
  • packages/swift-sdk/Sources/SwiftDashSDK/PlatformWallet/ManagedPlatformWallet.swift
  • packages/swift-sdk/Sources/SwiftDashSDK/Security/KeychainManager.swift
  • packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Views/WalletKeyHealthSheet.swift
Files skipped from review as they are similar to previous changes: 2

  • packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_method_versions/v3.rs
  • packages/rs-platform-version/src/version/v15.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added this to the v5.1.0 milestone Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 3, 2026
@thepastaclaw

thepastaclaw commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because this PR is a draft.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit 2fa057b. Normal review starts when eligible; priority review starts as soon as a slot is available.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

The new identity-update scan can run without funding its execution cost and caps its billed key count at 65,535, so changes are required. Additional suggestions address secret cleanup, compatibility vectors, maximum-size estimation, and contract-bounds regression coverage. This verification was static: current CI shows Kotlin build/tests passed, while Determine changed packages remains pending and broader Rust build/test coverage is not yet established.

🔴 1 blocking | 🟡 4 suggestion(s)

1 finding(s) not shown inline (the lines are not part of this PR's diff)

🟡 Suggestion: KEY_TYPE_MAX_SIZE_TYPE picks smallest, not largest
packages/rs-dpp/src/identity/identity_public_key/key_type.rs:70-80

Adding the 64-byte Hecate key extends the supported payload sizes, but the maximum-size selector still sorts descending and takes last(), selecting a 20-byte hash type. The reversed selector predates this PR, but the new larger key extends the same estimation gap: max_possible_size_key, used by Drive's disable/re-enable estimation paths, does not represent the largest supported payload. The existing test only checks the generated length against the selected type's own default_size(), so it cannot detect this. Make the PV15 estimator account for the new 64-byte maximum and assert that expected size explicitly, preserving earlier protocol behavior rather than changing the shared selector unconditionally.

source: muse-spark-1.3-contributor (phase1-reviewer: rust-quality)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); reviewer 8: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 9: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — This intricate change directly modifies consensus validation in identity_update/state/v2/mod.rs and validate_identity_public_keys_structure/v2/mod.rs, and introduces cryptographic key validation and signature handling in redpallas_hecate.rs.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/state/v2/mod.rs`:
- [BLOCKING] packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/state/v2/mod.rs:203-217: Bound and fund the identity-wide key scan before executing it
  This query reads and deserializes the identity's complete key history before checking whether the identity can pay for that work. The six-key limit applies per transition, not to accumulated identity keys, and disabled keys remain stored. The pinned GroveDB implementation treats this query's absent limits as unlimited.

  Identity updates do not run state validation in check_tx, so admission's fee estimate omits the RetrieveIdentity operation added here. An owner can build a large key history, retain enough balance for admission's estimated update but not the additional history scan, and submit a valid signer-key addition. Block processing performs the scan, then fee validation rejects the update; paid_from_identity_function returns UnpaidConsensusExecutionError without applying the update or consuming its nonce. Fresh signed variants can therefore repeatedly impose history-proportional proposer work without a marginal fee. Separately, the conversion on line 215 caps accounting at 65,535 keys even when more were retrieved, so funded updates also stop paying for additional history.

  Use a bounded current-signer lookup, or enforce a practical protocol-level work bound and check funding for the complete scan before performing it. Preserve the full accounting count; Drive's fetch_identity_keys_with_costs API is available if the underlying read should be propagated through PrecalculatedOperation. Add regression coverage for admission versus block execution with insufficient scan funds and for counts above u16::MAX. Merely truncating the query could miss an existing enabled signer.

In `packages/rs-dpp/src/identity/identity_public_key/redpallas_hecate.rs`:
- [SUGGESTION] packages/rs-dpp/src/identity/identity_public_key/redpallas_hecate.rs:59-64: Give owned Hecate secret material an explicit cleanup lifetime
  This type owns the original secret, the signing scalar through ask, and the secret tag key nk, but has no explicit zeroization or clearing destructor. The pinned reddsa SigningKey is Copy and has no clearing Drop, so dropping this wrapper does not guarantee erasure of those values. This also affects temporary instances created for signing and private-key matching. Store the owned secret bytes in Zeroizing and use a clearable representation or supported cleanup mechanism for the derived secrets; wrapping the upstream SigningKey directly is not sufficient without Zeroize support. Audit the expansion buffers and signing-seed temporaries as part of the same cleanup.
- [SUGGESTION] packages/rs-dpp/src/identity/identity_public_key/redpallas_hecate.rs:216-220: Pin Hecate derivation with known-answer vectors
  These assertions compare the derivation implementation with another invocation of itself. The neighboring commitment test repeats the production Poseidon expression, and the signature tests generate and verify using the same current implementation. Changing the expansion personalization, domain bytes, field conversion, or commitment convention could therefore change the registered key recovered from an existing secret while all these tests still pass. Add independently checked literal secret-to-nk and secret-to-public_key_data vectors, covering both sign-normalization branches, and a fixed signature-verification vector. Keep the existing round-trip and malformed-input tests alongside them.

In `packages/rs-dpp/src/identity/identity_public_key/key_type.rs`:
- [SUGGESTION] packages/rs-dpp/src/identity/identity_public_key/key_type.rs:70-80: KEY_TYPE_MAX_SIZE_TYPE picks smallest, not largest
  Adding the 64-byte Hecate key extends the supported payload sizes, but the maximum-size selector still sorts descending and takes last(), selecting a 20-byte hash type. The reversed selector predates this PR, but the new larger key extends the same estimation gap: max_possible_size_key, used by Drive's disable/re-enable estimation paths, does not represent the largest supported payload. The existing test only checks the generated length against the selected type's own default_size(), so it cannot detect this. Make the PV15 estimator account for the new 64-byte maximum and assert that expected size explicitly, preserving earlier protocol behavior rather than changing the shared selector unconditionally.

In `packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/methods/validate_identity_public_keys_structure/v2/mod.rs`:
- [SUGGESTION] packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/methods/validate_identity_public_keys_structure/v2/mod.rs:310-316: No test pins contract-bounds refusal on a Hecate key
  The new Hecate fixtures all use contract_bounds: None. Structure validation leaves bounds to state validation, where the shared validator delegates non-authentication purposes to v1 or rejects a contract-group bound directly. No added test exercises that delegation for the newly supported purpose. Add Drive-ABCI create/update regression cases for Hecate keys carrying SingleContract, SingleContractDocumentType, and ContractGroup bounds, asserting InvalidKeyPurposeForContractBoundsError. Use existing contract/group fixtures so the cases reach the purpose refusal rather than failing earlier on missing state.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Your move: thepastaclaw requested changes on this head; dismiss the review or push a fix; thepastaclaw left review threads unresolved; resolve them.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 3, 2026
QuantumExplorer and others added 3 commits November 3, 2026 18:29
…index

The identity update adding a Hecate signer key read every key the
identity ever had to find another enabled one: work that grew with the
key history, done before fee validation, so an update refused for
balance could repeat it unpaid. Drive now keeps a signer index under the
identity's key references, at the purpose's key [7]: a reference per
enabled HECATE_SIGNER key, written when the key is added (the tree is
created with the identity's first signer key) and removed when it is
disabled. The update reads one entry more than it disables
(fetch_identity_hecate_signer_key_ids, Some(0) in identity method
versions v3, which DRIVE_VERSION_V10 selects) and bills the read as a
precalculated operation. The unused RetrieveIdentityInfo::keys is gone.

The insert, reference and disable arms are in place: no key has the
HECATE_SIGNER purpose before protocol version 15.

Also pins that a signer key carrying any contract bound is refused with
InvalidKeyPurposeForContractBoundsError, and describes the index in the
GroveDB structure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pin known answers for two secrets: [0x00; 32], whose ask stays as
reduced, and [0x02; 32], whose ask is negated because [ask_raw]G has
its sign bit set. Each pins both expansions, ask before and after the
sign-bit rule, nk and the registered data. Also pin one deterministic
signature, plus a standalone verification vector where any one-bit
change is refused. The hashes and field reductions are reproducible
with the Python recipe in the test's doc comment. ak, both branches and
the signature were also checked against a Python Pallas implementation.

RedPallasHecateSecretKey now holds only its 32-byte private key, in
Zeroizing. ask and nk are derived per call, and the expansion outputs,
ask's canonical bytes and the signing seed are Zeroizing. reddsa's
SigningKey, pasta field elements, StdRng and blake2b_simd's state have
no zeroize support; the struct's doc says so.

Since ask is derived per call and reddsa builds a SigningKey only
through a fallible conversion, public_key_data() and sign() now return
Result. from_secret still refuses a zero ask, so they fail only where
it would. The redpallas feature now enables zeroize.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Your move: thepastaclaw left review threads unresolved; resolve them.
Full checklist in the description.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🌳 GroveDB structure

This pull request changes the described GroveDB structure. Open it in the structure viewer: new nodes glow, removed ones stay as ghosts, and the tour walks through each change.

Added (2 nodes)

  • identities.identity.key_references.hecate_signer

Changed (1 node)

  • identities.identity.key_references

Compared e1085301a6 with 2fa057be6b. Updated at 2026-11-07T14:53:29.898Z

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Verified the combined reviewer findings against head 9401714. Four prior findings are fixed and the pre-existing maximum-size selector finding is withdrawn; one blocking ownership violation remains in Swift's new Hecate length-validation rule. This was a static review with no builds or tests run; current CI shows the Kotlin SDK build/tests and changed-package determination pending, with no failed code checks reported.

🔴 1 blocking

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 9: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 10: gpt-6-astra (agent: phase2-reviewer, role: ffi-engineer); reviewer 11: gpt-6-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 12: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 13: gpt-6-astra (agent: phase2-reviewer, role: rust-quality); reviewer 14: gpt-6-astra (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The large, intricate diff changes consensus validation in identity_update/state/v2/mod.rs and cryptographic key encoding, derivation, and signature handling in redpallas_hecate.rs, alongside protocol-gated persistent signer indexing.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — security-auditor (completed, effort xhigh); agent phase2-reviewer
  • Model comparison: every Phase-2 reviewer also ran on gpt-6-astra; the verifier weighed both sets without knowing which model wrote which
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/swift-sdk/Sources/SwiftDashSDK/Utils/PrivateKeyUtils.swift`:
- [BLOCKING] packages/swift-sdk/Sources/SwiftDashSDK/Utils/PrivateKeyUtils.swift:251-252: Keep Hecate secret-length validation in DPP
  This new case extends a Swift-owned acceptance rule, not just display metadata: `KeySizeValidator.isValidSize` compares the supplied key length against this literal. DPP already owns the representation through `RedPallasHecateSecretKey::from_secret` and enforces the 32-byte input in `sign_by_private_key`. The book explicitly says that SDKs and FFI must never duplicate a length check enforced by DPP, and that mobile wrappers marshal rather than decide. Expose the canonical private-key size or size-validation operation through a thin Rust FFI adapter and delegate this Hecate case to it. The existing Swift cases do not justify adding another independently maintained validation rule.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Your move: thepastaclaw requested changes on this head; dismiss the review or push a fix; thepastaclaw left review threads unresolved; resolve them.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 3, 2026
Swift's KeySizeValidator kept its own size for every key type, and this
PR added the Hecate one to it. DPP now owns the size
(KeyType::private_key_size, 32 bytes for every type, the Hecate signing
arm reading it), rs-sdk-ffi exposes it through
dash_sdk_private_key_size_for_key_type, and KeySizeValidator asks for it
instead of keeping literals. Kotlin keeps no such rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 3, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Static review of head 048f78b found no blocking defects: five prior findings are fixed, and the previously withdrawn finding remains withdrawn. One test-organization nit remains; the proposed re-enable defect does not apply to the operation's documented masternode-only calling contract. Rust workspace, Kotlin, JS, and Docker checks remain pending; no builds or tests were run locally.

💬 1 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 8: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 13: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 14: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The large, intricate diff changes consensus key-admission rules in validate_identity_public_keys_structure/v2/mod.rs and identity_update/state/v2/mod.rs, and introduces cryptographic key validation and signing in redpallas_hecate.rs and signing.rs.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/rs-dpp/src/identity/identity_public_key/purpose.rs`:
- [NITPICK] packages/rs-dpp/src/identity/identity_public_key/purpose.rs:191-197: Keep successful purpose conversions in the valid-variants tests
  The new successful conversion of discriminant 7 is asserted inside test_purpose_try_from_u8_invalid, while test_purpose_try_from_u8_valid_all_variants still stops at 6. The i32 tests have the same mismatch. Move each successful HECATE_SIGNER assertion into its valid_all_variants test so the test names accurately describe their coverage.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Re-enabling a signer key does not restore the signer index — The missing HECATE_SIGNER refresh arm exists, but the claimed failure requires a caller outside this operation's supported contract. IdentityOperationType::ReEnableIdentityKeys explicitly documents that it is only for masternode identities; current producers are masternode core-update paths using their fixed key types, and the add_new_identity fallback re-enables only keys matching the incoming masternode key data. User identity updates expose addition and disabling, not re-enabling. No supported current path supplies a Hecate key here, so this is a hypothetical future capability requirement rather than an actionable index-maintenance defect in this PR.
    • Follow-up: Consider creating a separate issue or author/maintainer-requested PR for this.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 3, 2026
@github-actions github-actions Bot removed the waiting-self-review Waiting for the author to post /self-reviewed label Nov 5, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Static verification of 9766bab..10b693b found no remaining actionable in-scope defects: 22 prior findings are fixed, and the two settled withdrawals remain withdrawn. Current CI reports successful Rust workspace, wasm32, Swift, Kotlin, JavaScript, Docker, functional, and browser checks; the dedicated Rust wallet job is skipped and PR Hygiene remains pending. No local builds or tests were run.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 13: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 14: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — This large, intricate diff changes consensus validation in identity_update/state/v2/mod.rs, implements RedPallas key parsing and signature handling in redpallas_hecate.rs and signing.rs, and changes persisted signer-key indexes.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 6, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Verified the findings against head 805ac8b: 22 prior findings are fixed, and the two settled withdrawals remain withdrawn. Two current findings remain: a blocking re-entry race in asynchronous identity deletion and a non-blocking ownership-API boundary concern. Verification was static; current CI code checks, including Rust workspace, Swift SDK, Kotlin, and integration/browser suites, pass, while PR Hygiene remains pending.

🔴 1 blocking | 🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); reviewer 9: gpt-6-astra (agent: phase2-reviewer, role: general); reviewer 10: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 11: gpt-6-astra (agent: phase2-reviewer, role: architecture-layering); reviewer 12: gpt-6-astra (agent: phase2-reviewer, role: ffi-engineer); reviewer 13: gpt-6-astra (agent: phase2-reviewer, role: platform-versioning); reviewer 14: gpt-6-astra (agent: phase2-reviewer, role: rust-quality); reviewer 15: gpt-6-astra (agent: phase2-reviewer, role: security-auditor); reviewer 16: gpt-6-astra (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The large, cross-cutting diff changes cryptographic key parsing and signature verification in packages/rs-dpp/src/identity/identity_public_key/redpallas_hecate.rs and consensus admission rules in packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/state/v2/mod.rs.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — general (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6-astra — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer
  • Model comparison: every Phase-2 reviewer also ran on gpt-6-astra; the verifier weighed both sets without knowing which model wrote which
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Views/WalletKeyHealthSheet.swift`:
- [BLOCKING] packages/swift-sdk/SwiftExampleApp/SwiftExampleApp/Core/Views/WalletKeyHealthSheet.swift:759-769: Make the Platform re-check and identity deletion single-flight
  Confirming Delete clears pendingOrphanDelete immediately, but this task leaves the report's Delete button enabled while checkIdentityKeysOnPlatform awaits its network response. Neither isRunning nor another in-flight guard protects the operation. A user can confirm the same identity twice during a slow fetch, leaving two tasks holding the same report.identityRow. If both checks return NotOwned, the first task deletes and saves that model; the second then passes the deleted model into deleteOrphan, which reads identityIdBase58 and its relationships. Those accesses are precisely the post-deletion lifetime hazard documented by this file's existing cleanup comments. MainActor isolation does not prevent this interleaving across the await, and overlapping refreshes also write persisted identity state.

  Acquire a per-identity in-flight guard before launching the task, disable the action, and retain the guard through refresh and cleanup. After the await, resolve a live persistence row by its stable identity ID rather than unconditionally using the captured model, and make an already-removed identity a safe no-op. Keep the ownership decision in Rust. Add a delayed-refresh regression that attempts repeated confirmation and removal while the check is pending, asserting cleanup happens at most once.

In `packages/rs-platform-wallet/src/wallet/identity/network/identity_handle.rs`:
- [SUGGESTION] packages/rs-platform-wallet/src/wallet/identity/network/identity_handle.rs:1059-1063: Resolve the managed identity's slot inside the refreshed ownership check
  This identity-ID-scoped operation refreshes the managed identity and binds the seed to the wallet, but still uses the caller's independent identity_index to determine ownership. IdentityManager::identity_index already owns that association, and update_identity resolves it internally. For an identity whose enabled master matches wallet slot 1, passing slot 0 here can return NotOwned despite using the correct wallet seed and freshly fetched Platform keys. The current Swift caller forwards persisted metadata, so this is API-boundary hardening rather than a demonstrated failure of that caller; nevertheless, the public removal-eligibility verdict depends on callers reproducing an association the wallet already holds.

  Resolve the index from the managed identity inside this operation, or reject a supplied index that disagrees. Return an error or inconclusive result when no wallet slot exists. Keep explicit-index comparison available for low-level/offline diagnostics, and add a regression showing that contradictory slot input cannot make a managed wallet-owned identity appear foreign.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Your move: thepastaclaw requested changes on this head; dismiss the review or push a fix; thepastaclaw left review threads unresolved; resolve them.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 6, 2026
…emove it once at a time in the key health sheet

The Platform ownership check took the caller's identity index, though the
wallet already holds each identity's slot: an identity at slot 1 checked
at slot 0 came back NotOwned. `check_identity_keys_on_platform` (and its
FFI and Swift wrappers) now resolve the slot from this wallet's identity
manager, and refuse an identity held with no slot in this wallet
(IdentityIndexNotSet) before the fetch and before the seed is read.

The key health sheet left Delete enabled while that check awaited
Platform, so confirming twice could delete a row and then hand the
deleted model to a second cleanup. A per-identity IdentityRemovalGate
now runs one removal at a time, disables the actions while it runs, and
deletes the row the store holds after the check (none left is a no-op).
runCheck skips identities deleted since the sheet opened.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 6, 2026
…r-key-type

# Conflicts:
#	packages/rs-platform-version/src/version/v15.rs
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

Static verification of a7def39..e2fda16 found no remaining actionable in-scope defects: 24 prior findings are fixed and the two settled withdrawals remain withdrawn. Current CI for this exact head reports successful Rust workspace, wasm32, Swift SDK, Kotlin, JavaScript, functional and E2E checks; Rust wallet tests and ARM64 runner validation were skipped, and PR Hygiene remains pending. No local builds or tests were run, and SwiftExampleApp removal-test runtime execution is not established by the available evidence.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 13: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 14: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 15: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 16: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The large, intricate diff changes consensus validation in identity_update/state/v2/mod.rs and cryptographic key parsing and signature handling in redpallas_hecate.rs, alongside persistent signer indexing and wallet key management.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — tenderdash-consensus-security (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

…r-key-type

# Conflicts:
#	packages/rs-platform-version/src/version/v15.rs
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — Final validation — Phase 1 + Phase 2

At head 0769158, static source verification confirms that 24 prior findings are addressed, the two settled withdrawals remain justified, and no remaining actionable in-scope defect was confirmed. Current CI code checks pass, including Rust workspace, wasm32, Kotlin, Swift SDK and JavaScript checks; PR Hygiene remains pending, and the dedicated Rust wallet job is skipped. No local builds or tests were run, and runtime execution of the new Swift example-app removal tests remains unverified.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 5: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: ffi-engineer); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 13: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 14: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: critical by gpt-6.1-sol (effort low) — The change is large and intricate and directly modifies cryptographic key parsing and signature verification in packages/rs-dpp/src/identity/identity_public_key/redpallas_hecate.rs, consensus validation in identity update state v2, and persisted signer-key indexing in Drive.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — ffi-engineer (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort xhigh); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort xhigh); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

…r-key-type

# Conflicts:
#	packages/rs-dpp/src/errors/consensus/basic/basic_error.rs
#	packages/rs-dpp/src/errors/consensus/state/state_error.rs
#	packages/rs-dpp/src/state_transition/mod.rs
#	packages/rs-platform-version/src/version/feature_initial_protocol_versions.rs
#	packages/rs-platform-version/src/version/fee/v4.rs
#	packages/rs-platform-version/src/version/v15.rs
#	packages/wasm-dpp/src/errors/consensus/consensus_error.rs

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants