Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One Round DKG #589

Merged
merged 58 commits into from
Aug 16, 2024
Merged

One Round DKG #589

merged 58 commits into from
Aug 16, 2024

Commits on Aug 2, 2024

  1. Configuration menu
    Copy the full SHA
    dcc26ec View commit details
    Browse the repository at this point in the history
  2. Initial eVRF implementation

    Not quite done yet. It needs to communicate the resulting points and proofs to
    extract them from the Pedersen Commitments in order to return those, and then
    be tested.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    db31809 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    49a1831 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    772d033 View commit details
    Browse the repository at this point in the history
  5. Make DKG Encryption a bit more flexible

    No longer requires the use of an EncryptionKeyMessage, and allows pre-defined
    keys for encryption.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    b847296 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b6e6880 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b710303 View commit details
    Browse the repository at this point in the history
  8. Initial eVRF-based DKG

    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    7710da4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fa31f26 View commit details
    Browse the repository at this point in the history
  10. Inline the eVRF into the DKG library

    Due to how we're handling share encryption, we'd either need two circuits or to
    dedicate this circuit to the DKG. The latter makes sense at this time.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    96175e1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    05c26d7 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    eca82f3 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    00dc308 View commit details
    Browse the repository at this point in the history
  14. Finish routing the eVRF functionality

    Still needs errors and serialization, along with a few other TODOs.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    ef68885 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4bd0d71 View commit details
    Browse the repository at this point in the history
  16. Improve eVRF DKG

    Updates how we calculcate verification shares, improves performance when
    extracting multiple sets of keys, and adds more to the test for it.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    31ac0ac View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c960d6b View commit details
    Browse the repository at this point in the history
  18. Resolve various TODOs

    Supports recovering multiple key shares from the eVRF DKG.
    
    Inlines two loops to save 2**16 iterations.
    
    Adds support for creating a constant time representation of scalars < NUM_BITS.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    f93bd42 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    681010f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a6775d7 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    c5cc0dc View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    65efbf4 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    fb7e966 View commit details
    Browse the repository at this point in the history
  24. Rewrite processor key-gen around the eVRF DKG

    Still a WIP.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    12f74e1 View commit details
    Browse the repository at this point in the history
  25. Finish routing the new key gen in the processor

    Doesn't touch the tests, coordinator, nor Substrate yet.
    `cargo +nightly fmt && cargo +nightly-2024-07-01 clippy --all-features -p serai-processor`
    does pass.
    kayabaNerve committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    2f564c2 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    d3f0378 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    b5bf70b View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    9e716c0 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2024

  1. Configuration menu
    Copy the full SHA
    fc51c9b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ed3559 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2024

  1. Have set_keys take signature_participants, not removed_participants

    Now no one is removed from the DKG. Only `t` people publish the key however.
    
    Uses a BitVec for an efficient encoding of the participants.
    kayabaNerve committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    58a435d View commit details
    Browse the repository at this point in the history
  2. Update the coordinator binary for the new DKG

    This does not yet update any tests.
    kayabaNerve committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    54eefbd View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Configuration menu
    Copy the full SHA
    1b76133 View commit details
    Browse the repository at this point in the history
  2. Have the DKG explicitly declare how to interpolate its shares

    Removes the hack for MuSig where we multiply keys by the inverse of their
    lagrange interpolation factor.
    kayabaNerve committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    f08faea View commit details
    Browse the repository at this point in the history
  3. Replace Interpolation::None with Interpolation::Constant

    Allows the MuSig DKG to keep the secret share as the original private key,
    enabling deriving FROST nonces consistently regardless of the MuSig context.
    kayabaNerve committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    9e8e134 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e74c8f3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2ae2883 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Configuration menu
    Copy the full SHA
    89fc88b View commit details
    Browse the repository at this point in the history
  2. cargo machete

    kayabaNerve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    b8912e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8de696f View commit details
    Browse the repository at this point in the history
  4. Update orchestration

    kayabaNerve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    3042697 View commit details
    Browse the repository at this point in the history
  5. Remove bad panic in coordinator

    It expected ConfirmationShare to be n-of-n, not t-of-n.
    kayabaNerve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    d943e03 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8c50a31 View commit details
    Browse the repository at this point in the history
  7. Update TX size limit

    We now no longer have to support the ridiculous case of having 49 DKG
    participations within a 101-of-150 DKG. It does remain quite high due to
    needing to _sign_ so many times. It'd may be optimal for parties with multiple
    key shares to independently send their preprocesses/shares (despite the
    overhead that'll cause with signatures and the transaction structure).
    kayabaNerve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    c790efa View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f27fb9b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ec62930 View commit details
    Browse the repository at this point in the history
  10. Send/Recv Participation one at a time

    Sending all, then attempting to receive all in an expected order, wasn't working
    even with notable delays between sending messages. This points to the mempool
    not working as expected...
    kayabaNerve committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    e9d09ef View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    dbf32d5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    01de73e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    470b5f7 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2024

  1. Correct construction of signature_participants in serai-client tests

    Fault identified by akil.
    kayabaNerve committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    756db82 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Further contextualize DkgConfirmer by ValidatorSet

    Caught by a safety check we wouldn't reuse preprocesses across messages. That
    raises the question of we were prior reusing preprocesses (reusing keys)?
    Except that'd have caused a variety of signing failures (suggesting we had some
    staggered timing avoiding it in practice but yes, this was possible in theory).
    kayabaNerve committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    0fe7360 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. Configuration menu
    Copy the full SHA
    843396f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f1fcff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e098369 View commit details
    Browse the repository at this point in the history
  4. cargo fmt

    kayabaNerve committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    6bc746e View commit details
    Browse the repository at this point in the history
  5. Don't use [0; 32] for the embedded keys in the coordinator rotation…

    … test
    
    The key_gen function expects the random values already decided.
    kayabaNerve committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    35c54da View commit details
    Browse the repository at this point in the history
  6. Big-endian secq256k1 scalars

    Also restores the prior, safer, Encryption::register function.
    kayabaNerve committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    1f093cf View commit details
    Browse the repository at this point in the history