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

Create and validate seals using threshold signatures. #186

Open
afck opened this issue Aug 13, 2019 · 0 comments
Open

Create and validate seals using threshold signatures. #186

afck opened this issue Aug 13, 2019 · 0 comments
Assignees

Comments

@afck
Copy link
Collaborator

afck commented Aug 13, 2019

When a new block is ready for sealing, validators use their secret key share to produce a signature share, and broadcast it. Once sufficiently many shares have been received, they generate the block's seal and import the block into the chain.
Seals of received blocks are validated using the public master key of the current validator set.

Ideally, we'd send the share as soon as we create the block. Miner::create_pending_block_at actually returns the new block, so we can create our signature share of header.bare_hash() and broadcast it.

Engine::generate_seal is only called in Miner::seal_and_import_block_internally, which is called in Miner::update_sealing whenever the engine returns SealingState::Ready. We should return Ready only once we have enough shares, and in generate_seal we'd put them together.

@afck afck self-assigned this Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant