Skip to content

feat(rs-drive-abci): generate validator set for tenderdash#880

Merged
QuantumExplorer merged 2 commits into
phoenixfrom
feat-validator-set
Apr 3, 2023
Merged

feat(rs-drive-abci): generate validator set for tenderdash#880
QuantumExplorer merged 2 commits into
phoenixfrom
feat-validator-set

Conversation

@lklimek

@lklimek lklimek commented Mar 31, 2023

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Tenderdash needs to receive validator set updates when quorums are rotated.

What was done?

Added validator_set module that allows easy generation of validator set update, required by Tenderdash.

Implemented From trait to allow easy conversion from validator_set::ValidatorSet into tenderdash's ValidatorSetUpdate.

To use:

let vset = super::ValidatorSet::new_at_height_with_seed(client, &config, 2000, &quorum_type, None)
     .expect("failed to fetch validator set");    
let vsu = ValidatorSetUpdate::from(vset);

How Has This Been Tested?

Small unit test

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@lklimek
lklimek force-pushed the feat-validator-set branch from d17d6f7 to db765e6 Compare April 3, 2023 15:19
@lklimek
lklimek requested a review from QuantumExplorer April 3, 2023 15:20
@QuantumExplorer
QuantumExplorer marked this pull request as ready for review April 3, 2023 15:27
"use-serde",
], default-features = false, rev = "51548a4a1b9eca7430f5f3caf94d9784886ff2e9" }
dashcore-rpc = { git = "https://github.com/jawid-h/rust-dashcore-rpc", branch = "fix/attempt-to-fix" }
dashcore-rpc = { git = "https://github.com/dashevo/rust-dashcore-rpc" } # path = "../../../rust-dashcore-rpc/client"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no it should be
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore-rpc" } # path = "../../../rust-dashcore-rpc/client"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dashpay

}

/// Helper function to convert bytes into bls12381 public key, as required by Tenderdash
fn u8_to_bls12381_pubkey(public_key: Vec<u8>) -> abci_crypto::PublicKey {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's best to have a method in the crate

@QuantumExplorer
QuantumExplorer merged commit e28dfba into phoenix Apr 3, 2023
@QuantumExplorer
QuantumExplorer deleted the feat-validator-set branch April 3, 2023 16:31
QuantumExplorer added a commit that referenced this pull request Jul 14, 2026
…er via rust-dashcore#881

Bumps the pin to bc6cbf96 picking up the gate-free provider-key API
(dashpay/rust-dashcore#881, from our #880): operator_public_key_at /
operator_private_key_at / platform_node_key_at. All derivation
composition in provider_key_at_index.rs is deleted — platform now
resolves wallets, calls upstream, and maps types. The private-reveal
keeps an always-on consistency check (secret's pubkey must equal the
xpub-derived one; the two upstream paths derive from independent
sources and don't verify each other). Provider key accounts are also
routed through the address-pool restore so their persisted rows
rehydrate the in-memory pools at load (used-flags and beyond-gap
indices survive restarts).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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