Skip to content

fix(drive-abci): build an identity update test's ECDSA key without the removed secp256k1 path - #6459

Merged
QuantumExplorer merged 1 commit into
v5.2-devfrom
fix/identity-update-test-ecdsa-key
Dec 2, 2026
Merged

QuantumExplorer merged 1 commit into
v5.2-devfrom
fix/identity-update-test-ecdsa-key

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

What this does: Makes the tests of drive-abci compile again on v5.2-dev. One test helper of the identity update tests still built its ECDSA key with Keypair, a name that is no longer imported there.

Value: v5.2-dev is red for every open PR: the Rust workspace tests / Tests job stops at its clippy step with error[E0433]: cannot find type Keypair in this scope (identity_update/mod.rs:3952). This unblocks them.

Risks: None for consensus. The change is in a #[cfg(test)] helper only.

Issue being fixed or feature implemented

Two PRs merged one after the other on 2026-12-02 and each was green by itself:

Together they do not compile.

What was done?

update_adding_an_ecdsa_key makes its key as the rest of the module does since #5519:

Before:

let key_pair = Keypair::new(&mut SecpStdRng::seed_from_u64(65));
// ...
key_pair.public_key().serialize().to_vec(),
// ...
signer::sign(signable_bytes, &key_pair.secret_key().to_secret_bytes())

After:

let secret_key = random_secret_key(&mut SecpStdRng::seed_from_u64(65));
// ...
secret_key.public_key().to_compressed().to_vec(),
// ...
signer::sign(signable_bytes, secret_key.to_bytes().as_ref())

It was the only leftover use: a search of the Rust packages on v5.2-dev for dpp::secp256k1, Keypair::new and .secret_key().to_secret_bytes() finds no other.

In-place changes to shipped generations

None. Test code only.

How Has This Been Tested?

  • cargo test -p drive-abci --lib --locked identity_update::: 49 passed, among them the ML-DSA tests that call the helper.
  • cargo clippy -p drive-abci --all-targets --all-features --locked -- --no-deps -D warnings: clean.
  • cargo fmt --all.

Not run: the full drive-abci suite and the other crates.

Breaking Changes

None.

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

PR Hygiene · 5302fe6

  • Bots — thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build running
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • Tests
    • Updated an identity-update test helper to generate and sign with an ECDSA key using the current key format.

…ut the removed secp256k1 path

#5519 removed dpp's raw secp256k1 dependency and its Keypair import from this test module; #6354, merged after it, added a test helper that still used Keypair. The tests of drive-abci did not compile on v5.2-dev. The helper now makes its key as the rest of the module does.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@QuantumExplorer QuantumExplorer added this to the v5.2.0 milestone Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 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 Dec 2, 2026
@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The identity update test helper now creates an ECDSA key with random_secret_key, obtains its compressed public key, and signs with the serialized secret key bytes.

Changes: ECDSA Test Helper

Layer / File(s) Summary
Update ECDSA key creation
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/mod.rs
update_adding_an_ecdsa_key now uses random_secret_key, to_compressed(), and the secret key’s to_bytes() method.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related PRs

  • dashpay/platform#5519: Removes the Keypair import path that the helper used; this change switches the helper to random_secret_key.
  • dashpay/platform#6354: Adds ML-DSA-65 identity keys and includes the test helper that this change updates.

Suggested reviewers: thepastaclaw, shumkov

Merge Risk: Minimal · up to 5302f

This restores compilation of a test helper and does not touch production behavior. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change accurately: a fix in drive-abci that builds an identity update test's ECDSA key without the removed secp256k1 path. The raw summary confirms the helper update_adding_an_ecds…
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: Title check

Explanation

The title names the change accurately: a fix in drive-abci that builds an identity update test's ECDSA key without the removed secp256k1 path. The raw summary confirms the helper update_adding_an_ecdsa_key now uses random_secret_key instead of the removed Keypair path, and the objectives describe the same change. The title is specific and scoped to the one test helper. It is a single line and omits no primary point.

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 5ca8c20 and 5302fe6.

Files selected for processing: 1

  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/mod.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.

@thepastaclaw

thepastaclaw commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 5302fe6) · triage: low

@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

This test-only fix replaces the unresolved Keypair calls in the Drive ABCI identity-update helper with the module’s existing seeded ECDSA key generator, preserving the compressed public-key format and signing path. The author reports 49 targeted tests passing and a clean Clippy run. GitHub CI showed the Kotlin SDK build and tests passing and the Rust workspace tests still running, with no failed code checks on this head.

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.2-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.2-sol (effort low) — This is a small, test-only, self-contained replacement of a removed key-construction API with the module’s existing equivalent, and its correctness is straightforward to verify.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort high); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort high); 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 (zai quota lookup failed)
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.2-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.2-sol — rust-quality (completed, effort medium); agent phase2-reviewer

@github-actions

github-actions Bot commented Dec 2, 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 Dec 2, 2026
@QuantumExplorer
QuantumExplorer merged commit f71d671 into v5.2-dev Dec 2, 2026
28 of 29 checks passed
@QuantumExplorer
QuantumExplorer deleted the fix/identity-update-test-ecdsa-key branch December 2, 2026 11:47
shumkov added a commit that referenced this pull request Dec 2, 2026
…missions-model

Brings in #6459 (an identity update test's ECDSA key), #6354 (ML-DSA-65
identity keys at protocol version 16) and #6444 (a document type's
references and rules read from its typed definition). Resolved with
mergiraf off:

- try_from_definition/v0/mod.rs: documentation only. #6444's list of
  what is still read from the written-back schema kept, with
  permissions read there through generation 5. The dispatch on the
  try_from_schema slot merged as it was.

#6444's typed reference readers have no arm for apply_property_reference
2, which only the mock version exercising document permissions selects:
the next commit adds it. No version table, error code or protocol
version 16 slot conflicted (#6354's v16.rs, codes.rs and fee tables
merged untouched by this branch).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants