diff --git a/bridge/setu/processor/checkpoint.go b/bridge/setu/processor/checkpoint.go index 73b0da598..c0d934fc5 100644 --- a/bridge/setu/processor/checkpoint.go +++ b/bridge/setu/processor/checkpoint.go @@ -10,7 +10,6 @@ import ( "strconv" "time" - "github.com/RichardKnop/machinery/v1/tasks" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/maticnetwork/bor/accounts/abi" @@ -286,10 +285,7 @@ func (cp *CheckpointProcessor) sendCheckpointAckToHeimdall(eventName string, che return err } } - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - cp.Logger.Debug("Retrying checkpoint-ack to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } // handleCheckpointNoAck - Checkpoint No-Ack handler diff --git a/bridge/setu/processor/clerk.go b/bridge/setu/processor/clerk.go index 36afbfa2f..f553798cd 100644 --- a/bridge/setu/processor/clerk.go +++ b/bridge/setu/processor/clerk.go @@ -4,7 +4,6 @@ import ( "encoding/hex" "encoding/json" - "github.com/RichardKnop/machinery/v1/tasks" cliContext "github.com/cosmos/cosmos-sdk/client/context" "github.com/maticnetwork/bor/accounts/abi" "github.com/maticnetwork/bor/core/types" @@ -108,10 +107,7 @@ func (cp *ClerkProcessor) sendStateSyncedToHeimdall(eventName string, logBytes s } } - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - cp.Logger.Debug("Retrying deposit to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } // isOldTx checks if tx is already processed or not diff --git a/bridge/setu/processor/fee.go b/bridge/setu/processor/fee.go index e174b1090..99a7f7123 100644 --- a/bridge/setu/processor/fee.go +++ b/bridge/setu/processor/fee.go @@ -3,7 +3,6 @@ package processor import ( "encoding/json" - "github.com/RichardKnop/machinery/v1/tasks" cliContext "github.com/cosmos/cosmos-sdk/client/context" "github.com/maticnetwork/bor/accounts/abi" "github.com/maticnetwork/bor/core/types" @@ -86,11 +85,7 @@ func (fp *FeeProcessor) sendTopUpFeeToHeimdall(eventName string, logBytes string return err } } - - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - fp.Logger.Debug("Retrying topup to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } // isOldTx checks if tx is already processed or not diff --git a/bridge/setu/processor/staking.go b/bridge/setu/processor/staking.go index a8e5ebf7e..f8c91637c 100644 --- a/bridge/setu/processor/staking.go +++ b/bridge/setu/processor/staking.go @@ -126,10 +126,7 @@ func (sp *StakingProcessor) sendValidatorJoinToHeimdall(eventName string, logByt return err } } - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - sp.Logger.Debug("Retrying validatorjoin to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } func (sp *StakingProcessor) sendUnstakeInitToHeimdall(eventName string, logBytes string) error { @@ -188,11 +185,7 @@ func (sp *StakingProcessor) sendUnstakeInitToHeimdall(eventName string, logBytes return err } } - - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - sp.Logger.Debug("Retrying unstake-init to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } func (sp *StakingProcessor) sendStakeUpdateToHeimdall(eventName string, logBytes string) error { @@ -246,11 +239,7 @@ func (sp *StakingProcessor) sendStakeUpdateToHeimdall(eventName string, logBytes return err } } - - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - sp.Logger.Debug("Retrying stake-update to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } func (sp *StakingProcessor) sendSignerChangeToHeimdall(eventName string, logBytes string) error { @@ -313,11 +302,7 @@ func (sp *StakingProcessor) sendSignerChangeToHeimdall(eventName string, logByte return err } } - - // After broadcasting transaction from bridge, add back the msg to queue with retry delay. - // This is to retry side-tx msg incase if it was failed earlier during side-tx processing on heimdall. - sp.Logger.Debug("Retrying signer-change to check if side-tx is successful or not", "after", util.BlocksToDelayBeforeRetry*util.BlockInterval) - return tasks.NewErrRetryTaskLater("retry to check if side-tx is successful or not", util.BlocksToDelayBeforeRetry*util.BlockInterval) + return nil } // isOldTx checks if tx is already processed or not diff --git a/bridge/setu/util/common.go b/bridge/setu/util/common.go index bbefc59ee..6933c3fef 100644 --- a/bridge/setu/util/common.go +++ b/bridge/setu/util/common.go @@ -58,8 +58,6 @@ const ( TaskDelayBetweenEachVal = 3 * BlockInterval ValidatorJoinRetryDelay = 3 * BlockInterval - BlocksToDelayBeforeRetry = 6 - BridgeDBFlag = "bridge-db" )