LogoLogo
Threshold WebsitetBTC v2 DocsTACo Docs
  • What is the Threshold Network?
  • THRESHOLD DASHBOARD
    • tBTC Minting Walkthrough
  • Applications
    • tBTC Bitcoin Bridge
      • Fees
      • Wallet Generation
      • Wallet Signing
      • The Path to Permissionlessness
      • Sweeping
      • Coverage Pool
    • Threshold USD
      • Overview of thUSD
      • Borrowing
      • Stability Pool and Liquidations
      • Redemptions and thUSD Price Stability
      • Recovery Mode
      • Bootstrapping
        • Initial Protocol Loan
      • B. Protocol
      • thUSD on Build on Bitcoin (BOB)
        • Connecting to BOB Network
        • Bridging Collateral to BOB Network
        • Opening Collateral Vaults and Minting thUSD
  • Governance
    • Threshold DAO
      • 🗳️Governance Process
      • 🙋‍♀️Guilds
      • 💰Threshold Multisigs
      • Threshold DAO Rules
    • Vote Delegation
      • Liquid Token Delegation
  • Staking & Running a Node
    • tBTC v2 Node Setup
      • Operator Account
      • Application Authorization & Operator Registration
      • Network Configuration
      • Data Storage
      • Installation
        • Docker Installation
        • Binary Installation
      • Updating tBTC v2 Node
      • Advanced Options
        • Alternatives to Dashboard
        • Logging
        • Config File
        • CLI Options
        • Client Info
      • Frequently Asked Questions
      • Sepolia Testnet
        • Testnet tBTC v2 node Setup
    • tBTC Beta Stakers Program
  • App Development
    • DAO Contracts
      • DAO Contracts API
        • BaseTokenholderGovernor
        • Checkpoints
        • GovernorParameters
        • IApplication
        • ILegacyTokenStaking
        • IStaking
        • IVotesHistory
        • KeepStake
        • PercentUtils
        • ProxyAdminWithDeputy
        • SafeTUpgradeable
        • StakerGovernor
        • StakerGovernorVotes
        • T
        • TokenholderGovernor
        • TokenholderGovernorVotes
        • TokenStaking
        • VendingMachine
    • Random Beacon
      • Random Beacon API
        • AltBn128
        • BeaconAuthorization
        • BeaconDkg
        • BeaconDkgValidator
        • BeaconInactivity
        • BLS
        • BytesLib
        • Callback
        • Governable
        • Groups
        • IRandomBeacon
        • IRandomBeaconConsumer
        • ModUtils
        • RandomBeacon
        • RandomBeaconChaosnet
        • RandomBeaconGovernance
        • Reimbursable
        • ReimbursementPool
        • Relay
    • tBTC
      • tBTC SDK
        • Quickstart
        • Architecture
        • Guides
          • Initialize SDK
            • Ethereum and Bitcoin mainnet
            • Ethereum and Bitcoin testnet
            • Crosschain
            • Custom mode
          • Deposit and mint
          • Unmint and redeem
        • API Reference
      • tBTC Contracts API
        • Bridge API
          • Bank
          • BitcoinTx
          • Bridge
          • BridgeGovernance
          • BridgeGovernanceParameters
          • BridgeState
          • Deposit
          • DepositSweep
          • DonationVault
          • EcdsaLib
          • Fraud
          • GovernanceUtils
          • Heartbeat
          • IReceiveBalanceApproval
          • IRelay
          • IVault
          • L2TBTC
          • L2WormholeGateway
          • LightRelay
          • LightRelayMaintainerProxy
          • MaintainerProxy
          • MovingFunds
          • Redemption
          • TBTC
          • TBTCOptimisticMinting
          • TBTCVault
          • VendingMachine
          • VendingMachineV2
          • VendingMachineV3
          • WalletCoordinator
          • Wallets
        • ECDSA API
          • EcdsaAuthorization
          • EcdsaDkg
          • EcdsaDkgValidator
          • EcdsaInactivity
          • IWalletOwner
          • IWalletRegistry
          • WalletRegistry
          • WalletRegistryGovernance
          • Wallets
  • Resources
    • T Token
    • Contract Addresses
      • Mainnet
        • Threshold DAO
        • tBTC
        • thUSD
        • Legacy
      • Görli Testnet
      • Sepolia Testnet
    • tBTC Pools
    • Upgrade NU & KEEP to T
    • Contribution
    • Security
    • Brand Assets
    • Links
