diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bad6d229..553e9b75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,11 @@ on: jobs: lint_test: - uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.7.0 secrets: inherit with: + go-version: '1.23' + go-lint-version: 'v1.60.2' run-unit-tests: true run-lint: true @@ -20,7 +22,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Run e2e Babylon tests run: make test-e2e-babylon @@ -31,7 +33,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Run e2e Wasmd tests run: make test-e2e-wasmd @@ -42,7 +44,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Run e2e BCD tests run: make test-e2e-bcd @@ -53,14 +55,14 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Set up the devnet data run: make op-e2e-devnet - name: Run e2e OP tests run: make test-e2e-op - + docker_pipeline: - uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0 secrets: inherit with: publish: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8a0fd720..5369b23c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,8 +10,10 @@ on: jobs: lint_test: - uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.7.0 with: + go-version: '1.23' + go-lint-version: 'v1.60.2' run-unit-tests: true run-lint: true @@ -22,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Run e2e Babylon tests run: make test-e2e-babylon @@ -33,7 +35,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Run e2e Wasmd tests run: make test-e2e-wasmd @@ -44,7 +46,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Run e2e BCD tests run: make test-e2e-bcd @@ -55,7 +57,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.22' + go-version: '1.23' - name: Set up the devnet data run: make op-e2e-devnet - name: Run e2e OP tests @@ -63,7 +65,7 @@ jobs: docker_pipeline: needs: ["lint_test"] - uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0 secrets: inherit with: publish: true diff --git a/finality-provider/service/fp_instance.go b/finality-provider/service/fp_instance.go index 8d07f3d0..708de64c 100644 --- a/finality-provider/service/fp_instance.go +++ b/finality-provider/service/fp_instance.go @@ -430,35 +430,34 @@ func (fp *FinalityProviderInstance) retrySubmitSigsUntilFinalized(targetBlocks [ return nil, nil } - failedCycles += 1 - if failedCycles > uint32(fp.cfg.MaxSubmissionRetries) { + failedCycles++ + if failedCycles > fp.cfg.MaxSubmissionRetries { return nil, fmt.Errorf("reached max failed cycles with err: %w", err) } } else { // the signature has been successfully submitted return res, nil } - select { - case <-time.After(fp.cfg.SubmissionRetryInterval): - // periodically query the index block to be later checked whether it is Finalized - finalized, err := fp.consumerCon.QueryIsBlockFinalized(targetHeight) - if err != nil { - return nil, fmt.Errorf("failed to query block finalization at height %v: %w", targetHeight, err) - } - if finalized { - fp.logger.Debug( - "the block is already finalized, skip submission", - zap.String("pk", fp.GetBtcPkHex()), - zap.Uint64("target_height", targetHeight), - ) - // TODO: returning nil here is to safely break the loop - // the error still exists - return nil, nil - } - case <-fp.quit: - fp.logger.Debug("the finality-provider instance is closing", zap.String("pk", fp.GetBtcPkHex())) - return nil, ErrFinalityProviderShutDown + + // periodically query the index block to be later checked whether it is Finalized + finalized, err := fp.consumerCon.QueryIsBlockFinalized(targetHeight) + if err != nil { + return nil, fmt.Errorf("failed to query block finalization at height %v: %w", targetHeight, err) + } + if finalized { + fp.logger.Debug( + "the block is already finalized, skip submission", + zap.String("pk", fp.GetBtcPkHex()), + zap.Uint64("target_height", targetHeight), + ) + // TODO: returning nil here is to safely break the loop + // the error still exists + return nil, nil } + + case <-fp.quit: + fp.logger.Debug("the finality-provider instance is closing", zap.String("pk", fp.GetBtcPkHex())) + return nil, ErrFinalityProviderShutDown } } }