Increase reattempt delays in the GH CI, which is extremely latent

This commit is contained in:
Luke Parker 2023-12-30 22:11:04 -05:00
parent ec8dfd4639
commit 02776c54a8
No known key found for this signature in database
6 changed files with 13 additions and 6 deletions

View file

@ -58,5 +58,6 @@ sp-application-crypto = { git = "https://github.com/serai-dex/substrate", defaul
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }
[features]
longer-reattempts = []
parity-db = ["serai-db/parity-db"]
rocksdb = ["serai-db/rocksdb"]

View file

@ -131,7 +131,13 @@ impl ReattemptDb {
topic: Topic,
) {
// 5 minutes
#[cfg(not(feature = "longer-reattempts"))]
const BASE_REATTEMPT_DELAY: u32 = (5 * 60 * 1000) / tributary::tendermint::TARGET_BLOCK_TIME;
// 10 minutes, intended for latent environments like the GitHub CI
#[cfg(feature = "longer-reattempts")]
const BASE_REATTEMPT_DELAY: u32 = (10 * 60 * 1000) / tributary::tendermint::TARGET_BLOCK_TIME;
// 5 minutes for attempts 0 ..= 2, 10 minutes for attempts 3 ..= 5, 15 minutes for attempts > 5
// Assumes no event will take longer than 15 minutes, yet grows the time in case there are
// network bandwidth issues

View file

@ -48,7 +48,7 @@ RUN --mount=type=cache,target=/root/.cargo \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/serai/target \
mkdir /serai/bin && \
cargo build -p serai-coordinator --features parity-db && \
cargo build -p serai-coordinator --features "parity-db longer-reattempts" && \
mv /serai/target/debug/serai-coordinator /serai/bin
FROM debian:bookworm-slim as image

View file

@ -1,2 +1,2 @@
cargo build -p serai-coordinator --features parity-db && \
cargo build -p serai-coordinator --features "parity-db longer-reattempts" && \
mv /serai/target/debug/serai-coordinator /serai/bin

View file

@ -48,8 +48,8 @@ RUN --mount=type=cache,target=/root/.cargo \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/serai/target \
mkdir /serai/bin && \
cargo build --release -p serai-node && \
mv /serai/target/release/serai-node /serai/bin
cargo build -p serai-node && \
mv /serai/target/debug/serai-node /serai/bin
FROM debian:bookworm-slim as image
COPY --from=mimalloc libmimalloc.so /usr/lib

View file

@ -1,2 +1,2 @@
cargo build --release -p serai-node && \
mv /serai/target/release/serai-node /serai/bin
cargo build -p serai-node && \
mv /serai/target/debug/serai-node /serai/bin