From 40cad011761854b5d459ca6cd92081fe0b839d83 Mon Sep 17 00:00:00 2001 From: Cirrus Gai Date: Thu, 5 Dec 2024 18:28:16 +0800 Subject: [PATCH] chore: Bump Babylon to v0.18.0 (#197) --- CHANGELOG.md | 3 +++ clientcontroller/babylon.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- itest/container/config.go | 11 +++++++---- itest/test_manager.go | 2 +- types/stakingparams.go | 4 ++-- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e19ac141..56bf1350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## Unreleased +## v0.13.0 + ### Improvements * [#175](https://github.com/babylonlabs-io/finality-provider/pull/175) adds: `eotsd version` command @@ -47,6 +49,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * [#190](https://github.com/babylonlabs-io/finality-provider/pull/190) Benchmark pub rand * [#193](https://github.com/babylonlabs-io/finality-provider/pull/193) adds unsafeSignEOTS for e2e tests * [#195](https://github.com/babylonlabs-io/finality-provider/pull/195) Not block unjailing +* [#197](https://github.com/babylonlabs-io/finality-provider/pull/197) Bump Babylon to v0.18.0 ### Bug Fixes diff --git a/clientcontroller/babylon.go b/clientcontroller/babylon.go index 7af65f6a..5c4d9910 100644 --- a/clientcontroller/babylon.go +++ b/clientcontroller/babylon.go @@ -671,7 +671,7 @@ func (bc *BabylonController) QueryStakingParams() (*types.StakingParams, error) SlashingPkScript: stakingParamRes.Params.SlashingPkScript, CovenantQuorum: stakingParamRes.Params.CovenantQuorum, SlashingRate: stakingParamRes.Params.SlashingRate, - MinUnbondingTime: stakingParamRes.Params.MinUnbondingTimeBlocks, + UnbondingTime: stakingParamRes.Params.UnbondingTimeBlocks, }, nil } diff --git a/go.mod b/go.mod index 1008e530..499e1da9 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.4.0 github.com/avast/retry-go/v4 v4.5.1 - github.com/babylonlabs-io/babylon v0.9.3-0.20241128025442-457909d8c43c + github.com/babylonlabs-io/babylon v0.18.0 github.com/btcsuite/btcd v0.24.2 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.6 diff --git a/go.sum b/go.sum index f53442fd..0cbc1b15 100644 --- a/go.sum +++ b/go.sum @@ -1427,8 +1427,8 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.312 h1:llrElfzeqG/YOLFFKjg1xNpZCFJ2xraIi3PqSuP+95k= github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/babylonlabs-io/babylon v0.9.3-0.20241128025442-457909d8c43c h1:BfanV3d5TsQa/8xyj3mOlquW5ooRNMoK1Y8HDqcyAzk= -github.com/babylonlabs-io/babylon v0.9.3-0.20241128025442-457909d8c43c/go.mod h1:sT+KG2U+M0tDMNZZ2L5CwlXX0OpagGEs56BiWXqaZFw= +github.com/babylonlabs-io/babylon v0.18.0 h1:phMY/GiR9N5MpD3XCmvyPpZkc1I3kTM9yX+Cf0h3OnU= +github.com/babylonlabs-io/babylon v0.18.0/go.mod h1:sT+KG2U+M0tDMNZZ2L5CwlXX0OpagGEs56BiWXqaZFw= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= diff --git a/itest/container/config.go b/itest/container/config.go index ef62622b..4c75f673 100644 --- a/itest/container/config.go +++ b/itest/container/config.go @@ -2,6 +2,10 @@ package container import ( "testing" + + "github.com/stretchr/testify/require" + + "github.com/babylonlabs-io/finality-provider/testutil" ) // ImageConfig contains all images and their respective tags @@ -18,11 +22,10 @@ const ( // NewImageConfig returns ImageConfig needed for running e2e test. func NewImageConfig(t *testing.T) ImageConfig { - // TODO: currently use specific commit, should uncomment after having a new release - // babylondVersion, err := testutil.GetBabylonVersion() - // require.NoError(t, err) + babylondVersion, err := testutil.GetBabylonVersion() + require.NoError(t, err) return ImageConfig{ BabylonRepository: dockerBabylondRepository, - BabylonVersion: "457909d8c43c8483655c2d3a3a01cd2190344fd4", + BabylonVersion: babylondVersion, } } diff --git a/itest/test_manager.go b/itest/test_manager.go index 76ad3c25..4d93ae6d 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -667,7 +667,7 @@ func (tm *TestManager) InsertBTCDelegation(t *testing.T, fpPks []*btcec.PublicKe delBtcPrivKey, delBtcPubKey, err := datagen.GenRandomBTCKeyPair(r) require.NoError(t, err) - unbondingTime := uint16(tm.StakingParams.MinUnbondingTime) + unbondingTime := uint16(tm.StakingParams.UnbondingTime) testStakingInfo := datagen.GenBTCStakingSlashingInfo( r, t, diff --git a/types/stakingparams.go b/types/stakingparams.go index d57bf3f6..e7a6352c 100644 --- a/types/stakingparams.go +++ b/types/stakingparams.go @@ -28,6 +28,6 @@ type StakingParams struct { // The staked amount to be slashed, expressed as a decimal (e.g., 0.5 for 50%). SlashingRate sdkmath.LegacyDec - // The minimum time for unbonding transaction timelock in BTC blocks - MinUnbondingTime uint32 + // The exact block time for unbonding transaction timelock in BTC blocks + UnbondingTime uint32 }