diff --git a/btcstaking-tracker/btcslasher/bootstrapping_test.go b/btcstaking-tracker/btcslasher/bootstrapping_test.go index 5582aa70..d0c6b4ba 100644 --- a/btcstaking-tracker/btcslasher/bootstrapping_test.go +++ b/btcstaking-tracker/btcslasher/bootstrapping_test.go @@ -98,8 +98,17 @@ func FuzzSlasher_Bootstrapping(f *testing.F) { // mock an evidence with this finality provider evidence, err := datagen.GenRandomEvidence(r, fpSK, 100) require.NoError(t, err) + er := &ftypes.EvidenceResponse{ + FpBtcPkHex: evidence.FpBtcPk.MarshalHex(), + BlockHeight: evidence.BlockHeight, + PubRand: evidence.PubRand, + CanonicalAppHash: evidence.CanonicalAppHash, + ForkAppHash: evidence.ForkAppHash, + CanonicalFinalitySig: evidence.CanonicalFinalitySig, + ForkFinalitySig: evidence.ForkFinalitySig, + } mockBabylonQuerier.EXPECT().ListEvidences(gomock.Any(), gomock.Any()).Return(&ftypes.QueryListEvidencesResponse{ - Evidences: []*ftypes.Evidence{evidence}, + Evidences: []*ftypes.EvidenceResponse{er}, Pagination: &query.PageResponse{NextKey: nil}, }, nil).Times(1) diff --git a/btcstaking-tracker/btcslasher/slasher_test.go b/btcstaking-tracker/btcslasher/slasher_test.go index d9f3dca8..5e68a5cb 100644 --- a/btcstaking-tracker/btcslasher/slasher_test.go +++ b/btcstaking-tracker/btcslasher/slasher_test.go @@ -261,10 +261,10 @@ func FuzzSlasher(f *testing.F) { err = unbondingSlashingInfo.UnbondingTx.Serialize(&unbondingTxBuffer) require.NoError(t, err) unbondingBTCDel.BtcUndelegation = &bstypes.BTCUndelegation{ - UnbondingTx: unbondingTxBuffer.Bytes(), - SlashingTx: unbondingSlashingInfo.SlashingTx, - DelegatorSlashingSig: delSlashingSig, - DelegatorUnbondingSig: delSlashingSig, + UnbondingTx: unbondingTxBuffer.Bytes(), + SlashingTx: unbondingSlashingInfo.SlashingTx, + DelegatorSlashingSig: delSlashingSig, + DelegatorUnbondingInfo: &bstypes.DelegatorUnbondingInfo{SpendStakeTx: unbondingTxBuffer.Bytes()}, // TODO: currently requires only one sig, in reality requires all of them CovenantSlashingSigs: covenantSlashingSigs, CovenantUnbondingSigList: covenantUnbondingSigs, diff --git a/btcstaking-tracker/btcslasher/slasher_utils.go b/btcstaking-tracker/btcslasher/slasher_utils.go index 294ca4db..db6a98b5 100644 --- a/btcstaking-tracker/btcslasher/slasher_utils.go +++ b/btcstaking-tracker/btcslasher/slasher_utils.go @@ -423,8 +423,7 @@ func (bs *BTCSlasher) getAllActiveAndUnbondedBTCDelegations( activeDels = append(activeDels, dels.Dels[i]) } if strings.EqualFold(del.StatusDesc, bstypes.BTCDelegationStatus_UNBONDED.String()) && - len(del.UndelegationResponse.CovenantSlashingSigs) >= int(bsParams.CovenantQuorum) && - len(del.UndelegationResponse.DelegatorUnbondingInfoResponse.SpendStakeTxHex) > 0 { + len(del.UndelegationResponse.CovenantSlashingSigs) >= int(bsParams.CovenantQuorum) { // NOTE: Babylon considers a BTC delegation to be unbonded once it // receives staker signature for unbonding transaction, no matter // whether the unbonding tx's timelock has expired. In monitor's view we need to try to slash every diff --git a/e2etest/container/config.go b/e2etest/container/config.go index 03b1f3ad..bd405530 100644 --- a/e2etest/container/config.go +++ b/e2etest/container/config.go @@ -24,14 +24,13 @@ const ( // NewImageConfig returns ImageConfig needed for running e2e test. func NewImageConfig(t *testing.T) ImageConfig { - babylondVersion, err := testutil.GetBabylonVersion() + _, err := testutil.GetBabylonVersion() require.NoError(t, err) - babylondVersion = "6a0ccacc41435a249316a77fe6e1e06aeb654d13" // todo(lazar): remove this when we have a tag return ImageConfig{ BitcoindRepository: dockerBitcoindRepository, BitcoindVersion: dockerBitcoindVersionTag, BabylonRepository: dockerBabylondRepository, - BabylonVersion: babylondVersion, + BabylonVersion: "6a0ccacc41435a249316a77fe6e1e06aeb654d13", // todo(lazar): remove this when we have a tag } }