Skip to content

Conversation

@lukasz-zimnoch
Copy link
Member

Closes: #3013
Depends on: #3074

Here we integrate the DKG test loop with the real sortition pool group selection. Apart from that, we are also integrating the new beacon chain Ethereum implementation into the beacon application code and doing some cleanup in the DKG executor API.

The following requirements must be met in order to run the client with a working DKG loop:

  • Random Beacon v2 sortition pool must be deployed
  • The sortition pool must have at least one registered operator
  • The sortition pool must be locked manually

The `beacon.Initialize` function will need to
use the v2 beacon chain implementation. To not
break the build, we rename the currently used
implementation by adding the `V1` suffix and
inject the new v2 chain implementation as
the regular `beaconChain`.
the DKG executor

Since `beaconchain.Interface` now exposes the
`Signing` function allowing to obtain a
`chain.Signing` reference, there is no point
to pass it separately next to the
`beaconchain.Interface` instance. This changeset
cleans up that for the DKG executor code.
implementations from v1 chain to v2 chain handle

Since `beacon.Initialize` uses the new
v2 beacon chain implementation to run the DKG
test loop, we need to port all stub
implementations of the chain functions used
by the DKG loop from the legacy v1 chain handle
to the new v2 beacon chain implementation.
@lukasz-zimnoch lukasz-zimnoch requested a review from pdyraga July 8, 2022 11:15
@lukasz-zimnoch lukasz-zimnoch self-assigned this Jul 8, 2022
@lukasz-zimnoch lukasz-zimnoch added this to the v2.0.0-m1 milestone Jul 8, 2022
Base automatically changed from pkg-beacon-cleanup to main July 8, 2022 12:49
@pdyraga
Copy link
Member

pdyraga commented Jul 8, 2022

The sortition pool must be locked manually

Can we provide Hardhat task and a script for genesis? This would simplify the local development a lot.

@lukasz-zimnoch
Copy link
Member Author

The sortition pool must be locked manually

Can we provide Hardhat task and a script for genesis? This would simplify the local development a lot.

Will handle that in a separate PR!

# Conflicts:
#	pkg/chain/ethereum/beacon.go
@lukasz-zimnoch
Copy link
Member Author

Added the Hardhat task for genesis: #3080

@pdyraga
Copy link
Member

pdyraga commented Jul 8, 2022

Can we undraft this PR now given #3074 is merged?

# Conflicts:
#	cmd/start.go
#	pkg/beacon/beacon.go
#	pkg/chain/ethereum/beacon.go
.Interface`

The beacon application must manage its on-chain
sortition pool. That means the beacon chain
interface must declare sortition-pool-specific
functions. The best way to that is to embed
the `sortition.Chain` interface.
@pdyraga
Copy link
Member

pdyraga commented Jul 11, 2022

Tested locally with 2 clients, and works as advertised!

@pdyraga pdyraga merged commit 22a61e6 into main Jul 11, 2022
@pdyraga pdyraga deleted the dkg-loop-sortition-pool branch July 11, 2022 16:24
@pdyraga pdyraga modified the milestones: v2.0.0-m0, v2.0.0-m4 Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random Beacon DKG test loop

2 participants