From e7fc52537d88e92b667241dc78629d6315d73290 Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Wed, 2 Oct 2024 13:26:32 -0300 Subject: [PATCH 1/2] chore: bump to bbn v0.11 --- clientcontroller/babylon.go | 3 ++- go.mod | 2 +- go.sum | 4 ++-- itest/test_manager.go | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/clientcontroller/babylon.go b/clientcontroller/babylon.go index efcc4e0f..44e48bbb 100644 --- a/clientcontroller/babylon.go +++ b/clientcontroller/babylon.go @@ -451,7 +451,8 @@ func (bc *BabylonController) CreateBTCDelegation( FpBtcPkList: fpBtcPks, StakingTime: stakingTime, StakingValue: stakingValue, - StakingTx: stakingTxInfo, + StakingTx: stakingTxInfo.Transaction, + StakingTxInclusionProof: btcstakingtypes.NewInclusionProof(stakingTxInfo.Key, stakingTxInfo.Proof), SlashingTx: slashingTx, DelegatorSlashingSig: delSlashingSig, UnbondingTx: unbondingTx, diff --git a/go.mod b/go.mod index 46ec6c76..a8a45bf2 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 github.com/avast/retry-go/v4 v4.5.1 - github.com/babylonlabs-io/babylon v0.10.0 + github.com/babylonlabs-io/babylon v0.11.0 github.com/btcsuite/btcd v0.24.2 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.5 diff --git a/go.sum b/go.sum index 627774b2..f7ab3904 100644 --- a/go.sum +++ b/go.sum @@ -283,8 +283,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.10.0 h1:y6Mu4P8IolylybASRn33am/B7OZEwNXGhWHTC1oSnu8= -github.com/babylonlabs-io/babylon v0.10.0/go.mod h1:ZOrTde9vs2xoqGTFw4xhupu2CMulnpywiuk0eh4kPOw= +github.com/babylonlabs-io/babylon v0.11.0 h1:gRJEkjgy3M9bGSY7VjusA84qn6ca8hXa78ss5Z8D3Cc= +github.com/babylonlabs-io/babylon v0.11.0/go.mod h1:ZOrTde9vs2xoqGTFw4xhupu2CMulnpywiuk0eh4kPOw= 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/test_manager.go b/itest/test_manager.go index 549a01d4..1ac0e46e 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -458,7 +458,7 @@ func (tm *TestManager) InsertCovenantSigForDelegation(t *testing.T, btcDel *bsty []*btcec.PublicKey{btcDel.FpBtcPkList[0].MustToBTCPK()}, params.CovenantPks, params.CovenantQuorum, - btcDel.GetStakingTime(), + uint16(btcDel.GetStakingTime()), btcutil.Amount(btcDel.TotalSat), simnetParams, ) From 183b2a9dfa6669b0173010cebb9dfb19f20ea278 Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Wed, 2 Oct 2024 13:38:03 -0300 Subject: [PATCH 2/2] chore: fix staking time --- itest/test_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itest/test_manager.go b/itest/test_manager.go index 1ac0e46e..a18397ba 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -458,7 +458,7 @@ func (tm *TestManager) InsertCovenantSigForDelegation(t *testing.T, btcDel *bsty []*btcec.PublicKey{btcDel.FpBtcPkList[0].MustToBTCPK()}, params.CovenantPks, params.CovenantQuorum, - uint16(btcDel.GetStakingTime()), + uint16(btcDel.EndHeight-btcDel.StartHeight), btcutil.Amount(btcDel.TotalSat), simnetParams, )