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

DKG test loop #3034

Merged
merged 29 commits into from
Jul 6, 2022
Merged

DKG test loop #3034

merged 29 commits into from
Jul 6, 2022

Commits on Jun 24, 2022

  1. Get rid of the current group selection code

    The existing group selection code (ticket
    submission etc.) was relevant for beacon v1
    but does no longer make sense for v2. The new
    group creation process does not use ticket
    submission and relies on the sortition pool
    group selection. This changeset is the first
    step towards the support of the new group
    creation flow.
    lukasz-zimnoch committed Jun 24, 2022
    Configuration menu
    Copy the full SHA
    af45efd View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Merge branch 'main' into dkg-loop

    # Conflicts:
    #	pkg/chain/local/local.go
    lukasz-zimnoch committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    e895b9b View commit details
    Browse the repository at this point in the history
  2. Start DKG every 100th block

    Contract bindings are not ready yet so, we
    mitigate that problem by triggering the
    DKG loop every 100th block.
    lukasz-zimnoch committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    c310f80 View commit details
    Browse the repository at this point in the history
  3. Cleanup the remaining parts related to ticket

    submission logic
    lukasz-zimnoch committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    e620aed View commit details
    Browse the repository at this point in the history
  4. Move IsGroupRegistered to

    `GroupRegistrationInterface`
    
    So far, this function was defined in the
    `DistributedKeyGenerationInterface` but
    looks like `GroupRegistrationInterface` is
    a better place.
    lukasz-zimnoch committed Jun 29, 2022
    Configuration menu
    Copy the full SHA
    762b0d8 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2022

  1. Remove current group selection deduplication logic

    That logic is now obsolete because the v2
    beacon group creation looks differently and
    uses the result challenge and approval mechanisms.
    Because of that, we remove it from the
    deduplicator and leave a TODO to implement
    the new logic when the full new group creation
    flow will be implemented.
    lukasz-zimnoch committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    3d88e37 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0d2670 View commit details
    Browse the repository at this point in the history
  3. Temporarily hardcode group size and honest

    threshold
    
    This way we can use values from v2, and we can
    test how DKG behaves with them.
    lukasz-zimnoch committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    66e9c3a View commit details
    Browse the repository at this point in the history
  4. Storing DKG test loop result on disk

    In v1, a result of a successful DKG was always a
    fully-operable on-chain group whose key material
    share was registered on-disk by each member.
    This is no longer a case in v2 where a DKG
    result is not approved immediately and is the
    subject of a challenge period. Because of that,
    we modify the group registry to allow storing
    non-operable candidate groups first and then
    register those groups as approved once on-chain
    approval takes place.
    lukasz-zimnoch committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    a46353d View commit details
    Browse the repository at this point in the history
  5. Detach DKG result submission from the v1 contract

    Here we detach the DKG result submission logic
    from the v1 contract in favor of a temporary
    code that will allow to test the DKG loop.
    Once the interim ends, real v2 contract binding
    should be integrated here.
    lukasz-zimnoch committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    a5b67cb View commit details
    Browse the repository at this point in the history
  6. Remove the last parts related with ticket

    submission
    lukasz-zimnoch committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    0d940da View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2022

  1. Integrate mock group selection

    The real group selection is not available yet
    so we just return a group whose members correspond
    to the operator itself. In effect, the DKG test
    loop will be performed between members belonging
    to the same client instance.
    lukasz-zimnoch committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    002b15a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1900757 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2022

  1. Configuration menu
    Copy the full SHA
    b04ec33 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0aea172 View commit details
    Browse the repository at this point in the history
  3. Trigger DKG loop every 500th block

    If we trigger DKG every 100th block, subsequent
    DKG instances overlap and cause very high
    CPU usage.
    lukasz-zimnoch committed Jul 4, 2022
    Configuration menu
    Copy the full SHA
    05cc9ca View commit details
    Browse the repository at this point in the history
  4. Return to 64 group members

    Random beacon DKG will still use 64 members.
    We reflect that change in the temporary
    hardcoded variable.
    lukasz-zimnoch committed Jul 4, 2022
    Configuration menu
    Copy the full SHA
    e002bfb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1c5a815 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2022

  1. Fix candidate group storage

    The approach used so far was problematic because
    the maximum directory size is 128 characters
    which doesn't leave space for the `_candidate`
    suffix.
    lukasz-zimnoch committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    c80c1ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2e607c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6fd17ee View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2022

  1. Improve docs of JoinDKGIfEligible function

    Co-authored-by: Piotr Dyraga <[email protected]>
    lukasz-zimnoch and pdyraga authored Jul 6, 2022
    Configuration menu
    Copy the full SHA
    e49262d View commit details
    Browse the repository at this point in the history
  2. s/100th/500th

    Co-authored-by: Piotr Dyraga <[email protected]>
    lukasz-zimnoch and pdyraga authored Jul 6, 2022
    Configuration menu
    Copy the full SHA
    185fe7f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    641466e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5ac87df View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ed315ca View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fbe3062 View commit details
    Browse the repository at this point in the history
  7. Mention about disabling subscription monitoring

    loop for `DkgStarted` event.
    lukasz-zimnoch committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    7c122d5 View commit details
    Browse the repository at this point in the history
  8. Make the DKG test loop working without v1

    contracts
    lukasz-zimnoch committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    10e12b9 View commit details
    Browse the repository at this point in the history