Add a LibP2P instantiation to coordinator

It's largely unoptimized, and not yet exclusive to validators, yet has basic
sanity (using message content for ID instead of sender + index).

Fixes bugs as found. Notably, we used a time in milliseconds where the
Tributary expected  seconds.

Also has Tributary::new jump to the presumed round number. This reduces slashes
when starting new chains (whose times will be before the current time) and was
the only way I was able to observe successful confirmations given current
surrounding infrastructure.
This commit is contained in:
Luke Parker
2023-08-08 15:12:47 -04:00
parent 0dd8aed134
commit f6f945e747
18 changed files with 376 additions and 50 deletions

View File

@@ -38,6 +38,10 @@ pub fn coordinator_instance(
use serai_client::primitives::insecure_pair_from_name;
hex::encode(&insecure_pair_from_name(name).as_ref().secret.to_bytes()[.. 32])
}),
(
"RUST_LOG".to_string(),
"serai_coordinator=trace,".to_string() + "tributary_chain=trace," + "tendermint=trace",
),
]
.into(),
)

View File

@@ -70,6 +70,8 @@ async fn stack_test() {
})
);
}
tokio::time::sleep(Duration::from_secs(30)).await;
})
.await;
}