From d8718a4107aebbc6dd123b049727f55467ced597 Mon Sep 17 00:00:00 2001 From: seek Date: Mon, 9 Dec 2024 23:02:35 +0800 Subject: [PATCH 1/5] Update relayer.go --- submitter/relayer/relayer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/submitter/relayer/relayer.go b/submitter/relayer/relayer.go index fca0665..064007a 100644 --- a/submitter/relayer/relayer.go +++ b/submitter/relayer/relayer.go @@ -181,6 +181,10 @@ func (rl *Relayer) MaybeResubmitSecondCheckpointTx(ckpt *ckpttypes.RawCheckpoint rl.logger.Debugf("The checkpoint for epoch %v was sent more than %v seconds ago but not included on BTC", ckptEpoch, rl.config.ResendIntervalSeconds) + if rl.lastSubmittedCheckpoint.Tx1 == nil || rl.lastSubmittedCheckpoint.Tx2 == nil { + return fmt.Errorf("tx1 and tx2 in rl.lastSubmittedCheckpoint is nil, tx1 %v, tx2 %v", rl.lastSubmittedCheckpoint.Tx1, rl.lastSubmittedCheckpoint.Tx2) + } + bumpedFee := rl.calculateBumpedFee(rl.lastSubmittedCheckpoint) // make sure the bumped fee is effective From 33a32911ae593fba5c34ed00279d302bbd51cede Mon Sep 17 00:00:00 2001 From: seek Date: Tue, 10 Dec 2024 18:27:03 +0800 Subject: [PATCH 2/5] Update submitter.go --- submitter/submitter.go | 1 + 1 file changed, 1 insertion(+) diff --git a/submitter/submitter.go b/submitter/submitter.go index d72e8fb..e1783ff 100644 --- a/submitter/submitter.go +++ b/submitter/submitter.go @@ -207,6 +207,7 @@ func (s *Submitter) processCheckpoints() { if err := s.relayer.SendCheckpointToBTC(ckpt); err != nil { s.logger.Errorf("Failed to submit the raw checkpoint for %v: %v", ckpt.Ckpt.EpochNum, err) s.metrics.FailedCheckpointsCounter.Inc() + continue } if err := s.relayer.MaybeResubmitSecondCheckpointTx(ckpt); err != nil { s.logger.Errorf("Failed to resubmit the raw checkpoint for %v: %v", ckpt.Ckpt.EpochNum, err) From 2b1f03188edd10c761630de4dbb8ae671cddc0e1 Mon Sep 17 00:00:00 2001 From: seek Date: Tue, 10 Dec 2024 18:27:29 +0800 Subject: [PATCH 3/5] Update relayer.go --- submitter/relayer/relayer.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/submitter/relayer/relayer.go b/submitter/relayer/relayer.go index 064007a..fca0665 100644 --- a/submitter/relayer/relayer.go +++ b/submitter/relayer/relayer.go @@ -181,10 +181,6 @@ func (rl *Relayer) MaybeResubmitSecondCheckpointTx(ckpt *ckpttypes.RawCheckpoint rl.logger.Debugf("The checkpoint for epoch %v was sent more than %v seconds ago but not included on BTC", ckptEpoch, rl.config.ResendIntervalSeconds) - if rl.lastSubmittedCheckpoint.Tx1 == nil || rl.lastSubmittedCheckpoint.Tx2 == nil { - return fmt.Errorf("tx1 and tx2 in rl.lastSubmittedCheckpoint is nil, tx1 %v, tx2 %v", rl.lastSubmittedCheckpoint.Tx1, rl.lastSubmittedCheckpoint.Tx2) - } - bumpedFee := rl.calculateBumpedFee(rl.lastSubmittedCheckpoint) // make sure the bumped fee is effective From cf8993503aa6c5894f3e1c2ddd7559f88157a5b5 Mon Sep 17 00:00:00 2001 From: seek Date: Tue, 10 Dec 2024 18:44:58 +0800 Subject: [PATCH 4/5] Update CHANGELOG.md for pr 138 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a34d22..1fe193f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Unreleased +### Bug Fixes +* [#138](https://github.com/babylonlabs-io/vigilante/pull/138) fix: panic in SendCheckpointToBTC + + ## v0.18.0 ### Improvements From 251be197af35b717a0b0d7786e1d2bb873564bb7 Mon Sep 17 00:00:00 2001 From: seek Date: Tue, 10 Dec 2024 20:03:47 +0800 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fe193f..a892d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Bug Fixes * [#138](https://github.com/babylonlabs-io/vigilante/pull/138) fix: panic in SendCheckpointToBTC - ## v0.18.0 ### Improvements