Start moving Coordinator to a multi-Tributary model

Prior, we only supported a single Tributary per network, and spawned a task to
handled Processor messages per Tributary. Now, we handle Processor messages per
network, yet we still only supported a single Tributary in that handling
function.

Now, when we handle a message, we load the Tributary which is relevant. Once we
know it, we ensure we have it (preventing race conditions), and then proceed.

We do need work to check if we should have a Tributary, or if we're not
participating. We also need to check if a Tributary has been retired, meaning
we shouldn't handle any transactions related to them, and to clean up retired
Tributaries.
This commit is contained in:
Luke Parker
2023-09-27 18:20:36 -04:00
parent 4a32f22418
commit 7d738a3677
8 changed files with 353 additions and 239 deletions

View File

@@ -26,7 +26,11 @@ async fn test_substrate_signer() {
let id: u32 = 5;
let block = BlockHash([0xaa; 32]);
let mut actual_id = SignId { key: vec![], id: [0; 32], attempt: 0 };
let mut actual_id = SignId {
key: keys.values().next().unwrap().group_key().to_bytes().to_vec(),
id: [0; 32],
attempt: 0,
};
let batch = Batch {
network: NetworkId::Monero,