2023-04-25 19:05:58 +00:00
|
|
|
# Coordinator
|
|
|
|
|
|
|
|
The coordinator is a service which communicates with all of the processors,
|
|
|
|
all of the other coordinators over a secondary P2P network, and with the Serai
|
|
|
|
node.
|
|
|
|
|
|
|
|
This document primarily details its flow with regards to the Serai node and
|
|
|
|
processor.
|
|
|
|
|
2023-09-29 07:51:01 +00:00
|
|
|
### New Set Event
|
2023-04-25 19:05:58 +00:00
|
|
|
|
|
|
|
On `validator_sets::pallet::Event::NewSet`, the coordinator spawns a tributary
|
|
|
|
for the new set. It additionally sends the processor
|
|
|
|
`key_gen::CoordinatorMessage::GenerateKey`.
|
|
|
|
|
2023-09-29 07:51:01 +00:00
|
|
|
### Key Generation Event
|
2023-04-25 19:05:58 +00:00
|
|
|
|
|
|
|
On `validator_sets::pallet::Event::KeyGen`, the coordinator sends
|
|
|
|
`substrate::CoordinatorMessage::ConfirmKeyPair` to the processor.
|
|
|
|
|
2023-09-29 07:51:01 +00:00
|
|
|
### Batch
|
2023-04-25 19:05:58 +00:00
|
|
|
|
2023-09-29 07:51:01 +00:00
|
|
|
On `substrate::ProcessorMessage::Batch`, the coordinator notes what the on-chain
|
|
|
|
`Batch` should be, for verification once published.
|
2023-04-25 19:05:58 +00:00
|
|
|
|
2023-09-29 07:51:01 +00:00
|
|
|
### SignedBatch
|
|
|
|
|
|
|
|
On `substrate::ProcessorMessage::SignedBatch`, the coordinator publishes an
|
|
|
|
unsigned transaction containing the signed batch to the Serai blockchain.
|
|
|
|
|
|
|
|
### Sign Completed
|
2023-04-25 19:05:58 +00:00
|
|
|
|
2023-07-14 18:05:12 +00:00
|
|
|
On `sign::ProcessorMessage::Completed`, the coordinator makes a tributary
|
|
|
|
transaction containing the transaction hash the signing process was supposedly
|
|
|
|
completed with.
|
|
|
|
|
|
|
|
Due to rushing adversaries, the actual transaction completing the plan may be
|
|
|
|
distinct on-chain. These messages solely exist to coordinate the signing
|
|
|
|
process, not to determine chain state.
|