From 74024b028c029af8ed5d0bce03143d6d168e6090 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky <svyatonik@gmail.com> Date: Mon, 13 Sep 2021 13:35:41 +0300 Subject: [PATCH] fix transaction resubmitter limits for Millau -> Rialto transactions (#1135) --- .../bin-substrate/src/cli/resubmit_transactions.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs b/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs index ee9801b3fdc..4fad160fee0 100644 --- a/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs +++ b/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs @@ -54,8 +54,16 @@ macro_rules! select_bridge { type Target = relay_millau_client::Millau; type TargetSign = relay_millau_client::Millau; - const TIP_STEP: bp_millau::Balance = 1_000_000; - const TIP_LIMIT: bp_millau::Balance = 1_000_000_000; + // When large message is being sent from Millau to Rialto AND other transactions are blocking + // it from being mined, we'll see something like this in logs: + // + // Millau transaction priority with tip=0: 17800827994. Target priority: 526186677695 + // + // So since fee multiplier in Millau is `1` and `WeightToFee` is `IdentityFee`, then we need + // tip around `526186677695 - 17800827994 = 508_385_849_701`. Let's round it up to `1_000_000_000_000`. + + const TIP_STEP: bp_millau::Balance = 1_000_000_000; + const TIP_LIMIT: bp_millau::Balance = 1_000_000_000_000; const STALLED_BLOCKS: bp_millau::BlockNumber = 5; -- GitLab