Skip to content

[500 SigmaUSD] Distributed signatures support #367

@greenhat

Description

@greenhat

References:
EIP-11
Improved distributed signatures

New code should be in prover::multi_sig module.

Generate commitments

fn generate_commitments(tx_context: TransactionContext, state_context: &ErgoStateContext) -> Result<TransactionHintsBag, _> function should be an equivalent of wallet/generateCommitments node API call, see implementation at https://github.com/ergoplatform/ergo/blob/95139ec990fc91f8f4c70a61468edf8834143329/ergo-wallet/src/main/scala/org/ergoplatform/wallet/interpreter/ErgoProvingInterpreter.scala#L182-L222
TransactionHintsBag type should be an equivalent of https://github.com/ergoplatform/ergo/blob/95139ec990fc91f8f4c70a61468edf8834143329/ergo-wallet/src/main/scala/org/ergoplatform/wallet/interpreter/TransactionHintsBag.scala#L5

Extract hints from signed(invalid) transaction

fn extract_hints(tx_context: TransactionContext, state_context: &ErgoStateContext, real_secrets_to_extract: Vec<SigmaBoolean>, simulated_secrets_to_extract: Vec<SigmaBoolean>) -> Result<TransactionHintsBag, _> should be an equivalent of script/extractHints node API call, see implementation at https://github.com/ergoplatform/ergo/blob/95139ec990fc91f8f4c70a61468edf8834143329/ergo-wallet/src/main/scala/org/ergoplatform/wallet/interpreter/ErgoProvingInterpreter.scala#L224-L263

Hints support in prover and tx signing

Wasm API.

  • Expose TransactionHintsBag type via wrapper;
  • Add tx_hints: TransactionHintsBag parameters to Wallet::sign_* methods;
  • Expose generate_commitments and extract_hints (passing serialized SigmaBooleans) functions.

Testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions