Skip to content

Commit

Permalink
chore: update bbn to rc4 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 authored Jan 28, 2025
1 parent 59ccd2a commit 6ed467d
Show file tree
Hide file tree
Showing 14 changed files with 255 additions and 1,911 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Improvements

* [#194](https://github.com/babylonlabs-io/vigilante/pull/194) fix: reduce locks
* [#195](https://github.com/babylonlabs-io/vigilante/pull/195) chore: bump bbn to rc4

## v0.19.7

Expand Down
3 changes: 2 additions & 1 deletion btcclient/client_wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func NewWallet(cfg *config.Config, parentLogger *zap.Logger) (*Client, error) {

connCfg := &rpcclient.ConnConfig{
// this will work with node loaded with multiple wallets
Host: cfg.BTC.Endpoint + "/wallet/" + cfg.BTC.WalletName,
Host: cfg.BTC.Endpoint,

HTTPPostMode: true,
User: cfg.BTC.Username,
Pass: cfg.BTC.Password,
Expand Down
4 changes: 2 additions & 2 deletions btcstaking-tracker/atomicslasher/expected_babylon_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ package atomicslasher

import (
"context"
"github.com/babylonlabs-io/babylon/client/babylonclient"

"cosmossdk.io/errors"
bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkquerytypes "github.com/cosmos/cosmos-sdk/types/query"
pv "github.com/cosmos/relayer/v2/relayer/provider"
)

type BabylonClient interface {
FinalityProvider(fpBtcPkHex string) (*bstypes.QueryFinalityProviderResponse, error)
BTCDelegations(status bstypes.BTCDelegationStatus, pagination *sdkquerytypes.PageRequest) (*bstypes.QueryBTCDelegationsResponse, error)
BTCDelegation(stakingTxHashHex string) (*bstypes.QueryBTCDelegationResponse, error)
BTCStakingParamsByVersion(version uint32) (*bstypes.QueryParamsByVersionResponse, error)
ReliablySendMsg(ctx context.Context, msg sdk.Msg, expectedErrors []*errors.Error, unrecoverableErrors []*errors.Error) (*pv.RelayerTxResponse, error)
ReliablySendMsg(ctx context.Context, msg sdk.Msg, expectedErrors []*errors.Error, unrecoverableErrors []*errors.Error) (*babylonclient.RelayerTxResponse, error)
MustGetAddr() string
}
6 changes: 3 additions & 3 deletions btcstaking-tracker/atomicslasher/mock_babylon_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion e2etest/monitor_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestMonitorBootstrap(t *testing.T) {
subAddr, _ := sdk.AccAddressFromBech32(submitterAddrStr)

// create submitter
vigilantSubmitter, _ := submitter.New(
vigilantSubmitter, err := submitter.New(
&tm.Config.Submitter,
logger,
tm.BTCClient,
Expand All @@ -66,6 +66,8 @@ func TestMonitorBootstrap(t *testing.T) {
tm.Config.BTC.WalletName,
)

require.NoError(t, err)

vigilantSubmitter.Start()
defer vigilantSubmitter.Stop()

Expand Down
4 changes: 2 additions & 2 deletions e2etest/test_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"github.com/babylonlabs-io/babylon/client/babylonclient"
"github.com/babylonlabs-io/vigilante/e2etest/container"
"github.com/btcsuite/btcd/txscript"
pv "github.com/cosmos/relayer/v2/relayer/provider"
"go.uber.org/zap"
"os"
"path/filepath"
Expand Down Expand Up @@ -204,7 +204,7 @@ func (tm *TestManager) RetrieveTransactionFromMempool(t *testing.T, hashes []*ch
return txs
}

func (tm *TestManager) InsertBTCHeadersToBabylon(headers []*wire.BlockHeader) (*pv.RelayerTxResponse, error) {
func (tm *TestManager) InsertBTCHeadersToBabylon(headers []*wire.BlockHeader) (*babylonclient.RelayerTxResponse, error) {
var headersBytes []bbn.BTCHeaderBytes

for _, h := range headers {
Expand Down
6 changes: 3 additions & 3 deletions e2etest/test_manager_btcstaking.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"encoding/hex"
"fmt"
"github.com/babylonlabs-io/babylon/client/babylonclient"
"math/rand"
"testing"
"time"
Expand All @@ -31,7 +32,6 @@ import (
sdkquery "github.com/cosmos/cosmos-sdk/types/query"
sdkquerytypes "github.com/cosmos/cosmos-sdk/types/query"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/relayer/v2/relayer/provider"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -852,7 +852,7 @@ func (tm *TestManager) finalizeUntilEpoch(t *testing.T, epoch uint64) {
t.Logf("epoch %d is finalised", epoch)
}

func (tm *TestManager) insertBtcBlockHeaders(headers []bbn.BTCHeaderBytes) (*provider.RelayerTxResponse, error) {
func (tm *TestManager) insertBtcBlockHeaders(headers []bbn.BTCHeaderBytes) (*babylonclient.RelayerTxResponse, error) {
msg := &btclctypes.MsgInsertHeaders{
Signer: tm.MustGetBabylonSigner(),
Headers: headers,
Expand All @@ -866,7 +866,7 @@ func (tm *TestManager) insertBtcBlockHeaders(headers []bbn.BTCHeaderBytes) (*pro
return res, nil
}

func (tm *TestManager) insertSpvProofs(submitter string, proofs []*btcctypes.BTCSpvProof) (*provider.RelayerTxResponse, error) {
func (tm *TestManager) insertSpvProofs(submitter string, proofs []*btcctypes.BTCSpvProof) (*babylonclient.RelayerTxResponse, error) {
msg := &btcctypes.MsgInsertBTCSpvProof{
Submitter: submitter,
Proofs: proofs,
Expand Down
Loading

0 comments on commit 6ed467d

Please sign in to comment.