diff --git a/coordinator/Cargo.toml b/coordinator/Cargo.toml index 92930008..c049360b 100644 --- a/coordinator/Cargo.toml +++ b/coordinator/Cargo.toml @@ -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"] diff --git a/coordinator/src/tributary/db.rs b/coordinator/src/tributary/db.rs index 69bda7aa..7f9de7b2 100644 --- a/coordinator/src/tributary/db.rs +++ b/coordinator/src/tributary/db.rs @@ -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 diff --git a/orchestration/coordinator/Dockerfile b/orchestration/coordinator/Dockerfile index c468654f..f30734c5 100644 --- a/orchestration/coordinator/Dockerfile +++ b/orchestration/coordinator/Dockerfile @@ -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 diff --git a/orchestration/coordinator/Dockerfile.coordinator b/orchestration/coordinator/Dockerfile.coordinator index 8fca5622..8c1f6a22 100644 --- a/orchestration/coordinator/Dockerfile.coordinator +++ b/orchestration/coordinator/Dockerfile.coordinator @@ -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 diff --git a/orchestration/serai/Dockerfile b/orchestration/serai/Dockerfile index c06205f4..48a63fb3 100644 --- a/orchestration/serai/Dockerfile +++ b/orchestration/serai/Dockerfile @@ -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 diff --git a/orchestration/serai/Dockerfile.serai b/orchestration/serai/Dockerfile.serai index 839ec923..4b68b380 100644 --- a/orchestration/serai/Dockerfile.serai +++ b/orchestration/serai/Dockerfile.serai @@ -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