mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-23 03:59:22 +00:00
0eff3d9453
Renames Update to SignedBatch. Checks Batch equality via a hash of the InInstructions. That prevents needing to keep the Batch in node state or TX introspect.
39 lines
1.3 KiB
Markdown
39 lines
1.3 KiB
Markdown
# 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.
|
|
|
|
### New Set Event
|
|
|
|
On `validator_sets::pallet::Event::NewSet`, the coordinator spawns a tributary
|
|
for the new set. It additionally sends the processor
|
|
`key_gen::CoordinatorMessage::GenerateKey`.
|
|
|
|
### Key Generation Event
|
|
|
|
On `validator_sets::pallet::Event::KeyGen`, the coordinator sends
|
|
`substrate::CoordinatorMessage::ConfirmKeyPair` to the processor.
|
|
|
|
### Batch
|
|
|
|
On `substrate::ProcessorMessage::Batch`, the coordinator notes what the on-chain
|
|
`Batch` should be, for verification once published.
|
|
|
|
### SignedBatch
|
|
|
|
On `substrate::ProcessorMessage::SignedBatch`, the coordinator publishes an
|
|
unsigned transaction containing the signed batch to the Serai blockchain.
|
|
|
|
### Sign Completed
|
|
|
|
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.
|