Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set default keyring backend to file #142

Merged
merged 3 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Improvements

- [#142](https://github.com/babylonlabs-io/btc-staker/pull/142) Set config default
keyring backend to "file" type
- [#138](https://github.com/babylonlabs-io/btc-staker/pull/138) Adds prometheus metrics
configuration to enabled it (disabled by default).
* [#114](https://github.com/babylonlabs-io/btc-staker/pull/114) **Multi-staking support**.
Expand Down
2 changes: 2 additions & 0 deletions itest/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"github.com/btcsuite/btcd/rpcclient"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkquerytypes "github.com/cosmos/cosmos-sdk/types/query"
Expand Down Expand Up @@ -367,6 +368,7 @@ func StartManagerStakerApp(
// need to use this one to send otherwise we will have account sequence mismatch
// errors
cfg.BabylonConfig.Key = "test-spending-key"
cfg.BabylonConfig.KeyringBackend = keyring.BackendTest

// Big adjustment to make sure we have enough gas in our transactions
cfg.BabylonConfig.GasAdjustment = 3.0
Expand Down
5 changes: 4 additions & 1 deletion stakercfg/babylon.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import (
"time"

bbncfg "github.com/babylonlabs-io/babylon/client/config"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
)

const DefaultKeyringBackend = keyring.BackendFile

type BBNConfig struct {
Key string `long:"key" description:"name of the BTC staker key name inside the keyring to sign transactions with"`
ChainID string `long:"chain-id" description:"chain id of the chain to connect to"`
Expand All @@ -32,7 +35,7 @@ func DefaultBBNConfig() BBNConfig {
RPCAddr: dc.RPCAddr,
GRPCAddr: dc.GRPCAddr,
AccountPrefix: dc.AccountPrefix,
KeyringBackend: dc.KeyringBackend,
KeyringBackend: DefaultKeyringBackend,
GasAdjustment: dc.GasAdjustment,
GasPrices: dc.GasPrices,
KeyDirectory: DefaultStakerdDir,
Expand Down
Loading