Powered by GitBook
On this page
  • EcdsaDkgValidator
  • groupSize
  • groupThreshold
  • activeThreshold
  • publicKeyByteSize
  • signatureByteSize
  • sortitionPool
  • constructor
  • validate
  • validateFields
  • validateGroupMembers
  • validateSignatures
  • validateMembersHash

Was this helpful?

Export as PDF
  1. App Development
  2. tBTC
  3. tBTC Contracts API
  4. ECDSA API

EcdsaDkgValidator

EcdsaDkgValidator

EcdsaDkgValidator allows performing a full validation of DKG result, including checking the format of fields in the result, declared selected group members, and signatures of operators supporting the result. The operator submitting the result should perform the validation using a free contract call before submitting the result to ensure their result is valid and can not be challenged. All other network operators should perform validation of the submitted result using a free contract call and challenge the result if the validation fails.

groupSize

uint256 groupSize

Size of a group in DKG.

groupThreshold

uint256 groupThreshold

The minimum number of group members needed to interact according to the protocol to produce a signature. The adversary can not learn anything about the key as long as it does not break into groupThreshold+1 of members.

activeThreshold

uint256 activeThreshold

The minimum number of active and properly behaving group members during the DKG needed to accept the result. This number is higher than groupThreshold to keep a safety margin for members becoming inactive after DKG so that the group can still produce signature.

publicKeyByteSize

uint256 publicKeyByteSize

Size in bytes of a public key produced by group members during the the DKG. The length assumes uncompressed ECDSA public key.

signatureByteSize

uint256 signatureByteSize

Size in bytes of a single signature produced by operator supporting DKG result.

sortitionPool

contract SortitionPool sortitionPool

constructor

constructor(contract SortitionPool _sortitionPool) public

validate

function validate(struct EcdsaDkg.Result result, uint256 seed, uint256 startBlock) external view returns (bool isValid, string errorMsg)

Performs a full validation of DKG result, including checking the format of fields in the result, declared selected group members, and signatures of operators supporting the result.

Parameters

Name
Type
Description

result

struct EcdsaDkg.Result

seed

uint256

seed used to start the DKG and select group members

startBlock

uint256

DKG start block

Return Values

Name
Type
Description

isValid

bool

true if the result is valid, false otherwise

errorMsg

string

validation error message; empty for a valid result

validateFields

function validateFields(struct EcdsaDkg.Result result) public pure returns (bool isValid, string errorMsg)

Performs a static validation of DKG result fields: lengths, ranges, and order of arrays.

Return Values

Name
Type
Description

isValid

bool

true if the result is valid, false otherwise

errorMsg

string

validation error message; empty for a valid result

validateGroupMembers

function validateGroupMembers(struct EcdsaDkg.Result result, uint256 seed) public view returns (bool)

Performs validation of group members as declared in DKG result against group members selected by the sortition pool.

Parameters

Name
Type
Description

result

struct EcdsaDkg.Result

seed

uint256

seed used to start the DKG and select group members

Return Values

Name
Type
Description

[0]

bool

true if group members matches; false otherwise

validateSignatures

function validateSignatures(struct EcdsaDkg.Result result, uint256 startBlock) public view returns (bool)

Performs validation of signatures supplied in DKG result. Note that this function does not check if addresses which supplied signatures supporting the result are the ones selected to the group by sortition pool. This function should be used together with validateGroupMembers.

Parameters

Name
Type
Description

result

struct EcdsaDkg.Result

startBlock

uint256

DKG start block

Return Values

Name
Type
Description

[0]

bool

true if group members matches; false otherwise

validateMembersHash

function validateMembersHash(struct EcdsaDkg.Result result) public pure returns (bool)

Performs validation of hashed group members that actively took part in DKG.

Parameters

Name
Type
Description

result

struct EcdsaDkg.Result

DKG result

Return Values

Name
Type
Description

[0]

bool

true if calculated result's group members hash matches with the one that is challenged.

PreviousEcdsaDkgNextEcdsaInactivity

Last updated 1 year ago

Was this helpful?