Skip to content

Commit

Permalink
backport: bump babylon to v0.11.0 (#39) (#42)
Browse files Browse the repository at this point in the history
* chore: bump babylon to v0.11.0 (#39)

* fix: broken import

* chore: bump bbn to v011
  • Loading branch information
RafilxTenfen authored Oct 3, 2024
1 parent cef0e86 commit 1fdd808
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
17 changes: 8 additions & 9 deletions babylonclient/babyloncontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@ func delegationDataToMsg(dg *DelegationData) (*btcstypes.MsgCreateBTCDelegation,

slashUnbondingTxSig := bbntypes.NewBIP340SignatureFromBTCSig(dg.Ud.SlashUnbondingTransactionSig)

txKey := &bcctypes.TransactionKey{
Index: dg.StakingTransactionIdx,
Hash: &inclusionBlockHash,
}

return &btcstypes.MsgCreateBTCDelegation{
// Note: this should be always safe conversion as we received data from our db
StakerAddr: dg.BabylonStakerAddr.String(),
Expand All @@ -387,15 +392,9 @@ func delegationDataToMsg(dg *DelegationData) (*btcstypes.MsgCreateBTCDelegation,
StakingValue: int64(dg.StakingValue),
// TODO: It is super bad that this thing (TransactionInfo) spread over whole babylon codebase, and it
// is used in all modules, rpc, database etc.
StakingTx: &bcctypes.TransactionInfo{
Key: &bcctypes.TransactionKey{
Index: dg.StakingTransactionIdx,
Hash: &inclusionBlockHash,
},
Transaction: serizalizedStakingTransaction,
Proof: dg.StakingTransactionInclusionProof,
},
SlashingTx: slashingTx,
StakingTx: serizalizedStakingTransaction,
StakingTxInclusionProof: btcstypes.NewInclusionProof(txKey, dg.StakingTransactionInclusionProof),
SlashingTx: slashingTx,
// Data related to unbonding
DelegatorSlashingSig: slashingTxSig,
UnbondingTx: serializedUnbondingTransaction,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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/babylonlabs-io/networks/parameters v0.2.2
github.com/btcsuite/btcd v0.24.2
github.com/btcsuite/btcd/btcec/v2 v2.3.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,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/babylonlabs-io/networks/parameters v0.2.2 h1:TCu39fZvjX5f6ZZrjhYe54M6wWxglNewuKu56yE+zrc=
github.com/babylonlabs-io/networks/parameters v0.2.2/go.mod h1:iEJVOzaLsE33vpP7J4u+CRGfkSIfErUAwRmgCFCBpyI=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/babylonlabs-io/btc-staker/tools

go 1.22.3

require github.com/babylonlabs-io/babylon v0.10.0
require github.com/babylonlabs-io/babylon v0.11.0

require (
cloud.google.com/go v0.112.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions tools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,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=
Expand Down

0 comments on commit 1fdd808

Please sign in to comment.