diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ab7630..5c02092 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,7 @@ jobs: name: Run integration tests command: | make test-e2e + no_output_timeout: 20m build_docker: machine: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4d2c16e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,127 @@ +# Changelog + +## [Unreleased](https://github.com/babylonchain/btc-staker/tree/HEAD) + +[Full Changelog](https://github.com/babylonchain/btc-staker/compare/v0.1.0...HEAD) + +**Closed issues:** + +- Stakerd init fails if directory doesn't exist [\#108](https://github.com/babylonchain/btc-staker/issues/108) + +**Merged pull requests:** + +- Bitcoind tests [\#110](https://github.com/babylonchain/btc-staker/pull/110) ([KonradStaniec](https://github.com/KonradStaniec)) +- docs: Incorporate validator feedback [\#109](https://github.com/babylonchain/btc-staker/pull/109) ([gusin13](https://github.com/gusin13)) +- Bump staker to stable babylon version [\#106](https://github.com/babylonchain/btc-staker/pull/106) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bumps babylon to latest version [\#105](https://github.com/babylonchain/btc-staker/pull/105) ([KonradStaniec](https://github.com/KonradStaniec)) +- bump babylon version [\#104](https://github.com/babylonchain/btc-staker/pull/104) ([KonradStaniec](https://github.com/KonradStaniec)) +- docs: Add instructions to setup bitcoind signet node [\#103](https://github.com/babylonchain/btc-staker/pull/103) ([gusin13](https://github.com/gusin13)) +- CI: Remove redundant SSH key logic [\#102](https://github.com/babylonchain/btc-staker/pull/102) ([filippos47](https://github.com/filippos47)) +- docs: Remove btcd refs [\#101](https://github.com/babylonchain/btc-staker/pull/101) ([gusin13](https://github.com/gusin13)) +- docs: Mention legacy wallet requirement [\#96](https://github.com/babylonchain/btc-staker/pull/96) ([filippos47](https://github.com/filippos47)) +- docs: Include ZMQ endpoint config [\#94](https://github.com/babylonchain/btc-staker/pull/94) ([filippos47](https://github.com/filippos47)) + +## [v0.1.0](https://github.com/babylonchain/btc-staker/tree/v0.1.0) (2024-02-08) + +[Full Changelog](https://github.com/babylonchain/btc-staker/compare/v0.1.0-rc.0...v0.1.0) + +**Closed issues:** + +- Improper handling of pending delegations upon restart [\#58](https://github.com/babylonchain/btc-staker/issues/58) + +## [v0.1.0-rc.0](https://github.com/babylonchain/btc-staker/tree/v0.1.0-rc.0) (2024-01-22) + +[Full Changelog](https://github.com/babylonchain/btc-staker/compare/263d857429d555e0772d104dbeee70ab4e4d8c89...v0.1.0-rc.0) + +**Breaking changes:** + +- Adjust data model to store confirmed block info [\#53](https://github.com/babylonchain/btc-staker/pull/53) ([KonradStaniec](https://github.com/KonradStaniec)) +- Adapt spend stake endpoint to unbonding tx [\#48](https://github.com/babylonchain/btc-staker/pull/48) ([KonradStaniec](https://github.com/KonradStaniec)) +- Introduce watched transactions to enable staker to act as queuing service. [\#45](https://github.com/babylonchain/btc-staker/pull/45) ([KonradStaniec](https://github.com/KonradStaniec)) +- use prod hint cache [\#40](https://github.com/babylonchain/btc-staker/pull/40) ([KonradStaniec](https://github.com/KonradStaniec)) +- List all tracked transaction query [\#33](https://github.com/babylonchain/btc-staker/pull/33) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve data model [\#32](https://github.com/babylonchain/btc-staker/pull/32) ([KonradStaniec](https://github.com/KonradStaniec)) + +**Closed issues:** + +- Unable to dump configuration if parent directory doesn't exist [\#88](https://github.com/babylonchain/btc-staker/issues/88) +- Cannot withdraw expired delegation [\#81](https://github.com/babylonchain/btc-staker/issues/81) +- Unbonding request tx can't be sent to BTC [\#76](https://github.com/babylonchain/btc-staker/issues/76) +- Support for multiple validators when re-staking [\#68](https://github.com/babylonchain/btc-staker/issues/68) +- Add additional field `unbodningTime` to `BTCUndelegationInfo` in query `BTCDelegation` and use it in staker app [\#67](https://github.com/babylonchain/btc-staker/issues/67) +- Proper handling of restarts [\#27](https://github.com/babylonchain/btc-staker/issues/27) +- `StakeFunds` should check whether the btc validator exists [\#20](https://github.com/babylonchain/btc-staker/issues/20) + +**Merged pull requests:** + +- chore: Upgrade bbn to 0.8.0-rc.0 [\#93](https://github.com/babylonchain/btc-staker/pull/93) ([vitsalis](https://github.com/vitsalis)) +- license and public deps [\#92](https://github.com/babylonchain/btc-staker/pull/92) ([KonradStaniec](https://github.com/KonradStaniec)) +- fix: Add BLS flags in make [\#91](https://github.com/babylonchain/btc-staker/pull/91) ([gusin13](https://github.com/gusin13)) +- chore: restructure and improve docs [\#90](https://github.com/babylonchain/btc-staker/pull/90) ([gusin13](https://github.com/gusin13)) +- create dir if not exists [\#89](https://github.com/babylonchain/btc-staker/pull/89) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix signet support [\#87](https://github.com/babylonchain/btc-staker/pull/87) ([KonradStaniec](https://github.com/KonradStaniec)) +- Handle lock time change output [\#86](https://github.com/babylonchain/btc-staker/pull/86) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix dynamic fee estimation [\#85](https://github.com/babylonchain/btc-staker/pull/85) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon [\#84](https://github.com/babylonchain/btc-staker/pull/84) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix withdrawing [\#83](https://github.com/babylonchain/btc-staker/pull/83) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon. Use min unbonding time [\#82](https://github.com/babylonchain/btc-staker/pull/82) ([KonradStaniec](https://github.com/KonradStaniec)) +- Rename validator to finality provider [\#79](https://github.com/babylonchain/btc-staker/pull/79) ([KonradStaniec](https://github.com/KonradStaniec)) +- Pre signed unbonding [\#78](https://github.com/babylonchain/btc-staker/pull/78) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix unbonding witness building [\#77](https://github.com/babylonchain/btc-staker/pull/77) ([KonradStaniec](https://github.com/KonradStaniec)) +- docs: Setup docs [\#75](https://github.com/babylonchain/btc-staker/pull/75) ([gusin13](https://github.com/gusin13)) +- fix: Use the slashing change address flag [\#72](https://github.com/babylonchain/btc-staker/pull/72) ([vitsalis](https://github.com/vitsalis)) +- Handle multiple validators [\#71](https://github.com/babylonchain/btc-staker/pull/71) ([KonradStaniec](https://github.com/KonradStaniec)) +- Use unbonding time from bayblon [\#70](https://github.com/babylonchain/btc-staker/pull/70) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon and use new staking tx and unbonding tx [\#66](https://github.com/babylonchain/btc-staker/pull/66) ([KonradStaniec](https://github.com/KonradStaniec)) +- feat: Utilize new slashing tx format [\#64](https://github.com/babylonchain/btc-staker/pull/64) ([gusin13](https://github.com/gusin13)) +- Add support for ecdsa sig type [\#63](https://github.com/babylonchain/btc-staker/pull/63) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add criticial error channel and simplify unbodning send [\#62](https://github.com/babylonchain/btc-staker/pull/62) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon version [\#61](https://github.com/babylonchain/btc-staker/pull/61) ([KonradStaniec](https://github.com/KonradStaniec)) +- Extract modules [\#60](https://github.com/babylonchain/btc-staker/pull/60) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix restart bug [\#59](https://github.com/babylonchain/btc-staker/pull/59) ([KonradStaniec](https://github.com/KonradStaniec)) +- Code cleanup [\#56](https://github.com/babylonchain/btc-staker/pull/56) ([KonradStaniec](https://github.com/KonradStaniec)) +- Get withdrawable transactions endpoint [\#55](https://github.com/babylonchain/btc-staker/pull/55) ([KonradStaniec](https://github.com/KonradStaniec)) +- Extend restart to unbonding tx [\#52](https://github.com/babylonchain/btc-staker/pull/52) ([KonradStaniec](https://github.com/KonradStaniec)) +- fix restart [\#51](https://github.com/babylonchain/btc-staker/pull/51) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add handling of new pop type [\#47](https://github.com/babylonchain/btc-staker/pull/47) ([KonradStaniec](https://github.com/KonradStaniec)) +- Unbonding flow [\#46](https://github.com/babylonchain/btc-staker/pull/46) ([KonradStaniec](https://github.com/KonradStaniec)) +- chore: Update bbn version [\#44](https://github.com/babylonchain/btc-staker/pull/44) ([vitsalis](https://github.com/vitsalis)) +- Force larger staking time [\#43](https://github.com/babylonchain/btc-staker/pull/43) ([KonradStaniec](https://github.com/KonradStaniec)) +- chore: Update dn unstake operation help msg [\#42](https://github.com/babylonchain/btc-staker/pull/42) ([filippos47](https://github.com/filippos47)) +- Imporve checking for best block [\#41](https://github.com/babylonchain/btc-staker/pull/41) ([KonradStaniec](https://github.com/KonradStaniec)) +- Recovery after restart [\#39](https://github.com/babylonchain/btc-staker/pull/39) ([KonradStaniec](https://github.com/KonradStaniec)) +- Fix bug in list\_transactions [\#36](https://github.com/babylonchain/btc-staker/pull/36) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add some missing daemon commands [\#35](https://github.com/babylonchain/btc-staker/pull/35) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve e2e test [\#34](https://github.com/babylonchain/btc-staker/pull/34) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add check that validator exists before allowing for staking [\#31](https://github.com/babylonchain/btc-staker/pull/31) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve slashing fee handling [\#30](https://github.com/babylonchain/btc-staker/pull/30) ([KonradStaniec](https://github.com/KonradStaniec)) +- Only show active validators [\#29](https://github.com/babylonchain/btc-staker/pull/29) ([vitsalis](https://github.com/vitsalis)) +- Stall when babylon node is not ready [\#26](https://github.com/babylonchain/btc-staker/pull/26) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add babylon to e2e test [\#25](https://github.com/babylonchain/btc-staker/pull/25) ([KonradStaniec](https://github.com/KonradStaniec)) +- nit: Update Block Cache Size default and fix usage [\#24](https://github.com/babylonchain/btc-staker/pull/24) ([vitsalis](https://github.com/vitsalis)) +- Fix delegation bug [\#23](https://github.com/babylonchain/btc-staker/pull/23) ([KonradStaniec](https://github.com/KonradStaniec)) +- nit: Add default values for ZMQ messages [\#22](https://github.com/babylonchain/btc-staker/pull/22) ([vitsalis](https://github.com/vitsalis)) +- nit: default to btcwallet for wallet backend type [\#21](https://github.com/babylonchain/btc-staker/pull/21) ([vitsalis](https://github.com/vitsalis)) +- fix: Replace deprecated SignRawTransaction [\#19](https://github.com/babylonchain/btc-staker/pull/19) ([vitsalis](https://github.com/vitsalis)) +- cli for staking BTC to Babylon [\#18](https://github.com/babylonchain/btc-staker/pull/18) ([SebastianElvis](https://github.com/SebastianElvis)) +- fix: offset and limit params out of order [\#17](https://github.com/babylonchain/btc-staker/pull/17) ([vitsalis](https://github.com/vitsalis)) +- Fix signers field in message [\#16](https://github.com/babylonchain/btc-staker/pull/16) ([KonradStaniec](https://github.com/KonradStaniec)) +- makefile: Add build-docker command [\#15](https://github.com/babylonchain/btc-staker/pull/15) ([vitsalis](https://github.com/vitsalis)) +- chore: Minor cleanup and nitpicks [\#14](https://github.com/babylonchain/btc-staker/pull/14) ([vitsalis](https://github.com/vitsalis)) +- Add query for current babylon validators [\#13](https://github.com/babylonchain/btc-staker/pull/13) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add api to spend staking transaction after time lock [\#12](https://github.com/babylonchain/btc-staker/pull/12) ([KonradStaniec](https://github.com/KonradStaniec)) +- Command to check wallets outputs [\#11](https://github.com/babylonchain/btc-staker/pull/11) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add fee estimation [\#10](https://github.com/babylonchain/btc-staker/pull/10) ([KonradStaniec](https://github.com/KonradStaniec)) +- Improve handling of sending delegation to babylon [\#9](https://github.com/babylonchain/btc-staker/pull/9) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add dockerfile and push images to ECR [\#8](https://github.com/babylonchain/btc-staker/pull/8) ([KonradStaniec](https://github.com/KonradStaniec)) +- Bump babylon to latest version [\#7](https://github.com/babylonchain/btc-staker/pull/7) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add admin commands [\#6](https://github.com/babylonchain/btc-staker/pull/6) ([KonradStaniec](https://github.com/KonradStaniec)) +- Babylon communication and persistence [\#5](https://github.com/babylonchain/btc-staker/pull/5) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add initial stake command [\#4](https://github.com/babylonchain/btc-staker/pull/4) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add server and daemon mode [\#3](https://github.com/babylonchain/btc-staker/pull/3) ([KonradStaniec](https://github.com/KonradStaniec)) +- Add core logic for funding, building, signing, sending staking transaciton [\#2](https://github.com/babylonchain/btc-staker/pull/2) ([KonradStaniec](https://github.com/KonradStaniec)) +- Project skeleton with initial cli command [\#1](https://github.com/babylonchain/btc-staker/pull/1) ([KonradStaniec](https://github.com/KonradStaniec)) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/Makefile b/Makefile index 26f9baf..dd044fb 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,9 @@ DOCKER = $(shell which docker) BUILDDIR ?= $(CURDIR)/build TOOLS_DIR := tools -BTCD_PKG := github.com/btcsuite/btcd -BTCDW_PKG := github.com/btcsuite/btcwallet BABYLON_PKG := github.com/babylonchain/babylon/cmd/babylond GO_BIN := ${GOPATH}/bin -BTCD_BIN := $(GO_BIN)/btcd ldflags := $(LDFLAGS) build_tags := $(BUILD_TAGS) @@ -26,6 +23,14 @@ endif BUILD_TARGETS := build install BUILD_FLAGS := --tags "$(build_tags)" --ldflags '$(ldflags)' +# Update changelog vars +ifneq (,$(SINCE_TAG)) + sinceTag := --since-tag $(SINCE_TAG) +endif +ifneq (,$(UPCOMING_TAG)) + upcomingTag := --future-release $(UPCOMING_TAG) +endif + all: build install build: BUILD_ARGS := $(build_args) -o $(BUILDDIR) @@ -46,7 +51,7 @@ test: go test ./... test-e2e: - cd $(TOOLS_DIR); go install -trimpath $(BTCD_PKG); go install -trimpath $(BTCDW_PKG); go install -trimpath $(BABYLON_PKG); + cd $(TOOLS_DIR); go install -trimpath $(BABYLON_PKG); go test -mod=readonly -timeout=25m -v $(PACKAGES_E2E) -count=1 --tags=e2e proto-gen: @@ -54,3 +59,9 @@ proto-gen: cd ./proto; ./gen_protos_docker.sh .PHONY: proto-gen + +update-changelog: + @echo ./scripts/update_changelog.sh $(sinceTag) $(upcomingTag) + ./scripts/update_changelog.sh $(sinceTag) $(upcomingTag) + +.PHONY: update-changelog diff --git a/README.md b/README.md index 6086040..31e5eb8 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ Please update the following configurations in the provided file: and this [link](https://github.com/bitcoin/bitcoin/pull/28597). 4. If you want to enable remote connections to the node, you can add `rpcallowip=0.0.0.0/0` and `rpcbind=0.0.0.0` to the bitcoind command. +5. Start the `bitcoind` with `-txindex` option to make sure btc-staker can get + all needed bitcoin transaction data. ```bash # Create the service file @@ -72,6 +74,7 @@ ExecStart=/home/ubuntu/bitcoin-26.0/bin/bitcoind \ -deprecatedrpc=create_bdb \ -signet \ -server \ + -txindex \ -rpcport=38332 \ -rpcuser= \ -rpcpassword= @@ -306,12 +309,6 @@ export PATH=$HOME/go/bin:$PATH echo 'export PATH=$HOME/go/bin:$PATH' >> ~/.profile ``` -To build without installing, - -```bash -make build -``` - ### Create a Babylon keyring (keyring backend: test) with funds The `stakerd` daemon requires a keyring with loaded Babylon tokens to pay for the @@ -319,15 +316,6 @@ transactions. Follow this [guide](https://docs.babylonchain.io/docs/user-guides/btc-staking-testnet/getting-funds) to create a keyring and request funds. -The above command will put the built binaries in a build directory with the following -structure: - -```bash - ls build - ├── stakerd - └── stakercli -``` - ## 4. BTC Staker Setup ### Staker daemon (`stakerd`) configuration @@ -391,7 +379,7 @@ In the following, we go through important parameters of the `stakerd.conf` file. Key = btc-staker # Chain id of the chain (Babylon) -ChainID = chain-test +ChainID = bbn-test-3 # Address of the chain's RPC server (Babylon) RPCAddr = http://localhost:26657 @@ -399,17 +387,8 @@ RPCAddr = http://localhost:26657 # Address of the chain's GRPC server (Babylon) GRPCAddr = https://localhost:9090 -# Type of keyring backend to use -KeyringBackend = test - -# Adjustment factor when using gas estimation -GasAdjustment = 1.2 - -# Comma separated minimum gas prices to accept for transactions -GasPrices = 0.01ubbn - # Directory to store staker keys in -KeyDirectory = /Users//Library/Application Support/Stakerd +KeyDirectory = /path/to/stakerd-home/ ``` #### BTC Node configuration @@ -507,7 +486,7 @@ You can start the staker daemon using the following command: stakerd ``` -This will start the RPC server at the address specified in the configuration under +This will start the Staker daemon RPC server at the address specified in the configuration under the `RawRPCListeners` field. A custom address can also be specified using the `--rpclisten` flag. @@ -587,7 +566,7 @@ stakercli daemon stake \ --staker-address bcrt1q56ehztys752uzg7fzpear08l5mw8w2kxgz7644 \ --staking-amount 1000000 \ --finality-providers-pks 3328782c63404386d9cd905dba5a35975cba629e48192cea4a348937e865d312 \ - --staking-time 100 + --staking-time 10000 # ~70 days # Transaction details { @@ -648,3 +627,6 @@ db. ```bash stakercli daemon withdrawable-transactions ``` + +In order to `unstake` you'll need to wait for your staking/unbonding tx to be deep +enough in btc so that the timelock expires. diff --git a/babylonclient/babyloncontroller.go b/babylonclient/babyloncontroller.go index 0fb1ad8..488189d 100644 --- a/babylonclient/babyloncontroller.go +++ b/babylonclient/babyloncontroller.go @@ -9,9 +9,12 @@ import ( "strings" "time" + btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types" + sdkErr "cosmossdk.io/errors" sdkmath "cosmossdk.io/math" "github.com/avast/retry-go/v4" + bbnclient "github.com/babylonchain/babylon/client/client" bbntypes "github.com/babylonchain/babylon/types" bcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types" btclctypes "github.com/babylonchain/babylon/x/btclightclient/types" @@ -19,7 +22,6 @@ import ( "github.com/babylonchain/btc-staker/stakercfg" "github.com/babylonchain/btc-staker/stakerdb" "github.com/babylonchain/btc-staker/utils" - bbnclient "github.com/babylonchain/rpc-client/client" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcutil" @@ -406,7 +408,9 @@ func (bc *BabylonController) reliablySendMsgs( // TODO: for now return sdk.TxResponse, it will ease up debugging/testing // ultimately we should create our own type ate func (bc *BabylonController) Delegate(dg *DelegationData) (*pv.RelayerTxResponse, error) { - delegateMsg, err := delegationDataToMsg(bc.getTxSigner(), dg) + signer := bc.getTxSigner() + + delegateMsg, err := delegationDataToMsg(signer, dg) if err != nil { return nil, err @@ -669,15 +673,21 @@ func chainToChainBytes(chain []*wire.BlockHeader) []bbntypes.BTCHeaderBytes { // RegisterFinalityProvider registers a BTC finality provider via a MsgCreateFinalityProvider to Babylon // it returns tx hash and error func (bc *BabylonController) RegisterFinalityProvider( - bbnPubKey *secp256k1.PubKey, btcPubKey *bbntypes.BIP340PubKey, commission *sdkmath.LegacyDec, - description *sttypes.Description, pop *btcstypes.ProofOfPossession) (*pv.RelayerTxResponse, error) { + bbnPubKey *secp256k1.PubKey, + btcPubKey *bbntypes.BIP340PubKey, + commission *sdkmath.LegacyDec, + description *sttypes.Description, + pop *btcstypes.ProofOfPossession, + masterRandomness string, +) (*pv.RelayerTxResponse, error) { registerMsg := &btcstypes.MsgCreateFinalityProvider{ - Signer: bc.getTxSigner(), - Commission: commission, - BabylonPk: bbnPubKey, - BtcPk: btcPubKey, - Description: description, - Pop: pop, + Signer: bc.getTxSigner(), + Commission: commission, + BabylonPk: bbnPubKey, + BtcPk: btcPubKey, + Description: description, + Pop: pop, + MasterPubRand: masterRandomness, } return bc.reliablySendMsgs([]sdk.Msg{registerMsg}) @@ -706,10 +716,10 @@ func (bc *BabylonController) QueryDelegationInfo(stakingTxHash *chainhash.Hash) var udi *UndelegationInfo = nil - if resp.UndelegationInfo != nil { + if resp.BtcDelegation.UndelegationResponse != nil { var coventSigInfos []CovenantSignatureInfo - for _, covenantSigInfo := range resp.UndelegationInfo.CovenantUnbondingSigList { + for _, covenantSigInfo := range resp.BtcDelegation.UndelegationResponse.CovenantUnbondingSigList { covSig := covenantSigInfo sig, err := covSig.Sig.ToBTCSig() @@ -733,25 +743,25 @@ func (bc *BabylonController) QueryDelegationInfo(stakingTxHash *chainhash.Hash) coventSigInfos = append(coventSigInfos, sigInfo) } - tx, err := bbntypes.NewBTCTxFromBytes(resp.UndelegationInfo.UnbondingTx) + tx, _, err := bbntypes.NewBTCTxFromHex(resp.BtcDelegation.UndelegationResponse.UnbondingTxHex) if err != nil { return retry.Unrecoverable(fmt.Errorf("malformed unbonding transaction: %s: %w", err.Error(), ErrInvalidValueReceivedFromBabylonNode)) } - if resp.UnbondingTime > math.MaxUint16 { - return retry.Unrecoverable(fmt.Errorf("malformed unbonding time: %d: %w", resp.UnbondingTime, ErrInvalidValueReceivedFromBabylonNode)) + if resp.BtcDelegation.UnbondingTime > math.MaxUint16 { + return retry.Unrecoverable(fmt.Errorf("malformed unbonding time: %d: %w", resp.BtcDelegation.UnbondingTime, ErrInvalidValueReceivedFromBabylonNode)) } udi = &UndelegationInfo{ UnbondingTransaction: tx, CovenantUnbondingSignatures: coventSigInfos, - UnbondingTime: uint16(resp.UnbondingTime), + UnbondingTime: uint16(resp.BtcDelegation.UnbondingTime), } } di = &DelegationInfo{ - Active: resp.Active, + Active: resp.BtcDelegation.Active, UndelegationInfo: udi, } return nil @@ -803,7 +813,7 @@ func (bc *BabylonController) SubmitCovenantSig( return bc.reliablySendMsgs([]sdk.Msg{msg}) } -func (bc *BabylonController) QueryPendingBTCDelegations() ([]*btcstypes.BTCDelegation, error) { +func (bc *BabylonController) QueryPendingBTCDelegations() ([]*btcstypes.BTCDelegationResponse, error) { ctx, cancel := getQueryContext(bc.cfg.Timeout) defer cancel() @@ -822,3 +832,41 @@ func (bc *BabylonController) QueryPendingBTCDelegations() ([]*btcstypes.BTCDeleg return res.BtcDelegations, nil } + +func (bc *BabylonController) GetBBNClient() *bbnclient.Client { + return bc.bbnClient +} + +func (bc *BabylonController) InsertSpvProofs(submitter string, proofs []*btcctypes.BTCSpvProof) (*pv.RelayerTxResponse, error) { + msg := &btcctypes.MsgInsertBTCSpvProof{ + Submitter: submitter, + Proofs: proofs, + } + + res, err := bc.reliablySendMsgs([]sdk.Msg{msg}) + if err != nil { + return nil, err + } + + return res, nil +} + +func (bc *BabylonController) QueryBtcLightClientTip() (*btclctypes.BTCHeaderInfoResponse, error) { + res, err := bc.bbnClient.QueryClient.BTCHeaderChainTip() + if err != nil { + return nil, fmt.Errorf("failed to query BTC tip: %v", err) + } + + return res.Header, nil +} + +func (bc *BabylonController) QueryFinalityProviderRegisteredEpoch(fpPk *btcec.PublicKey) (uint64, error) { + res, err := bc.bbnClient.QueryClient.FinalityProvider( + bbntypes.NewBIP340PubKeyFromBTCPK(fpPk).MarshalHex(), + ) + if err != nil { + return 0, fmt.Errorf("failed to query finality provider registered epoch: %w", err) + } + + return res.FinalityProvider.RegisteredEpoch, nil +} diff --git a/babylonclient/msgsender.go b/babylonclient/msgsender.go index d4dd297..8dcec57 100644 --- a/babylonclient/msgsender.go +++ b/babylonclient/msgsender.go @@ -1,11 +1,13 @@ package babylonclient import ( + "context" "errors" "fmt" "sync" pv "github.com/cosmos/relayer/v2/relayer/provider" + "golang.org/x/sync/semaphore" "github.com/babylonchain/btc-staker/utils" "github.com/btcsuite/btcd/chaincfg/chainhash" @@ -63,18 +65,22 @@ type BabylonMsgSender struct { logger *logrus.Logger sendDelegationRequestChan chan *sendDelegationRequest sendUndelegationRequestChan chan *sendUndelegationRequest + s *semaphore.Weighted } func NewBabylonMsgSender( cl BabylonClient, logger *logrus.Logger, + maxConcurrentTransactions uint32, ) *BabylonMsgSender { + s := semaphore.NewWeighted(int64(maxConcurrentTransactions)) return &BabylonMsgSender{ quit: make(chan struct{}), cl: cl, logger: logger, sendDelegationRequestChan: make(chan *sendDelegationRequest), sendUndelegationRequestChan: make(chan *sendUndelegationRequest), + s: s, } } @@ -117,6 +123,73 @@ func (b *BabylonMsgSender) isBabylonBtcLcReady( return nil } +func (m *BabylonMsgSender) sendDelegationAsync(stakingTxHash *chainhash.Hash, req *sendDelegationRequest) { + // do not check the error, as only way for it to return err is if provided context would be cancelled + // which can't happen here + _ = m.s.Acquire(context.Background(), 1) + m.wg.Add(1) + go func() { + defer m.s.Release(1) + defer m.wg.Done() + // TODO pass context to delegate + txResp, err := m.cl.Delegate(req.dg) + + if err != nil { + if errors.Is(err, ErrInvalidBabylonExecution) { + m.logger.WithFields(logrus.Fields{ + "btcTxHash": stakingTxHash, + "babylonTxHash": txResp.TxHash, + "babylonBlockHeight": txResp.Height, + "babylonErrorCode": txResp.Code, + }).Error("Invalid delegation data sent to babylon") + } + + m.logger.WithFields(logrus.Fields{ + "btcTxHash": stakingTxHash, + "err": err, + }).Error("Error while sending delegation data to babylon") + + req.ErrorChan() <- fmt.Errorf("failed to send delegation for tx with hash: %s: %w", stakingTxHash.String(), err) + } + req.ResultChan() <- txResp + }() +} + +func (m *BabylonMsgSender) sendUndelegationAsync(stakingTxHash *chainhash.Hash, req *sendUndelegationRequest) { + // do not check the error, as only way for it to return err is if provided context would be cancelled + // which can't happen here + _ = m.s.Acquire(context.Background(), 1) + m.wg.Add(1) + go func() { + defer m.s.Release(1) + defer m.wg.Done() + // TODO pass context to undelegate + txResp, err := m.cl.Undelegate(req.ur) + + if err != nil { + if errors.Is(err, ErrInvalidBabylonExecution) { + // Additional logging if for some reason we send unbonding request which was + // accepted by babylon, but failed execution + m.logger.WithFields(logrus.Fields{ + "btcTxHash": req.stakingTxHash.String(), + "babylonTxHash": txResp.TxHash, + "babylonBlockHeight": txResp.Height, + "babylonErrorCode": txResp.Code, + }).Error("Invalid delegation data sent to babylon") + } + + m.logger.WithFields(logrus.Fields{ + "btcTxHash": req.stakingTxHash, + "err": err, + }).Error("Error while sending undelegation data to babylon") + + req.ErrorChan() <- fmt.Errorf("failed to send unbonding for delegation with staking hash:%s:%w", req.stakingTxHash.String(), err) + } + + req.ResultChan() <- txResp + }() +} + func (m *BabylonMsgSender) handleSentToBabylon() { defer m.wg.Done() for { @@ -139,27 +212,7 @@ func (m *BabylonMsgSender) handleSentToBabylon() { continue } - txResp, err := m.cl.Delegate(req.dg) - - if err != nil { - if errors.Is(err, ErrInvalidBabylonExecution) { - m.logger.WithFields(logrus.Fields{ - "btcTxHash": stakingTxHash, - "babylonTxHash": txResp.TxHash, - "babylonBlockHeight": txResp.Height, - "babylonErrorCode": txResp.Code, - }).Error("Invalid delegation data sent to babylon") - } - - m.logger.WithFields(logrus.Fields{ - "btcTxHash": stakingTxHash, - "err": err, - }).Error("Error while sending delegation data to babylon") - - req.ErrorChan() <- fmt.Errorf("failed to send delegation for tx with hash: %s: %w", stakingTxHash.String(), err) - } - - req.ResultChan() <- txResp + m.sendDelegationAsync(&stakingTxHash, req) case req := <-m.sendUndelegationRequestChan: di, err := m.cl.QueryDelegationInfo(req.stakingTxHash) @@ -179,30 +232,7 @@ func (m *BabylonMsgSender) handleSentToBabylon() { continue } - txResp, err := m.cl.Undelegate(req.ur) - - if err != nil { - if errors.Is(err, ErrInvalidBabylonExecution) { - // Additional logging if for some reason we send unbonding request which was - // accepted by babylon, but failed execution - m.logger.WithFields(logrus.Fields{ - "btcTxHash": req.stakingTxHash.String(), - "babylonTxHash": txResp.TxHash, - "babylonBlockHeight": txResp.Height, - "babylonErrorCode": txResp.Code, - }).Error("Invalid delegation data sent to babylon") - } - - m.logger.WithFields(logrus.Fields{ - "btcTxHash": req.stakingTxHash, - "err": err, - }).Error("Error while sending undelegation data to babylon") - - req.ErrorChan() <- fmt.Errorf("failed to send unbonding for delegation with staking hash:%s:%w", req.stakingTxHash.String(), err) - continue - } - - req.ResultChan() <- txResp + m.sendUndelegationAsync(req.stakingTxHash, req) case <-m.quit: return diff --git a/cmd/stakercli/admin.go b/cmd/stakercli/admin/admin.go similarity index 98% rename from cmd/stakercli/admin.go rename to cmd/stakercli/admin/admin.go index 368c8f6..2236277 100644 --- a/cmd/stakercli/admin.go +++ b/cmd/stakercli/admin/admin.go @@ -1,4 +1,4 @@ -package main +package admin import ( "fmt" @@ -14,7 +14,7 @@ import ( "github.com/urfave/cli" ) -var adminCommands = []cli.Command{ +var AdminCommands = []cli.Command{ { Name: "admin", ShortName: "ad", diff --git a/cmd/stakercli/daemoncommands.go b/cmd/stakercli/daemon/daemoncommands.go similarity index 94% rename from cmd/stakercli/daemoncommands.go rename to cmd/stakercli/daemon/daemoncommands.go index 8e37de0..b8aa3d2 100644 --- a/cmd/stakercli/daemoncommands.go +++ b/cmd/stakercli/daemon/daemoncommands.go @@ -1,15 +1,16 @@ -package main +package daemon import ( "context" "strconv" + "github.com/babylonchain/btc-staker/cmd/stakercli/helpers" scfg "github.com/babylonchain/btc-staker/stakercfg" dc "github.com/babylonchain/btc-staker/stakerservice/client" "github.com/urfave/cli" ) -var daemonCommands = []cli.Command{ +var DaemonCommands = []cli.Command{ { Name: "daemon", ShortName: "dn", @@ -34,9 +35,9 @@ const ( offsetFlag = "offset" limitFlag = "limit" fpPksFlag = "finality-providers-pks" - stakingTimeBlocksFlag = "staking-time" stakingTransactionHashFlag = "staking-transaction-hash" feeRateFlag = "fee-rate" + stakerAddressFlag = "staker-address" ) var ( @@ -111,7 +112,7 @@ var stakeCmd = cli.Command{ Required: true, }, cli.Int64Flag{ - Name: stakingAmountFlag, + Name: helpers.StakingAmountFlag, Usage: "Staking amount in satoshis", Required: true, }, @@ -121,7 +122,7 @@ var stakeCmd = cli.Command{ Required: true, }, cli.Int64Flag{ - Name: stakingTimeBlocksFlag, + Name: helpers.StakingTimeBlocksFlag, Usage: "Staking time in BTC blocks", Required: true, }, @@ -253,7 +254,7 @@ func checkHealth(ctx *cli.Context) error { return err } - printRespJSON(health) + helpers.PrintRespJSON(health) return nil } @@ -273,7 +274,7 @@ func listOutputs(ctx *cli.Context) error { return err } - printRespJSON(outputs) + helpers.PrintRespJSON(outputs) return nil } @@ -305,7 +306,7 @@ func babylonFinalityProviders(ctx *cli.Context) error { return err } - printRespJSON(finalityProviders) + helpers.PrintRespJSON(finalityProviders) return nil } @@ -320,16 +321,16 @@ func stake(ctx *cli.Context) error { sctx := context.Background() stakerAddress := ctx.String(stakerAddressFlag) - stakingAmount := ctx.Int64(stakingAmountFlag) + stakingAmount := ctx.Int64(helpers.StakingAmountFlag) fpPks := ctx.StringSlice(fpPksFlag) - stakingTimeBlocks := ctx.Int64(stakingTimeFlag) + stakingTimeBlocks := ctx.Int64(helpers.StakingTimeBlocksFlag) results, err := client.Stake(sctx, stakerAddress, stakingAmount, fpPks, stakingTimeBlocks) if err != nil { return err } - printRespJSON(results) + helpers.PrintRespJSON(results) return nil } @@ -350,7 +351,7 @@ func unstake(ctx *cli.Context) error { return err } - printRespJSON(result) + helpers.PrintRespJSON(result) return nil } @@ -382,7 +383,7 @@ func unbond(ctx *cli.Context) error { return err } - printRespJSON(result) + helpers.PrintRespJSON(result) return nil } @@ -403,7 +404,7 @@ func stakingDetails(ctx *cli.Context) error { return err } - printRespJSON(result) + helpers.PrintRespJSON(result) return nil } @@ -435,7 +436,7 @@ func listStakingTransactions(ctx *cli.Context) error { return err } - printRespJSON(transactions) + helpers.PrintRespJSON(transactions) return nil } @@ -467,7 +468,7 @@ func withdrawableTransactions(ctx *cli.Context) error { return err } - printRespJSON(transactions) + helpers.PrintRespJSON(transactions) return nil } diff --git a/cmd/stakercli/helpers/flags.go b/cmd/stakercli/helpers/flags.go new file mode 100644 index 0000000..de70c00 --- /dev/null +++ b/cmd/stakercli/helpers/flags.go @@ -0,0 +1,8 @@ +package helpers + +const ( + StakingAmountFlag = "staking-amount" + StakingTimeBlocksFlag = "staking-time" + UnbondingFee = "unbonding-fee" + UnbondingTimeFlag = "unbonding-time" +) diff --git a/cmd/stakercli/helpers/json.go b/cmd/stakercli/helpers/json.go new file mode 100644 index 0000000..27443a8 --- /dev/null +++ b/cmd/stakercli/helpers/json.go @@ -0,0 +1,17 @@ +package helpers + +import ( + "encoding/json" + "fmt" +) + +// PrintRespJSON receive an interface and parses it into json for print +func PrintRespJSON(resp interface{}) { + jsonBytes, err := json.MarshalIndent(resp, "", " ") + if err != nil { + fmt.Println("unable to decode response: ", err) + return + } + + fmt.Printf("%s\n", jsonBytes) +} diff --git a/cmd/stakercli/main.go b/cmd/stakercli/main.go index 4d486eb..f4bd1c0 100644 --- a/cmd/stakercli/main.go +++ b/cmd/stakercli/main.go @@ -1,10 +1,12 @@ package main import ( - "encoding/json" "fmt" "os" + cmdadmin "github.com/babylonchain/btc-staker/cmd/stakercli/admin" + cmddaemon "github.com/babylonchain/btc-staker/cmd/stakercli/daemon" + cmdtx "github.com/babylonchain/btc-staker/cmd/stakercli/transaction" "github.com/urfave/cli" ) @@ -13,16 +15,6 @@ func fatal(err error) { os.Exit(1) } -func printRespJSON(resp interface{}) { - jsonBytes, err := json.MarshalIndent(resp, "", " ") - if err != nil { - fmt.Println("unable to decode response: ", err) - return - } - - fmt.Printf("%s\n", jsonBytes) -} - const ( btcNetworkFlag = "btc-network" btcWalletHostFlag = "btc-wallet-host" @@ -68,8 +60,9 @@ func main() { }, } - app.Commands = append(app.Commands, daemonCommands...) - app.Commands = append(app.Commands, adminCommands...) + app.Commands = append(app.Commands, cmddaemon.DaemonCommands...) + app.Commands = append(app.Commands, cmdadmin.AdminCommands...) + app.Commands = append(app.Commands, cmdtx.TransactionCommands...) if err := app.Run(os.Args); err != nil { fatal(err) diff --git a/cmd/stakercli/scripts.go b/cmd/stakercli/scripts.go deleted file mode 100644 index ae2b329..0000000 --- a/cmd/stakercli/scripts.go +++ /dev/null @@ -1,9 +0,0 @@ -package main - -const ( - stakerKeyFlag = "staker-key" - stakerAddressFlag = "staker-address" - delegatorKeyFlag = "delegator-key" - covenantKeyFlag = "covenant-key" - stakingTimeFlag = "staking-time" -) diff --git a/cmd/stakercli/transaction/staking.go b/cmd/stakercli/transaction/staking.go new file mode 100644 index 0000000..c49ba82 --- /dev/null +++ b/cmd/stakercli/transaction/staking.go @@ -0,0 +1,69 @@ +package transaction + +import ( + "fmt" + + "github.com/babylonchain/btc-staker/utils" + "github.com/btcsuite/btcd/btcutil" +) + +// InputBtcStakingTx json input structure to create a staking tx from json +type InputBtcStakingTx struct { + // BtcNetwork type of btc network to use + // Needs to be one of "testnet3", "mainnet", "regtest", "simnet", "signet". + BtcNetwork string `json:"btc_network"` + // StakerPublicKeyHex SchnorPubKey hex encoded. + StakerPublicKeyHex string `json:"staker_public_key_hex"` + // CovenantMembersPkHex covenant members SchnorPubKey hex encoded. + CovenantMembersPkHex []string `json:"covenant_members_pk_hex"` + // FinalityProviderPublicKeyHex SchnorPubKey hex encoded. + FinalityProviderPublicKeyHex string `json:"finality_provider_public_key_hex"` + // StakingAmount the amount to be staked in satoshi. + // A single StakingAmount is equal to 1e-8 of a bitcoin. + StakingAmount int64 `json:"staking_amount"` + // StakingTimeBlocks number of blocks to keep the staking amount locked. + StakingTimeBlocks uint16 `json:"staking_time_blocks"` + // MagicBytesHex magic bytes hex encoded. + MagicBytesHex string `json:"magic_bytes"` + // CovenantQuorum the number of covenant required as quorum. + CovenantQuorum uint32 `json:"covenant_quorum"` +} + +// ToCreatePhase1StakingTxResponse from the data input parses and build parameters to create and serialize response tx structure. +func (tx InputBtcStakingTx) ToCreatePhase1StakingTxResponse() (*CreatePhase1StakingTxResponse, error) { + magicBytes, err := parseMagicBytesFromHex(tx.MagicBytesHex) + if err != nil { + return nil, fmt.Errorf("error parsing magic bytes %s: %w", tx.MagicBytesHex, err) + } + + stakerPk, err := parseSchnorPubKeyFromHex(tx.StakerPublicKeyHex) + if err != nil { + return nil, fmt.Errorf("error parsing staker pub key %s: %w", tx.StakerPublicKeyHex, err) + } + + fpPk, err := parseSchnorPubKeyFromHex(tx.FinalityProviderPublicKeyHex) + if err != nil { + return nil, fmt.Errorf("error parsing finality provider pub key %s: %w", tx.FinalityProviderPublicKeyHex, err) + } + + covenantMembersPks, err := parseCovenantKeysFromSlice(tx.CovenantMembersPkHex) + if err != nil { + return nil, fmt.Errorf("error parsing covenant members pub key %s: %w", tx.CovenantMembersPkHex, err) + } + + btcNetworkParams, err := utils.GetBtcNetworkParams(tx.BtcNetwork) + if err != nil { + return nil, fmt.Errorf("error parsing btc network %s: %w", tx.BtcNetwork, err) + } + + return MakeCreatePhase1StakingTxResponse( + magicBytes, + stakerPk, + fpPk, + covenantMembersPks, + tx.CovenantQuorum, + tx.StakingTimeBlocks, + btcutil.Amount(tx.StakingAmount), + btcNetworkParams, + ) +} diff --git a/cmd/stakercli/transaction/transactions.go b/cmd/stakercli/transaction/transactions.go new file mode 100644 index 0000000..305b40c --- /dev/null +++ b/cmd/stakercli/transaction/transactions.go @@ -0,0 +1,664 @@ +package transaction + +import ( + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "math" + "strings" + + "github.com/babylonchain/babylon/btcstaking" + bbn "github.com/babylonchain/babylon/types" + "github.com/babylonchain/btc-staker/cmd/stakercli/helpers" + "github.com/babylonchain/btc-staker/utils" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/psbt" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/cometbft/cometbft/libs/os" + "github.com/urfave/cli" +) + +const ( + stakingTransactionFlag = "staking-transaction" + magicBytesFlag = "magic-bytes" + covenantMembersPksFlag = "covenant-committee-pks" + covenantQuorumFlag = "covenant-quorum" + networkNameFlag = "network" + stakerPublicKeyFlag = "staker-pk" + finalityProviderKeyFlag = "finality-provider-pk" +) + +var TransactionCommands = []cli.Command{ + { + Name: "transaction", + ShortName: "tr", + Usage: "Commands related to Babylon BTC transactions Staking/Unbonding/Slashing", + Category: "transaction commands", + Subcommands: []cli.Command{ + checkPhase1StakingTransactionCmd, + createPhase1StakingTransactionCmd, + createPhase1UnbondingTransactionCmd, + createPhase1StakingTransactionFromJsonCmd, + }, + }, +} + +func parseSchnorPubKeyFromCliCtx(ctx *cli.Context, flagName string) (*btcec.PublicKey, error) { + pkHex := ctx.String(flagName) + return parseSchnorPubKeyFromHex(pkHex) +} + +func parseSchnorPubKeyFromHex(pkHex string) (*btcec.PublicKey, error) { + pkBytes, err := hex.DecodeString(pkHex) + if err != nil { + return nil, err + } + + pk, err := schnorr.ParsePubKey(pkBytes) + if err != nil { + return nil, err + } + + return pk, nil +} + +func parseCovenantKeysFromCliCtx(ctx *cli.Context) ([]*btcec.PublicKey, error) { + covenantMembersPks := ctx.StringSlice(covenantMembersPksFlag) + return parseCovenantKeysFromSlice(covenantMembersPks) +} + +func parseCovenantKeysFromSlice(covenantMembersPks []string) ([]*btcec.PublicKey, error) { + covenantPubKeys := make([]*btcec.PublicKey, len(covenantMembersPks)) + + for i, fpPk := range covenantMembersPks { + fpPkBytes, err := hex.DecodeString(fpPk) + if err != nil { + return nil, err + } + + fpSchnorrKey, err := schnorr.ParsePubKey(fpPkBytes) + if err != nil { + return nil, err + } + + covenantPubKeys[i] = fpSchnorrKey + } + + return covenantPubKeys, nil +} + +func parseMagicBytesFromCliCtx(ctx *cli.Context) ([]byte, error) { + magicBytesHex := ctx.String(magicBytesFlag) + return parseMagicBytesFromHex(magicBytesHex) +} + +func parseMagicBytesFromHex(magicBytesHex string) ([]byte, error) { + magicBytes, err := hex.DecodeString(magicBytesHex) + if err != nil { + return nil, err + } + + if len(magicBytes) != btcstaking.MagicBytesLen { + return nil, fmt.Errorf("magic bytes should be of length %d", btcstaking.MagicBytesLen) + } + + return magicBytes, nil +} + +func parseAmountFromCliCtx(ctx *cli.Context, flagName string) (btcutil.Amount, error) { + amt := ctx.Int64(flagName) + + if amt <= 0 { + return 0, fmt.Errorf("staking amount should be greater than 0") + } + + return btcutil.Amount(amt), nil +} + +func parseLockTimeBlocksFromCliCtx(ctx *cli.Context, flagName string) (uint16, error) { + timeBlocks := ctx.Int64(flagName) + + if timeBlocks <= 0 { + return 0, fmt.Errorf("staking time blocks should be greater than 0") + } + + if timeBlocks > math.MaxUint16 { + return 0, fmt.Errorf("staking time blocks should be less or equal to %d", math.MaxUint16) + } + + return uint16(timeBlocks), nil +} + +var checkPhase1StakingTransactionCmd = cli.Command{ + Name: "check-phase1-staking-transaction", + ShortName: "cpst", + Usage: "Checks whether provided staking transactions is valid staking transaction (tx must be funded/have inputs)", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: stakingTransactionFlag, + Usage: "Staking transaction in hex", + Required: true, + }, + cli.StringFlag{ + Name: magicBytesFlag, + Usage: "Magic bytes in op return output in hex", + Required: true, + }, + cli.StringSliceFlag{ + Name: covenantMembersPksFlag, + Usage: "BTC public keys of the covenant committee members", + Required: true, + }, + cli.Uint64Flag{ + Name: covenantQuorumFlag, + Usage: "Required quorum for the covenant members", + Required: true, + }, + cli.StringFlag{ + Name: networkNameFlag, + Usage: "Bitcoin network on which staking should take place one of (mainnet, testnet3, regtest, simnet, signet)", + Required: true, + }, + cli.StringFlag{ + Name: stakerPublicKeyFlag, + Usage: "Optional staker pub key hex to match the staker pub key in tx", + }, + cli.StringFlag{ + Name: finalityProviderKeyFlag, + Usage: "Optional finality provider public key hex to match the finality provider public key in tx", + }, + cli.Int64Flag{ + Name: helpers.StakingAmountFlag, + Usage: "Optional staking amount in satoshis to match the amount spent in tx", + }, + cli.Int64Flag{ + Name: helpers.StakingTimeBlocksFlag, + Usage: "Optional staking time in BTC blocks to match how long it was locked for", + }, + }, + Action: checkPhase1StakingTransaction, +} + +func checkPhase1StakingTransaction(ctx *cli.Context) error { + net := ctx.String(networkNameFlag) + + currentParams, err := utils.GetBtcNetworkParams(net) + + if err != nil { + return err + } + + stakingTxHex := ctx.String(stakingTransactionFlag) + + tx, _, err := bbn.NewBTCTxFromHex(stakingTxHex) + + if err != nil { + return err + } + magicBytes, err := parseMagicBytesFromCliCtx(ctx) + + if err != nil { + return err + } + + covenantMembersPks, err := parseCovenantKeysFromCliCtx(ctx) + + if err != nil { + return err + } + + covenantQuorum := uint32(ctx.Uint64(covenantQuorumFlag)) + + stakingTx, err := btcstaking.ParseV0StakingTx( + tx, + magicBytes, + covenantMembersPks, + covenantQuorum, + currentParams, + ) + if err != nil { + return err + } + + // verify if optional flags match. + stakerPk := ctx.String(stakerPublicKeyFlag) + if len(stakerPk) > 0 { + stakerPkFromTx := schnorr.SerializePubKey(stakingTx.OpReturnData.StakerPublicKey.PubKey) + stakerPkHexFromTx := hex.EncodeToString(stakerPkFromTx) + if !strings.EqualFold(stakerPk, stakerPkHexFromTx) { + return fmt.Errorf("staker pk in tx %s do not match with flag %s", stakerPkHexFromTx, stakerPk) + } + } + + fpPk := ctx.String(finalityProviderKeyFlag) + if len(fpPk) > 0 { + fpPkFromTx := schnorr.SerializePubKey(stakingTx.OpReturnData.FinalityProviderPublicKey.PubKey) + fpPkHexFromTx := hex.EncodeToString(fpPkFromTx) + if !strings.EqualFold(fpPk, fpPkHexFromTx) { + return fmt.Errorf("finality provider pk in tx %s do not match with flag %s", fpPkHexFromTx, fpPk) + } + } + + timeBlocks := ctx.Int64(helpers.StakingTimeBlocksFlag) + if timeBlocks > 0 && uint16(timeBlocks) != stakingTx.OpReturnData.StakingTime { + return fmt.Errorf("staking time in tx %d do not match with flag %d", stakingTx.OpReturnData.StakingTime, timeBlocks) + } + + amt := ctx.Int64(helpers.StakingAmountFlag) + if amt > 0 && amt != stakingTx.StakingOutput.Value { + return fmt.Errorf("staking amount in tx %d do not match with flag %d", tx.TxOut[0].Value, amt) + } + + fmt.Println("Provided transaction is valid staking transaction!") + return nil +} + +var createPhase1StakingTransactionCmd = cli.Command{ + Name: "create-phase1-staking-transaction", + ShortName: "crpst", + Usage: "Creates unsigned and unfunded phase 1 staking transaction", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: stakerPublicKeyFlag, + Usage: "staker public key in schnorr format (32 byte) in hex", + Required: true, + }, + cli.StringFlag{ + Name: finalityProviderKeyFlag, + Usage: "finality provider public key in schnorr format (32 byte) in hex", + Required: true, + }, + cli.Int64Flag{ + Name: helpers.StakingAmountFlag, + Usage: "Staking amount in satoshis", + Required: true, + }, + cli.Int64Flag{ + Name: helpers.StakingTimeBlocksFlag, + Usage: "Staking time in BTC blocks", + Required: true, + }, + cli.StringFlag{ + Name: magicBytesFlag, + Usage: "Magic bytes in op_return output in hex", + Required: true, + }, + cli.StringSliceFlag{ + Name: covenantMembersPksFlag, + Usage: "BTC public keys of the covenant committee members", + Required: true, + }, + cli.Uint64Flag{ + Name: covenantQuorumFlag, + Usage: "Required quorum for the covenant members", + Required: true, + }, + cli.StringFlag{ + Name: networkNameFlag, + Usage: "Bitcoin network on which staking should take place one of (mainnet, testnet3, regtest, simnet, signet)", + Required: true, + }, + }, + Action: createPhase1StakingTransaction, +} + +var createPhase1StakingTransactionFromJsonCmd = cli.Command{ + Name: "create-phase1-staking-transaction-json", + ShortName: "crpstjson", + Usage: "stakercli transaction create-phase1-staking-transaction-json [fullpath/to/inputBtcStakingTx.json]", + Description: "Creates unsigned and unfunded phase 1 staking transaction", + Action: createPhase1StakingTransactionFromJson, +} + +type CreatePhase1StakingTxResponse struct { + StakingTxHex string `json:"staking_tx_hex"` +} + +func createPhase1StakingTransaction(ctx *cli.Context) error { + net := ctx.String(networkNameFlag) + + currentParams, err := utils.GetBtcNetworkParams(net) + + if err != nil { + return err + } + + stakerPk, err := parseSchnorPubKeyFromCliCtx(ctx, stakerPublicKeyFlag) + + if err != nil { + return err + } + + fpPk, err := parseSchnorPubKeyFromCliCtx(ctx, finalityProviderKeyFlag) + + if err != nil { + return err + } + + stakingAmount, err := parseAmountFromCliCtx(ctx, helpers.StakingAmountFlag) + + if err != nil { + return err + } + + stakingTimeBlocks, err := parseLockTimeBlocksFromCliCtx(ctx, helpers.StakingTimeBlocksFlag) + + if err != nil { + return err + } + + magicBytes, err := parseMagicBytesFromCliCtx(ctx) + + if err != nil { + return err + } + + covenantMembersPks, err := parseCovenantKeysFromCliCtx(ctx) + + if err != nil { + return err + } + + covenantQuorum := uint32(ctx.Uint64(covenantQuorumFlag)) + + resp, err := MakeCreatePhase1StakingTxResponse( + magicBytes, + stakerPk, + fpPk, + covenantMembersPks, + covenantQuorum, + stakingTimeBlocks, + stakingAmount, + currentParams, + ) + if err != nil { + return err + } + + helpers.PrintRespJSON(*resp) + return nil +} + +func createPhase1StakingTransactionFromJson(ctx *cli.Context) error { + inputFilePath := ctx.Args().First() + if len(inputFilePath) == 0 { + return errors.New("json file input is empty") + } + + if !os.FileExists(inputFilePath) { + return fmt.Errorf("json file input %s does not exist", inputFilePath) + } + + bz, err := os.ReadFile(inputFilePath) + if err != nil { + return fmt.Errorf("error reading file %s: %w", inputFilePath, err) + } + + var input InputBtcStakingTx + if err := json.Unmarshal(bz, &input); err != nil { + return fmt.Errorf("error parsing file content %s to struct %+v: %w", bz, input, err) + } + + resp, err := input.ToCreatePhase1StakingTxResponse() + if err != nil { + return err + } + + helpers.PrintRespJSON(*resp) + return nil +} + +// MakeCreatePhase1StakingTxResponse builds and serialize staking tx as hex response. +func MakeCreatePhase1StakingTxResponse( + magicBytes []byte, + stakerPk *btcec.PublicKey, + fpPk *btcec.PublicKey, + covenantMembersPks []*btcec.PublicKey, + covenantQuorum uint32, + stakingTimeBlocks uint16, + stakingAmount btcutil.Amount, + net *chaincfg.Params, +) (*CreatePhase1StakingTxResponse, error) { + _, tx, err := btcstaking.BuildV0IdentifiableStakingOutputsAndTx( + magicBytes, + stakerPk, + fpPk, + covenantMembersPks, + covenantQuorum, + stakingTimeBlocks, + stakingAmount, + net, + ) + if err != nil { + return nil, err + } + + serializedTx, err := utils.SerializeBtcTransaction(tx) + if err != nil { + return nil, err + } + + return &CreatePhase1StakingTxResponse{ + StakingTxHex: hex.EncodeToString(serializedTx), + }, nil +} + +// createPhase1UnbondingTransactionCmd creates un-signed unbonding transaction based on +// provided valid phase1 staking transaction. +var createPhase1UnbondingTransactionCmd = cli.Command{ + Name: "create-phase1-unbonding-transaction", + ShortName: "crput", + Usage: "Creates unsigned phase 1 unbonding transaction", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: stakingTransactionFlag, + Usage: "hex encoded staking transaction for which unbonding transaction will be created", + Required: true, + }, + cli.Int64Flag{ + Name: helpers.UnbondingFee, + Usage: "unbonding fee in satoshis", + Required: true, + }, + cli.Int64Flag{ + Name: helpers.UnbondingTimeFlag, + Usage: "Unbonding time in BTC blocks", + Required: true, + }, + cli.StringFlag{ + Name: magicBytesFlag, + Usage: "Hex encoded magic bytes in staking transaction op return output", + Required: true, + }, + cli.StringSliceFlag{ + Name: covenantMembersPksFlag, + Usage: "BTC public keys of the covenant committee members", + Required: true, + }, + cli.Uint64Flag{ + Name: covenantQuorumFlag, + Usage: "Required quorum for the covenant members", + Required: true, + }, + cli.StringFlag{ + Name: networkNameFlag, + Usage: "Bitcoin network on which staking should take place one of (mainnet, testnet3, regtest, simnet, signet)", + Required: true, + }, + }, + Action: createPhase1UnbondingTransaction, +} + +type CreatePhase1UnbondingTxResponse struct { + // bare hex of created unbonding transaction + UnbondingTxHex string `json:"unbonding_tx_hex"` + // base64 encoded psbt packet which can be used to sign the transaction using + // staker bitcoind wallet using `walletprocesspsbt` rpc call + UnbondingPsbtPacketBase64 string `json:"unbonding_psbt_packet_base64"` +} + +func createPhase1UnbondingTransaction(ctx *cli.Context) error { + net := ctx.String(networkNameFlag) + + currentParams, err := utils.GetBtcNetworkParams(net) + + if err != nil { + return err + } + + stakingTxHex := ctx.String(stakingTransactionFlag) + + stakingTx, _, err := bbn.NewBTCTxFromHex(stakingTxHex) + + if err != nil { + return err + } + + magicBytes, err := parseMagicBytesFromCliCtx(ctx) + + if err != nil { + return err + } + + covenantMembersPks, err := parseCovenantKeysFromCliCtx(ctx) + + if err != nil { + return err + } + + covenantQuorum := uint32(ctx.Uint64(covenantQuorumFlag)) + + stakingTxInfo, err := btcstaking.ParseV0StakingTx( + stakingTx, + magicBytes, + covenantMembersPks, + covenantQuorum, + currentParams, + ) + + if err != nil { + return fmt.Errorf("invalid staking transaction: %w", err) + } + + unbondingFee, err := parseAmountFromCliCtx(ctx, helpers.UnbondingFee) + + if err != nil { + return err + } + + unbondingTimeBlocks, err := parseLockTimeBlocksFromCliCtx(ctx, helpers.UnbondingTimeFlag) + + if err != nil { + return err + } + + unbondingAmout := stakingTxInfo.StakingOutput.Value - int64(unbondingFee) + + if unbondingAmout <= 0 { + return fmt.Errorf("invalid unbonding amount %d", unbondingAmout) + } + + unbondingInfo, err := btcstaking.BuildUnbondingInfo( + stakingTxInfo.OpReturnData.StakerPublicKey.PubKey, + []*btcec.PublicKey{stakingTxInfo.OpReturnData.FinalityProviderPublicKey.PubKey}, + covenantMembersPks, + covenantQuorum, + unbondingTimeBlocks, + btcutil.Amount(unbondingAmout), + currentParams, + ) + + if err != nil { + return fmt.Errorf("error building unbonding info: %w", err) + } + + stakingTxHash := stakingTx.TxHash() + stakingTxInput := wire.NewTxIn( + wire.NewOutPoint( + &stakingTxHash, + uint32(stakingTxInfo.StakingOutputIdx), + ), + nil, + nil, + ) + + unbondingPsbtPacket, err := psbt.New( + []*wire.OutPoint{&stakingTxInput.PreviousOutPoint}, + []*wire.TxOut{unbondingInfo.UnbondingOutput}, + 2, + 0, + []uint32{wire.MaxTxInSequenceNum}, + ) + + if err != nil { + return err + } + + // re-build staking scripts to properly fill data necessary for signing + // in psbt packet + stakingScriptInfo, err := btcstaking.BuildStakingInfo( + stakingTxInfo.OpReturnData.StakerPublicKey.PubKey, + []*btcec.PublicKey{stakingTxInfo.OpReturnData.FinalityProviderPublicKey.PubKey}, + covenantMembersPks, + covenantQuorum, + stakingTxInfo.OpReturnData.StakingTime, + btcutil.Amount(stakingTxInfo.StakingOutput.Value), + currentParams, + ) + + if err != nil { + return err + } + + unbondingPathInfo, err := stakingScriptInfo.UnbondingPathSpendInfo() + + if err != nil { + return err + } + + unbondingPathCtrlBlock, err := unbondingPathInfo.ControlBlock.ToBytes() + + if err != nil { + return err + } + + // Fill psbt packet with data which will make it possible for staker to sign + // it using his bitcoind wallet + unbondingPsbtPacket.Inputs[0].SighashType = txscript.SigHashDefault + unbondingPsbtPacket.Inputs[0].WitnessUtxo = stakingTxInfo.StakingOutput + unbondingPsbtPacket.Inputs[0].TaprootBip32Derivation = []*psbt.TaprootBip32Derivation{ + { + XOnlyPubKey: stakingTxInfo.OpReturnData.StakerPublicKey.Marshall(), + }, + } + unbondingPsbtPacket.Inputs[0].TaprootLeafScript = []*psbt.TaprootTapLeafScript{ + { + ControlBlock: unbondingPathCtrlBlock, + Script: unbondingPathInfo.RevealedLeaf.Script, + LeafVersion: unbondingPathInfo.RevealedLeaf.LeafVersion, + }, + } + + unbondingTxBytes, err := utils.SerializeBtcTransaction(unbondingPsbtPacket.UnsignedTx) + if err != nil { + return err + } + + unbondingPacketEncoded, err := unbondingPsbtPacket.B64Encode() + + if err != nil { + return err + } + + resp := &CreatePhase1UnbondingTxResponse{ + UnbondingTxHex: hex.EncodeToString(unbondingTxBytes), + UnbondingPsbtPacketBase64: unbondingPacketEncoded, + } + helpers.PrintRespJSON(resp) + return nil +} diff --git a/cmd/stakercli/transaction/transactions_test.go b/cmd/stakercli/transaction/transactions_test.go new file mode 100644 index 0000000..74faf75 --- /dev/null +++ b/cmd/stakercli/transaction/transactions_test.go @@ -0,0 +1,288 @@ +package transaction_test + +import ( + "bytes" + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "encoding/json" + "fmt" + "math" + "math/rand" + "os" + "path/filepath" + "testing" + + bbn "github.com/babylonchain/babylon/types" + + "github.com/babylonchain/babylon/btcstaking" + "github.com/babylonchain/babylon/testutil/datagen" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/psbt" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/wire" + + "github.com/stretchr/testify/require" + "github.com/urfave/cli" + + cmdadmin "github.com/babylonchain/btc-staker/cmd/stakercli/admin" + cmddaemon "github.com/babylonchain/btc-staker/cmd/stakercli/daemon" + "github.com/babylonchain/btc-staker/cmd/stakercli/transaction" + "github.com/babylonchain/btc-staker/utils" +) + +const ( + fpDepositStakingAmount = 5000000 // 0.05BTC + fpStakingTimeLock = 52560 // 1 year + // Point with unknown discrete logarithm defined in: https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs + // using it as internal public key effectively disables taproot key spends + unspendableKeyPath = "0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0" + unspendableKeyPathSchnor = "50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0" +) + +func TestVerifyUnspendableKeyPath(t *testing.T) { + bz, err := hex.DecodeString(unspendableKeyPath) + require.NoError(t, err) + + pk, err := btcec.ParsePubKey(bz) + require.NoError(t, err) + + schnorrBz := schnorr.SerializePubKey(pk) + require.Equal(t, unspendableKeyPathSchnor, hex.EncodeToString(schnorrBz)) +} + +func FuzzFinalityProviderDeposit(f *testing.F) { + datagen.AddRandomSeedsToFuzzer(f, 10) + f.Fuzz(func(t *testing.T, seed int64) { + r := rand.New(rand.NewSource(seed)) + magicBytesHex := datagen.GenRandomHexStr(r, btcstaking.MagicBytesLen) + + commonFlags := []string{ + fmt.Sprintf("--covenant-committee-pks=%s", unspendableKeyPathSchnor), + fmt.Sprintf("--magic-bytes=%s", magicBytesHex), + "--covenant-quorum=1", "--network=regtest", + } + + fpPkHex, btcStakerPkHex := genSchnorPubKeyHex(t), genSchnorPubKeyHex(t) + createTxCmdArgs := []string{ + fmt.Sprintf("--staker-pk=%s", btcStakerPkHex), + fmt.Sprintf("--finality-provider-pk=%s", fpPkHex), + fmt.Sprintf("--staking-amount=%d", fpDepositStakingAmount), + fmt.Sprintf("--staking-time=%d", fpStakingTimeLock), + } + + app := testApp() + stakingTx := appRunCreatePhase1StakingTx(r, t, app, append(createTxCmdArgs, commonFlags...)) + require.NotNil(t, stakingTx) + }) +} + +func appRunCreatePhase1StakingTx(r *rand.Rand, t *testing.T, app *cli.App, arguments []string) transaction.CreatePhase1StakingTxResponse { + args := []string{"stakercli", "transaction", "create-phase1-staking-transaction"} + args = append(args, arguments...) + output := appRunWithOutput(r, t, app, args) + + var data transaction.CreatePhase1StakingTxResponse + err := json.Unmarshal([]byte(output), &data) + require.NoError(t, err) + + return data +} + +func genRandomPubKey(t *testing.T) *btcec.PublicKey { + privKey, err := btcec.NewPrivateKey() + require.NoError(t, err) + + return privKey.PubKey() +} + +func genSchnorPubKeyHex(t *testing.T) string { + btcPub := genRandomPubKey(t) + return hex.EncodeToString(schnorr.SerializePubKey(btcPub)) +} + +func appRunWithOutput(r *rand.Rand, t *testing.T, app *cli.App, arguments []string) (output string) { + outPut := filepath.Join(t.TempDir(), fmt.Sprintf("%s-out.txt", datagen.GenRandomHexStr(r, 10))) + outPutFile, err := os.Create(outPut) + require.NoError(t, err) + defer outPutFile.Close() + + // set file to stdout to read. + oldStd := os.Stdout + os.Stdout = outPutFile + + err = app.Run(arguments) + require.NoError(t, err) + + // set to old stdout + os.Stdout = oldStd + return readFromFile(t, outPutFile) +} + +func readFromFile(t *testing.T, f *os.File) string { + _, err := f.Seek(0, 0) + require.NoError(t, err) + + buf := new(bytes.Buffer) + _, err = buf.ReadFrom(f) + require.NoError(t, err) + return buf.String() +} + +func testApp() *cli.App { + app := cli.NewApp() + app.Name = "stakercli" + app.Commands = append(app.Commands, cmddaemon.DaemonCommands...) + app.Commands = append(app.Commands, cmdadmin.AdminCommands...) + app.Commands = append(app.Commands, transaction.TransactionCommands...) + return app +} + +func TestCheckPhase1StakingTransactionCmd(t *testing.T) { + app := testApp() + stakerCliCheckP1StkTx := []string{ + "stakercli", "transaction", "check-phase1-staking-transaction", + "--covenant-quorum=1", + "--covenant-committee-pks=50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0", + "--magic-bytes=01020304", + "--network=regtest", + "--staking-transaction=02000000000101ffa5874fdf64a535a4beae47ba0e66278b046baf7b3f3855dbf0413060aaeef90000000000fdffffff03404b4c00000000002251207c2649dc890238fada228d52a4c25fcef82e1cf3d7f53895ca0fcfb15dd142bb0000000000000000496a470102030400b91ea4619bc7b3f93e5015976f52f666ae4eb5c98018a6c8e41424905fa8591fa89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd50c876f7f70d0000001600141b9b57f4d4555e65ceb98c465c9580b0d6b0d0f60247304402200ae05daea3dc62ee7f2720c87705da28077ab19e420538eea5b92718271b4356022026c8367ac8bcd0b6d011842159cd525db672b234789a8d37725b247858c90a120121020721ef511b0faee2a487a346fdb96425d9dd7fa79210adbe7b47f0bcdc7e29de00000000", + } + // should pass without opt flags set + err := app.Run(stakerCliCheckP1StkTx) + require.NoError(t, err) + + validBtcPk := "b91ea4619bc7b3f93e5015976f52f666ae4eb5c98018a6c8e41424905fa8591f" + validFpPk := "a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565" + validStakingTime := 52560 + validStakingAmount := 5000000 + validCheckArgs := append(stakerCliCheckP1StkTx, + fmt.Sprintf("--staker-pk=%s", validBtcPk), + fmt.Sprintf("--finality-provider-pk=%s", validFpPk), + fmt.Sprintf("--staking-time=%d", validStakingTime), + fmt.Sprintf("--staking-amount=%d", validStakingAmount), + ) + err = app.Run(validCheckArgs) + require.NoError(t, err) + + err = app.Run([]string{ + "stakercli", "transaction", "check-phase1-staking-transaction", + "--covenant-quorum=1", + "--covenant-committee-pks=50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0", + "--magic-bytes=62627434", + "--network=signet", + "--staking-transaction=02000000000101b8eba8646e5fdb240af853d52c37b6159984c34bebb55c6097c4f0d276e536c80000000000fdffffff0344770d000000000016001461e09f8a6e653c6bdec644874dc119be1b60f27a404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd500247304402203bae17ac05c211e3c849595ef211f9a23ffc6d32d089e53cfaf81b94353f9e0c022063676b789a3fd85842552cd54408a8e92a1d37f51e0f4765ac29ef89ed707b750121032dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f355800000000", + "--staker-pk=2dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558", + "--finality-provider-pk=a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565", + fmt.Sprintf("--staking-time=%d", validStakingTime), + fmt.Sprintf("--staking-amount=%d", validStakingAmount), + }) + require.NoError(t, err) + + // check if errors are caught in flags --staker-pk, --finality-provider-pk, --staking-time, --staking-amount + invalidStakerPk := "badstakerpk" + invalidBtcStakerArgs := append(stakerCliCheckP1StkTx, + fmt.Sprintf("--staker-pk=%s", invalidStakerPk), + ) + err = app.Run(invalidBtcStakerArgs) + require.EqualError(t, err, fmt.Errorf("staker pk in tx %s do not match with flag %s", validBtcPk, invalidStakerPk).Error()) + + invalidFpPk := "badfppk" + invalidFpPkArgs := append(stakerCliCheckP1StkTx, + fmt.Sprintf("--finality-provider-pk=%s", invalidFpPk), + ) + err = app.Run(invalidFpPkArgs) + require.EqualError(t, err, fmt.Errorf("finality provider pk in tx %s do not match with flag %s", validFpPk, invalidFpPk).Error()) + + invalidStakingTime := 50 + invalidStakingTimeArgs := append(stakerCliCheckP1StkTx, + fmt.Sprintf("--staking-time=%d", invalidStakingTime), + ) + err = app.Run(invalidStakingTimeArgs) + require.EqualError(t, err, fmt.Errorf("staking time in tx %d do not match with flag %d", validStakingTime, invalidStakingTime).Error()) + + invalidStakingAmount := 156 + invalidStakingAmountArgs := append(stakerCliCheckP1StkTx, + fmt.Sprintf("--staking-amount=%d", invalidStakingAmount), + ) + err = app.Run(invalidStakingAmountArgs) + require.EqualError(t, err, fmt.Errorf("staking amount in tx %d do not match with flag %d", validStakingAmount, invalidStakingAmount).Error()) +} + +func appRunCreatePhase1UnbondingTx(r *rand.Rand, t *testing.T, app *cli.App, arguments []string) transaction.CreatePhase1UnbondingTxResponse { + args := []string{"stakercli", "transaction", "create-phase1-unbonding-transaction"} + args = append(args, arguments...) + output := appRunWithOutput(r, t, app, args) + + var data transaction.CreatePhase1UnbondingTxResponse + err := json.Unmarshal([]byte(output), &data) + require.NoError(t, err) + return data +} + +func genRandomUint16(r *rand.Rand) uint16 { + return uint16(r.Intn(math.MaxUint16-1) + 1) +} + +func genRandomInt64(r *rand.Rand) int64 { + return int64(r.Intn(100000-1000) + 1000) +} + +func FuzzCreateUnbondingTx(f *testing.F) { + datagen.AddRandomSeedsToFuzzer(f, 10) + f.Fuzz(func(t *testing.T, seed int64) { + r := rand.New(rand.NewSource(seed)) + mb := datagen.GenRandomByteArray(r, btcstaking.MagicBytesLen) + stakerKey := genRandomPubKey(t) + fpKey := genRandomPubKey(t) + cov1Key := genRandomPubKey(t) + cov2Key := genRandomPubKey(t) + + _, tx, err := btcstaking.BuildV0IdentifiableStakingOutputsAndTx( + mb, + stakerKey, + fpKey, + []*btcec.PublicKey{cov1Key, cov2Key}, + 1, + genRandomUint16(r), + btcutil.Amount(genRandomInt64(r)), + &chaincfg.RegressionNetParams, + ) + require.NoError(t, err) + + fakeInputHash := sha256.Sum256([]byte{0x01}) + tx.AddTxIn(wire.NewTxIn(&wire.OutPoint{Hash: fakeInputHash, Index: 0}, nil, nil)) + + serializedStakingTx, err := utils.SerializeBtcTransaction(tx) + require.NoError(t, err) + + unbondingTime := genRandomUint16(r) + + createTxCmdArgs := []string{ + fmt.Sprintf("--staking-transaction=%s", hex.EncodeToString(serializedStakingTx)), + fmt.Sprintf("--unbonding-fee=%d", 100), + fmt.Sprintf("--unbonding-time=%d", unbondingTime), + fmt.Sprintf("--magic-bytes=%s", hex.EncodeToString(mb)), + fmt.Sprintf("--covenant-committee-pks=%s", hex.EncodeToString(schnorr.SerializePubKey(cov1Key))), + fmt.Sprintf("--covenant-committee-pks=%s", hex.EncodeToString(schnorr.SerializePubKey(cov2Key))), + "--covenant-quorum=1", + "--network=regtest", + } + + app := testApp() + unbondingTxResponse := appRunCreatePhase1UnbondingTx(r, t, app, createTxCmdArgs) + require.NotNil(t, unbondingTxResponse) + utx, _, err := bbn.NewBTCTxFromHex(unbondingTxResponse.UnbondingTxHex) + require.NoError(t, err) + require.NotNil(t, utx) + + decodedBytes, err := base64.StdEncoding.DecodeString(unbondingTxResponse.UnbondingPsbtPacketBase64) + require.NoError(t, err) + require.NotNil(t, decodedBytes) + decoded, err := psbt.NewFromRawBytes(bytes.NewReader(decodedBytes), false) + require.NoError(t, err) + require.NotNil(t, decoded) + }) +} diff --git a/cmd/stakercli/transactions.go b/cmd/stakercli/transactions.go deleted file mode 100644 index afefada..0000000 --- a/cmd/stakercli/transactions.go +++ /dev/null @@ -1,6 +0,0 @@ -package main - -const ( - stakingScriptFlag = "staking-script" - stakingAmountFlag = "staking-amount" -) diff --git a/cmd/stakerd/main.go b/cmd/stakerd/main.go index c5a3f53..399106f 100644 --- a/cmd/stakerd/main.go +++ b/cmd/stakerd/main.go @@ -6,6 +6,7 @@ import ( "os" "runtime/pprof" + "github.com/babylonchain/btc-staker/metrics" staker "github.com/babylonchain/btc-staker/staker" scfg "github.com/babylonchain/btc-staker/stakercfg" service "github.com/babylonchain/btc-staker/stakerservice" @@ -68,8 +69,16 @@ func main() { os.Exit(1) } + stakerMetrics := metrics.NewStakerMetrics() + // TODO: consider moving this to stakerservice - staker, err := staker.NewStakerAppFromConfig(cfg, cfgLogger, zapLogger, dbBackend) + staker, err := staker.NewStakerAppFromConfig( + cfg, + cfgLogger, + zapLogger, + dbBackend, + stakerMetrics, + ) if err != nil { cfgLogger.Errorf("failed to create staker app: %v", err) @@ -84,6 +93,9 @@ func main() { dbBackend, ) + addr := fmt.Sprintf("%s:%d", cfg.MetricsConfig.Host, cfg.MetricsConfig.ServerPort) + metrics.Start(cfgLogger, addr, stakerMetrics.Registry) + err = service.RunUntilShutdown() if err != nil { _, _ = fmt.Fprintln(os.Stderr, err) diff --git a/docs/create-phase1-staking.md b/docs/create-phase1-staking.md new file mode 100644 index 0000000..cb736d4 --- /dev/null +++ b/docs/create-phase1-staking.md @@ -0,0 +1,252 @@ +# Creating and Submitting phase-1 Staking Transactions + +The phase-1 staking transaction is a +[Bitcoin Staking transaction](https://github.com/babylonchain/babylon/blob/v0.8.5/docs/staking-script.md) +that includes an additional `OP_RETURN` field containing the staking parameters +to enable for easy identification and taproot decoding through observing the +Bitcoin ledger. + +In this document, we will be exploring how to build the phase-1 staking +transaction using a bitcoind wallet, and later funding, signing, and propagating +it to the BTC network. + +## Requirements + +- [stakercli](../README.md#3-btc-staker-installation) +- [bitcoin-cli](../README.md#21-download-and-extract-bitcoin-binary) +- [jq](https://jqlang.github.io/jq/download/) + +The generation of a phase-1 staking transaction does not require +an active `stakerd` daemon that connects to a Babylon node. +It can be generated in offline mode without any external connections. + +It only requires the specification of a funding Bitcoin public key. Wallet +creation and generating a Bitcoin address for it are covered by +[this guide (steps 2 to 2.4)](../README.md#2-setting-up-a-bitcoin-node). +You can generate a new address by running the following command +[`bitcoin-cli getnewaddress`](https://chainquery.com/bitcoin-cli/getnewaddress). + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + -rpcwallet=btc-staker \ + getnewaddress + +tb1q9hr5zxsvtzg3gxpewdc7ft9yam2c6cfeaz75jj +``` + +## Identifying the Staker Public Key + +A Bitcoin staking transaction requires the specification +of the staker public key, which corresponds to the public key +of the wallet that is funding the staking transaction. +Once you setup your wallet and an address for it, +you can extract the public key corresponding to it through the +[`bitcoin-cli getaddressinfo`](https://chainquery.com/bitcoin-cli/getaddressinfo). +The output should be a json structure with information about the generated address: + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + -rpcwallet=btc-staker \ + getaddressinfo tb1q9hr5zxsvtzg3gxpewdc7ft9yam2c6cfeaz75jj + +{ + "address": "tb1q9hr5zxsvtzg3gxpewdc7ft9yam2c6cfeaz75jj", + "scriptPubKey": "00142dc7411a0c58911418397371e4aca4eed58d6139", + "ismine": true, + "solvable": true, + "desc": "wpkh([40009876/0h/0h/0h]032dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558)#rneryczc", + "iswatchonly": false, + "isscript": false, + "iswitness": true, + "witness_version": 0, + "witness_program": "2dc7411a0c58911418397371e4aca4eed58d6139", + "pubkey": "032dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558", + "ischange": false, + "timestamp": 1714999109, + "hdkeypath": "m/0'/0'/0'", + "hdseedid": "85e1a0d49dfa38c18a8a61ae7b2f2daa366fdcb3", + "hdmasterfingerprint": "40009876", + "labels": [ + "" + ] +} +``` + +The BTC staker public key as hex can be derived from the `pubkey` property. +You can use the `jq` utility to reduce it as follows: + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + -rpcwallet=btc-staker \ + getaddressinfo | jq -r '.pubkey[2:]' + +2dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558 +``` + +In this example the value `2dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558` +is the BTC staker public key in hex format. + +## Create Raw Transaction + +The binary `stakercli` will be used to generate the transaction using +the `transaction create-phase1-staking-transaction` command. + +This command has several flag options: + +- `--staker-pk` Schnorr BTC staker public key in hex format. +- `--finality-provider-pk` The finality provider Schnorr BTC public key in hex format. +- `--staking-amount` The amount of satoshis to be locked. +- `--staking-time` The amount of BTC blocks to lock for. +- `--magic-bytes` Magic bytes in op_return output in hex. +- `--covenant-committee-pks` BTC public keys of the covenant committee. For each +covenant pub key specified, the flag needs to be used again. +- `--covenant-quorum` Required quorum of covenant members to unbond. +- `--network` Specifies the BTC network this transaction will be sent, any of +`[mainnet, testnet3, regtest, simnet, signet]`. + +For example to generate one staking transaction that locks `0.05` BTC for one +year, use `--staking-amount=5000000` and `--staking-time=52560`. + +```shell +stakercli transaction create-phase1-staking-transaction \ + --staker-pk 2dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558 + --staking-amount 5000000 --staking-time 52560 \ + --magic-bytes \ + --finality-provider-pk \ + --covenant-quorum 3 \ + --covenant-committee-pks 05149a0c7a95320adf210e47bca8b363b7bd966be86be6392dd6cf4f96995869 \ + --covenant-committee-pks e8d503cb52715249f32f3ee79cee88dfd48c2565cb0c79cf9640d291f46fd518 \ + --covenant-committee-pks fe81b2409a32ddfd8ec1556557e8dd949b6e4fd37047523cb7f5fefca283d542 \ + --covenant-committee-pks bc4a1ff485d7b44faeec320b81ad31c3cad4d097813c21fcf382b4305e4cfc82 \ + --covenant-committee-pks 001e50601a4a1c003716d7a1ee7fe25e26e55e24e909b3642edb60d30e3c40c1 \ + --network signet + +{ + "staking_tx_hex": "020000000002404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd5000000000" +} +``` + +## Fund Raw Transaction + +The generated raw transaction needs to be funded. To fund a transaction run +[`bitcoin-cli fundrawtransaction`](https://chainquery.com/bitcoin-cli/fundrawtransaction) +that adds inputs to a transaction until it has enough value to satisfy the transaction. + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + -rpcwallet=btc-staker \ + fundrawtransaction 020000000002404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd5000000000 + +{ + "hex": "0200000001b8eba8646e5fdb240af853d52c37b6159984c34bebb55c6097c4f0d276e536c80000000000fdffffff0344770d000000000016001461e09f8a6e653c6bdec644874dc119be1b60f27a404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd5000000000", + "fee": 0.00117500, + "changepos": 0 +} +``` + +> You might need to unlock the wallet with [`bitcoin-cli walletpassphrase`](https://chainquery.com/bitcoin-cli/walletpassphrase) + +## Sign Transaction + +For the transaction to be submitted to the BTC network it first needs to be signed. +You can sign the raw funded transaction and output the signed format as hex +using the +[`bitcoin-cli signrawtransactionwithwallet`](https://chainquery.com/bitcoin-cli/signrawtransactionwithwallet) +command. + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + -rpcwallet=btc-staker \ + signrawtransactionwithwallet 0200000001b8eba8646e5fdb240af853d52c37b6159984c34bebb55c6097c4f0d276e536c80000000000fdffffff0344770d000000000016001461e09f8a6e653c6bdec644874dc119be1b60f27a404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd5000000000 + +{ + "hex": "02000000000101b8eba8646e5fdb240af853d52c37b6159984c34bebb55c6097c4f0d276e536c80000000000fdffffff0344770d000000000016001461e09f8a6e653c6bdec644874dc119be1b60f27a404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd500247304402203bae17ac05c211e3c849595ef211f9a23ffc6d32d089e53cfaf81b94353f9e0c022063676b789a3fd85842552cd54408a8e92a1d37f51e0f4765ac29ef89ed707b750121032dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f355800000000", + "complete": true +} +``` + +The output gives out the signed funded self-lock transaction in the `hex` property. + +## Submit Transaction + +The signed transaction can be submited onchain to BTC to be included in the blocks. +You can submit a transaction through the +[bitcoin-cli sendrawtransaction](https://chainquery.com/bitcoin-cli/sendrawtransaction) +that propagates the signed transaction to other nodes. + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + sendrawtransaction 02000000000101ffa5874fdf64a535a4beae47ba0e66278b046baf7b3f3855dbf0413060aaeef90000000000fdffffff03404b4c00000000002251207c2649dc890238fada228d52a4c25fcef82e1cf3d7f53895ca0fcfb15dd142bb0000000000000000496a470102030400b91ea4619bc7b3f93e5015976f52f666ae4eb5c98018a6c8e41424905fa8591fa89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd50c876f7f70d0000001600141b9b57f4d4555e65ceb98c465c9580b0d6b0d0f60247304402200ae05daea3dc62ee7f2720c87705da28077ab19e420538eea5b92718271b4356022026c8367ac8bcd0b6d011842159cd525db672b234789a8d37725b247858c90a120121022dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f355800000000 + +e87cfd1bb8aaaa009acee0ed0c5a8bed4995c8d7bc34498031ae4dc2feb8ba41 +``` + +It outputs the transaction hash. Wait a few minutes and make sure that +the transaction is included in the blockchain by using a Bitcoin explorer or +running the following command +[`bitcoin-cli gettransaction`](https://chainquery.com/bitcoin-cli/gettransaction). + +```shell +bitcoin-cli -signet \ + -rpcuser= \ + -rpcpassword= \ + -rpcport=38332 \ + gettransaction e87cfd1bb8aaaa009acee0ed0c5a8bed4995c8d7bc34498031ae4dc2feb8ba41 + +{ + "amount": -0.05000000, + "fee": -0.00117500, + "confirmations": 2, + "blockhash": "0000001779eb0be0537a3152ed8ced6dbf2e113617f0500c61c2db230df50f8b", + "blockheight": 194352, + "blockindex": 1, + "blocktime": 1715001364, + "txid": "e87cfd1bb8aaaa009acee0ed0c5a8bed4995c8d7bc34498031ae4dc2feb8ba41", + "wtxid": "040de8ed63d6f7ab9d234bb203d2e26e5e46801c9a1fc5af62acbbd75c547602", + "walletconflicts": [ + ], + "time": 1715001117, + "timereceived": 1715001117, + "bip125-replaceable": "no", + "details": [ + { + "address": "tb1pff9s275l5pgsenwwfq8a43dre5fr9xvnhtp9z7hm0p9xf5glcx6q4ffjtg", + "category": "send", + "amount": -0.05000000, + "vout": 1, + "fee": -0.00117500, + "abandoned": false + }, + { + "category": "send", + "amount": 0.00000000, + "vout": 2, + "fee": -0.00117500, + "abandoned": false + } + ], + "hex": "02000000000101b8eba8646e5fdb240af853d52c37b6159984c34bebb55c6097c4f0d276e536c80000000000fdffffff0344770d000000000016001461e09f8a6e653c6bdec644874dc119be1b60f27a404b4c00000000002251204a4b057a9fa0510ccdce480fdac5a3cd12329993bac2517afb784a64d11fc1b40000000000000000496a4762627434002dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f3558a89e7caf57360bc8b791df72abc3fb6d2ddc0e06e171c9f17c4ea1299e677565cd500247304402203bae17ac05c211e3c849595ef211f9a23ffc6d32d089e53cfaf81b94353f9e0c022063676b789a3fd85842552cd54408a8e92a1d37f51e0f4765ac29ef89ed707b750121032dedbb66510d56b11f7a611e290f044e24dd48fd9c8a76d103ba05c8e95f355800000000", + "lastprocessedblock": { + "hash": "0000002afc7a3021b17967acf3d8a90af69023cc48383230dd29e782daf0ebdf", + "height": 194353 + } +} +``` diff --git a/go.mod b/go.mod index 5467e3d..723688e 100644 --- a/go.mod +++ b/go.mod @@ -6,10 +6,9 @@ toolchain go1.21.4 require ( cosmossdk.io/errors v1.0.1 - cosmossdk.io/math v1.2.0 + cosmossdk.io/math v1.3.0 github.com/avast/retry-go/v4 v4.5.1 - github.com/babylonchain/babylon v0.8.0 - github.com/babylonchain/rpc-client v0.8.0 + github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236 github.com/btcsuite/btcd v0.24.0 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.5 @@ -20,46 +19,52 @@ require ( github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 github.com/btcsuite/btcwallet/walletdb v1.4.0 github.com/cometbft/cometbft v0.38.5 - github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987 + github.com/cosmos/cosmos-sdk v0.50.5 github.com/cosmos/go-bip39 v1.0.0 - github.com/cosmos/relayer/v2 v2.4.3-0.20231227002143-820caf5ab483 + github.com/cosmos/relayer/v2 v2.5.2 github.com/jessevdk/go-flags v1.5.0 github.com/jsternberg/zap-logfmt v1.3.0 github.com/lightningnetwork/lnd v0.16.4-beta.rc1 github.com/lightningnetwork/lnd/kvdb v1.4.1 + github.com/ory/dockertest/v3 v3.10.0 + github.com/prometheus/client_golang v1.18.0 github.com/sirupsen/logrus v1.9.3 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/urfave/cli v1.22.14 go.uber.org/zap v1.26.0 - google.golang.org/protobuf v1.32.0 + golang.org/x/sync v0.6.0 + google.golang.org/protobuf v1.33.0 ) require ( - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.3 // indirect + cloud.google.com/go v0.112.0 // indirect + cloud.google.com/go/compute v1.24.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/storage v1.35.1 // indirect - cosmossdk.io/api v0.7.2 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/storage v1.36.0 // indirect + cosmossdk.io/api v0.7.3 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect - cosmossdk.io/log v1.3.0 // indirect + cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/store v1.0.2 // indirect cosmossdk.io/x/circuit v0.1.0 // indirect cosmossdk.io/x/evidence v0.1.0 // indirect cosmossdk.io/x/feegrant v0.1.0 // indirect cosmossdk.io/x/nft v0.1.0 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect + cosmossdk.io/x/tx v0.13.1 // indirect cosmossdk.io/x/upgrade v0.1.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/CosmWasm/wasmd v0.50.0 // indirect github.com/CosmWasm/wasmvm v1.5.2 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect github.com/aead/siphash v1.0.1 // indirect github.com/andybalholm/brotli v1.0.5 // indirect @@ -67,7 +72,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d // indirect github.com/btcsuite/btcd/btcutil/psbt v1.1.8 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect @@ -82,21 +87,22 @@ require ( github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect + github.com/containerd/continuity v0.3.0 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-db v1.0.2 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect github.com/cosmos/ibc-go/v8 v8.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect @@ -113,25 +119,27 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/distribution/reference v0.5.0 // indirect + github.com/docker/cli v23.0.1+incompatible // indirect github.com/docker/docker v23.0.8+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/dsnet/compress v0.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/emicklei/dot v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/ethereum/go-ethereum v1.13.5 // indirect + github.com/ethereum/go-ethereum v1.13.14 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fergusstrange/embedded-postgres v1.10.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-stack/stack v1.8.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect @@ -139,25 +147,25 @@ require ( github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect - github.com/gtank/merlin v0.1.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect @@ -170,9 +178,10 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect @@ -197,7 +206,7 @@ require ( github.com/juju/utils/v3 v3.0.2 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kkdai/bstream v1.0.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.7 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -213,21 +222,20 @@ require ( github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect github.com/lightningnetwork/lnd/tlv v1.1.0 // indirect github.com/lightningnetwork/lnd/tor v1.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.6 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mholt/archiver/v3 v3.5.0 // indirect github.com/miekg/dns v1.1.43 // indirect - github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mtibben/percent v0.2.1 // indirect @@ -235,21 +243,22 @@ require ( github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0-rc2 // indirect + github.com/opencontainers/runc v1.1.5 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pierrec/lz4/v4 v4.1.8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect github.com/rogpeppe/fastuuid v1.2.0 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.31.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect @@ -261,8 +270,8 @@ require ( github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // indirect - github.com/strangelove-ventures/cometbft v0.37.3-0.20231004194858-c01e8d5bcac3 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/strangelove-ventures/cometbft-client v0.1.0 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -271,6 +280,9 @@ require ( github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect github.com/zondax/hid v0.9.2 // indirect @@ -284,32 +296,32 @@ require ( go.etcd.io/etcd/raft/v3 v3.5.7 // indirect go.etcd.io/etcd/server/v3 v3.5.7 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.3 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/sdk v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v0.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/mod v0.15.0 // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.14.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.153.0 // indirect + golang.org/x/tools v0.18.0 // indirect + google.golang.org/api v0.162.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/grpc v1.60.1 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c // indirect + google.golang.org/grpc v1.62.0 // indirect gopkg.in/errgo.v1 v1.0.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/macaroon-bakery.v2 v2.0.1 // indirect @@ -334,7 +346,4 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -replace ( - github.com/cosmos/ibc-go/v7 => github.com/babylonchain/ibc-go/v7 v7.0.0-20230324085744-4d6a0d2c0fcf - github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 -) +replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/go.sum b/go.sum index 110ff4e..f883d91 100644 --- a/go.sum +++ b/go.sum @@ -30,8 +30,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -68,8 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= +cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -109,8 +109,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -171,8 +171,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= -cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= +cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= @@ -184,8 +184,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk= +cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -196,10 +196,10 @@ cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98ok cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.0 h1:L0Z0XstClo2kOU4h3V1iDoE5Ji64sg5HLOogzGg67Oo= -cosmossdk.io/log v1.3.0/go.mod h1:HIDyvWLqZe2ovlWabsDN4aPMpY/nUEquAhgfTf2ZzB8= -cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= -cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= +cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= +cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= @@ -210,8 +210,8 @@ cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= -cosmossdk.io/x/tx v0.13.0 h1:8lzyOh3zONPpZv2uTcUmsv0WTXy6T1/aCVDCqShmpzU= -cosmossdk.io/x/tx v0.13.0/go.mod h1:CpNQtmoqbXa33/DVxWQNx5Dcnbkv2xGUhL7tYQ5wUsY= +cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= +cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= cosmossdk.io/x/upgrade v0.1.0 h1:z1ZZG4UL9ICTNbJDYZ6jOnF9GdEK9wyoEFi4BUScHXE= cosmossdk.io/x/upgrade v0.1.0/go.mod h1:/6jjNGbiPCNtmA1N+rBtP601sr0g4ZXuj3yC6ClPCGY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -227,8 +227,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= -github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/CosmWasm/wasmd v0.50.0 h1:NVaGqCSTRfb9UTDHJwT6nQIWcb6VjlQl88iI+u1+qjE= github.com/CosmWasm/wasmd v0.50.0/go.mod h1:UjmShW4l9YxaMytwJZ7IB7MWzHiynSZP3DdWrG0FRtk= github.com/CosmWasm/wasmvm v1.5.2 h1:+pKB1Mz9GZVt1vadxB+EDdD1FOz3dMNjIKq/58/lrag= @@ -287,10 +285,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/babylonchain/babylon v0.8.0 h1:QC04LPCFBD0MZyiM3cAjVBlr3CXEZPdhORWPBlO2gaQ= -github.com/babylonchain/babylon v0.8.0/go.mod h1:jR1b+5mA7BkRrXfd/PMHwk7W/RpoeQtunvjal+tKeHY= -github.com/babylonchain/rpc-client v0.8.0 h1:H7VN7dTR1Z6uffRrziFRD9FTj+1Jf3u9gL2RLm3z9Jo= -github.com/babylonchain/rpc-client v0.8.0/go.mod h1:+7IiKHmIAmfM888hPpfAVmGs85yZRxfbJym4swmgKG8= +github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236 h1:Ydna4VcP56xu1+zdgygqHdSCeMduZjuznVhr4exO5do= +github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236/go.mod h1:lfeASLNJgcUsX7LEns3HRUv0k+MjzcB2q2AMasfz38M= 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= @@ -301,8 +297,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d h1:zsO4lp+bjv5XvPTF58Vq+qgmZEYZttJK+CWtSZhKenI= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6ZhUWvbk7PdWVmOaak10o86cqMUYEmn1CZNGEI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= @@ -372,6 +368,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -382,6 +379,7 @@ github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObk github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -395,8 +393,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= +github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= @@ -408,8 +406,8 @@ github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZ github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb h1:6Po+YYKT5B5ZXN0wd2rwFBaebM0LufPf8p4zxOd48Kg= -github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -423,6 +421,7 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -434,17 +433,18 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f h1:JOrtw2xFKzlg+cbHpyrpLDmnN1HqhBfnX7WDiW7eG2c= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987 h1:Pjvcy7wHUoYh253LvNv5Dyx+d3SNkRPsDZH+FytqZ3w= -github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987/go.mod h1:0D9mrUy1eAUMQuvYzf2xvhEPk2ta9w7XH1zcYvyFiuM= +github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= +github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= +github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= +github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= +github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -452,8 +452,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= -github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg= @@ -462,19 +462,22 @@ github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZD github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= -github.com/cosmos/relayer/v2 v2.4.3-0.20231227002143-820caf5ab483 h1:l8Elru92qhdzwJdOYDEKcDfFPEdPPFH5jTRL7OZWGMA= -github.com/cosmos/relayer/v2 v2.4.3-0.20231227002143-820caf5ab483/go.mod h1:eBKSRbCx2zhqpvzZG4+HcDacWz4BywqgcLBkiyzuGYI= +github.com/cosmos/relayer/v2 v2.5.2 h1:AF0MOo1GvJo94QNB996fBHdKlH+vrIY3JcFNrIvZNP0= +github.com/cosmos/relayer/v2 v2.5.2/go.mod h1:h4Ng2QsVpxExIq5S+WvLr8slDb9MSBh82gQS4DeMwDo= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= -github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= -github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -503,10 +506,13 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= +github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v23.0.8+incompatible h1:z4ZCIwfqHgOEwhxmAWugSL1PFtPQmLP60EVhJYJPaX8= github.com/docker/docker v23.0.8+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= @@ -522,8 +528,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= -github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -535,12 +541,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.5 h1:U6TCRciCqZRe4FPXmy1sMGxTfuk8P7u2UoinF3VbaFk= -github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= +github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= +github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= @@ -554,6 +560,7 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -561,8 +568,10 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -588,12 +597,12 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -605,9 +614,9 @@ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GO github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= @@ -622,6 +631,7 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= @@ -671,8 +681,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -734,12 +744,14 @@ github.com/google/pprof v0.0.0-20230228050547-1710fef4ab10/go.mod h1:79YE0hCXdHa github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -767,8 +779,9 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -782,10 +795,6 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 h1:ajue7SzQMywqRjg2fK7dcpc0QhFG github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0/go.mod h1:r1hZAcvfFXuYmcKyCJI9wlyOPIZUJl6FCB8Cpca/NLE= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= -github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= -github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= -github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= -github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -836,8 +845,8 @@ github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7H github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= @@ -848,6 +857,8 @@ github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSAS github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -960,8 +971,8 @@ github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdY github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= @@ -971,6 +982,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1023,8 +1035,8 @@ github.com/lightningnetwork/lnd/tor v1.1.0 h1:iXO7fSzjxTI+p88KmtpbuyuRJeNfgtpl9Q github.com/lightningnetwork/lnd/tor v1.1.0/go.mod h1:RDtaAdwfAm+ONuPYwUhNIH1RAvKPv+75lHPOegUcz64= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= -github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 h1:sjOGyegMIhvgfq5oaue6Td+hxZuf3tDC8lAPrFldqFw= github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796/go.mod h1:3p7ZTf9V1sNPI5H8P3NkTFF4LuwMdPl2DodF60qAKqY= github.com/ltcsuite/ltcutil v0.0.0-20181217130922-17f3b04680b6/go.mod h1:8Vg/LTOO0KYa/vlHWJ6XZAevPQThGH5sufO0Hrou/lA= @@ -1061,16 +1073,11 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mholt/archiver/v3 v3.5.0 h1:nE8gZIrw66cu4osS/U7UW7YDuGMHssxKutU8IfWxwWE= github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1089,6 +1096,9 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1096,6 +1106,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -1148,6 +1159,8 @@ github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7X github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1158,6 +1171,8 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= +github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -1193,24 +1208,24 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1226,15 +1241,15 @@ github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5 github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= @@ -1242,8 +1257,8 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -1258,6 +1273,7 @@ github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71e github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1269,6 +1285,7 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1300,8 +1317,8 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= -github.com/strangelove-ventures/cometbft v0.37.3-0.20231004194858-c01e8d5bcac3 h1:sOdCYxFMTVbEGvJ6LfjQsm+tQbB5YdUpvMcXJnHBFm4= -github.com/strangelove-ventures/cometbft v0.37.3-0.20231004194858-c01e8d5bcac3/go.mod h1:Jgux5ULdCs9N7ARy9NHe+hPfJQhUFpYF6+/+gmcqsGw= +github.com/strangelove-ventures/cometbft-client v0.1.0 h1:fcA652QaaR0LDnyJOZVjZKtuyAawnVXaq/p1MWJSYD4= +github.com/strangelove-ventures/cometbft-client v0.1.0/go.mod h1:QzThgjzvsGgUNVNpGPitmxOWMIhp6a0oqf80nCRNt/0= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1309,8 +1326,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1321,12 +1339,14 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= @@ -1359,8 +1379,17 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vulpine-io/io-test v1.0.0 h1:Ot8vMh+ssm1VWDAwJ3U4C5qG9aRnr5YfQFZPNZBAUGI= github.com/vulpine-io/io-test v1.0.0/go.mod h1:X1I+p5GCxVX9m4nFd1HBtr2bVX9v1ZE6x8w+Obt36AU= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= @@ -1407,21 +1436,25 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.3 h1:syAz40OyelLZo42+3U68Phisvrx4qh+4wpdZw7eUUdY= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.3/go.mod h1:Dts42MGkzZne2yCru741+bFiTMWkIj/LLRizad7b9tw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1 h1:ofMbch7i29qIUf7VtF+r0HRF6ac0SBaPSziSsKp7wkk= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 h1:CFMFNoz+CGprjFAFy+RJFrfEe4GBia3RRm2a4fREvCA= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= +go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= +go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.9.0 h1:C0g6TWmQYvjKRnljRULLWUVJGy8Uvu0NEL/5frY2/t4= go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= @@ -1463,8 +1496,8 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1476,8 +1509,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1504,8 +1537,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1549,6 +1582,7 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -1569,8 +1603,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1597,8 +1631,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1613,8 +1647,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1634,6 +1668,7 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1643,6 +1678,7 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1674,6 +1710,7 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1692,9 +1729,11 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1719,14 +1758,14 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1809,8 +1848,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1871,8 +1910,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= -google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/api v0.162.0 h1:Vhs54HkaEpkMBdgGdOT2P6F0csGG/vxDS0hWHJzmmps= +google.golang.org/api v0.162.0/go.mod h1:6SulDkfoBIg4NFmCuZ39XeeAgSHCPecfSUuDyYlAHs0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1991,12 +2030,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 h1:x9PwdEgd11LgK+orcck69WVRo7DezSO4VUMPI4xpc8A= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c h1:NUsgEN92SQQqzfA+YtqYNqYmB3DMMYLlIwUZAQFVFbo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240221002015-b0ce06bbee7c/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2039,8 +2078,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= +google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2057,8 +2096,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2099,6 +2138,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= diff --git a/itest/babylon_node_handler.go b/itest/babylon_node_handler.go index 36fde31..8e73613 100644 --- a/itest/babylon_node_handler.go +++ b/itest/babylon_node_handler.go @@ -123,6 +123,8 @@ func NewBabylonNodeHandler( covenantPk1 *btcec.PublicKey, covenantPk2 *btcec.PublicKey, covenantPk3 *btcec.PublicKey, + slashingAddress string, + baseHeaderHex string, ) (*BabylonNodeHandler, error) { testDir, err := baseDirBabylondir() if err != nil { @@ -144,8 +146,12 @@ func NewBabylonNodeHandler( "--chain-id=chain-test", "--btc-finalization-timeout=4", "--btc-confirmation-depth=2", + "--btc-network=regtest", + fmt.Sprintf("--slashing-address=%s", slashingAddress), + fmt.Sprintf("--btc-base-header=%s", baseHeaderHex), "--additional-sender-account", fmt.Sprintf("--covenant-quorum=%s", quorumString), + fmt.Sprintf("--epoch-interval=%d", 5), fmt.Sprintf("--covenant-pks=%s,%s,%s", pubBabylon1.MarshalHex(), pubBabylon2.MarshalHex(), pubBabylon3.MarshalHex()), ) diff --git a/itest/bitcoind_node_setup.go b/itest/bitcoind_node_setup.go new file mode 100644 index 0000000..b674b47 --- /dev/null +++ b/itest/bitcoind_node_setup.go @@ -0,0 +1,110 @@ +package e2etest + +import ( + "encoding/json" + "fmt" + "os" + "strconv" + "strings" + "testing" + "time" + + "github.com/babylonchain/btc-staker/itest/containers" + "github.com/stretchr/testify/require" +) + +var ( + startTimeout = 30 * time.Second +) + +type CreateWalletResponse struct { + Name string `json:"name"` + Warning string `json:"warning"` +} + +type GenerateBlockResponse struct { + // address of the recipient of rewards + Address string `json:"address"` + // blocks generated + Blocks []string `json:"blocks"` +} + +type BitcoindTestHandler struct { + t *testing.T + m *containers.Manager +} + +func NewBitcoindHandler(t *testing.T) *BitcoindTestHandler { + m, err := containers.NewManager() + require.NoError(t, err) + return &BitcoindTestHandler{ + t: t, + m: m, + } +} + +func (h *BitcoindTestHandler) Start() { + tempPath, err := os.MkdirTemp("", "bitcoind-staker-test-*") + require.NoError(h.t, err) + + h.t.Cleanup(func() { + _ = os.RemoveAll(tempPath) + }) + + _, err = h.m.RunBitcoindResource(tempPath) + require.NoError(h.t, err) + + h.t.Cleanup(func() { + _ = h.m.ClearResources() + }) + + require.Eventually(h.t, func() bool { + _, err := h.GetBlockCount() + h.t.Logf("failed to get block count: %v", err) + return err == nil + }, startTimeout, 500*time.Millisecond, "bitcoind did not start") + +} + +func (h *BitcoindTestHandler) GetBlockCount() (int, error) { + buff, _, err := h.m.ExecBitcoindCliCmd(h.t, []string{"getblockcount"}) + if err != nil { + return 0, err + } + + buffStr := buff.String() + + parsedBuffStr := strings.TrimSuffix(buffStr, "\n") + + num, err := strconv.Atoi(parsedBuffStr) + if err != nil { + return 0, err + } + + return num, nil +} + +func (h *BitcoindTestHandler) CreateWallet(walletName string, passphrase string) *CreateWalletResponse { + // last false on the list will create legacy wallet. This is needed, as currently + // we are signing all taproot transactions by dumping the private key and signing it + // on app level. Descriptor wallets do not allow dumping private keys. + buff, _, err := h.m.ExecBitcoindCliCmd(h.t, []string{"createwallet", walletName, "false", "false", passphrase, "false", "false"}) + require.NoError(h.t, err) + + var response CreateWalletResponse + err = json.Unmarshal(buff.Bytes(), &response) + require.NoError(h.t, err) + + return &response +} + +func (h *BitcoindTestHandler) GenerateBlocks(count int) *GenerateBlockResponse { + buff, _, err := h.m.ExecBitcoindCliCmd(h.t, []string{"-generate", fmt.Sprintf("%d", count)}) + require.NoError(h.t, err) + + var response GenerateBlockResponse + err = json.Unmarshal(buff.Bytes(), &response) + require.NoError(h.t, err) + + return &response +} diff --git a/itest/btcd_wallet_handler.go b/itest/btcd_wallet_handler.go deleted file mode 100644 index edc62b4..0000000 --- a/itest/btcd_wallet_handler.go +++ /dev/null @@ -1,180 +0,0 @@ -package e2etest - -import ( - "fmt" - "log" - "os" - "os/exec" - "path/filepath" - "runtime" -) - -func baseDir() (string, error) { - dirPath := filepath.Join(os.TempDir(), "btcdwallet", "rpctest") - err := os.MkdirAll(dirPath, 0755) - return dirPath, err -} - -type wallet struct { - cmd *exec.Cmd - pidFile string - dataDir string -} - -func newWallet(dataDir string, cmd *exec.Cmd) *wallet { - return &wallet{ - dataDir: dataDir, - cmd: cmd, - } -} - -func (n *wallet) start() error { - if err := n.cmd.Start(); err != nil { - return err - } - - pid, err := os.Create(filepath.Join(n.dataDir, - fmt.Sprintf("%s.pid", "config"))) - if err != nil { - return err - } - - n.pidFile = pid.Name() - if _, err = fmt.Fprintf(pid, "%d\n", n.cmd.Process.Pid); err != nil { - return err - } - - if err := pid.Close(); err != nil { - return err - } - - return nil -} - -func (n *wallet) stop() (err error) { - if n.cmd == nil || n.cmd.Process == nil { - // return if not properly initialized - // or error starting the process - return nil - } - - defer func() { - err = n.cmd.Wait() - }() - - if runtime.GOOS == "windows" { - return n.cmd.Process.Signal(os.Kill) - } - return n.cmd.Process.Signal(os.Interrupt) -} - -func (n *wallet) cleanup() error { - if n.pidFile != "" { - if err := os.Remove(n.pidFile); err != nil { - log.Printf("unable to remove file %s: %v", n.pidFile, - err) - } - } - - dirs := []string{ - n.dataDir, - } - var err error - for _, dir := range dirs { - if err = os.RemoveAll(dir); err != nil { - log.Printf("Cannot remove dir %s: %v", dir, err) - } - } - return err -} - -func (n *wallet) shutdown() error { - if err := n.stop(); err != nil { - return err - } - if err := n.cleanup(); err != nil { - return err - } - return nil -} - -type WalletHandler struct { - wallet *wallet -} - -func NewWalletHandler(btcdCert []byte, walletPath string, btcdHost string) (*WalletHandler, error) { - testDir, err := baseDir() - logsPath := filepath.Join(testDir, "logs") - walletDir := filepath.Join(testDir, "simnet") - - if err := os.Mkdir(walletDir, os.ModePerm); err != nil { - return nil, err - } - - if err != nil { - return nil, err - } - - certFile := filepath.Join(testDir, "rpc.cert") - - dir := fmt.Sprintf("--appdata=%s", testDir) - logDir := fmt.Sprintf("--logdir=%s", logsPath) - certDir := fmt.Sprintf("--cafile=%s", certFile) - hostConf := fmt.Sprintf("--rpcconnect=%s", btcdHost) - - // Write cert and key files. - if err = os.WriteFile(certFile, btcdCert, 0666); err != nil { - return nil, err - } - - tempWalletPath := filepath.Join(walletDir, "wallet.db") - - // Read all content of src to data, may cause OOM for a large file. - data, err := os.ReadFile(walletPath) - - if err != nil { - return nil, err - } - - // Write data to dst - err = os.WriteFile(tempWalletPath, data, 0644) - - if err != nil { - return nil, err - } - - // btcwallet --btcdusername=user --btcdpassword=pass --username=user --password=pass --noinitialload --noservertls --simnet - createCmd := exec.Command( - "btcwallet", - "--debuglevel=debug", - "--btcdusername=user", - "--btcdpassword=pass", - "--username=user", - "--password=pass", - "--noservertls", - "--simnet", - hostConf, - certDir, - dir, - logDir, - ) - - return &WalletHandler{ - wallet: newWallet(testDir, createCmd), - }, nil -} - -func (w *WalletHandler) Start() error { - if err := w.wallet.start(); err != nil { - return w.wallet.cleanup() - } - return nil -} - -func (w *WalletHandler) Stop() error { - if err := w.wallet.shutdown(); err != nil { - return err - } - - return nil -} diff --git a/itest/containers/config.go b/itest/containers/config.go new file mode 100644 index 0000000..2521e78 --- /dev/null +++ b/itest/containers/config.go @@ -0,0 +1,24 @@ +package containers + +// ImageConfig contains all images and their respective tags +// needed for running e2e tests. +type ImageConfig struct { + BitcoindRepository string + BitcoindVersion string +} + +//nolint:deadcode +const ( + dockerBitcoindRepository = "lncm/bitcoind" + dockerBitcoindVersionTag = "v24.0.1" +) + +// NewImageConfig returns ImageConfig needed for running e2e test. +func NewImageConfig() ImageConfig { + config := ImageConfig{ + BitcoindRepository: dockerBitcoindRepository, + BitcoindVersion: dockerBitcoindVersionTag, + } + return config + +} diff --git a/itest/containers/containers.go b/itest/containers/containers.go new file mode 100644 index 0000000..2e4100b --- /dev/null +++ b/itest/containers/containers.go @@ -0,0 +1,186 @@ +package containers + +import ( + "bytes" + "context" + "fmt" + "regexp" + "testing" + "time" + + "github.com/ory/dockertest/v3" + "github.com/ory/dockertest/v3/docker" + "github.com/stretchr/testify/require" +) + +const ( + bitcoindContainerName = "bitcoind-test" +) + +var errRegex = regexp.MustCompile(`(E|e)rror`) + +// Manager is a wrapper around all Docker instances, and the Docker API. +// It provides utilities to run and interact with all Docker containers used within e2e testing. +type Manager struct { + cfg ImageConfig + pool *dockertest.Pool + resources map[string]*dockertest.Resource +} + +// NewManager creates a new Manager instance and initializes +// all Docker specific utilities. Returns an error if initialization fails. +func NewManager() (docker *Manager, err error) { + docker = &Manager{ + cfg: NewImageConfig(), + resources: make(map[string]*dockertest.Resource), + } + docker.pool, err = dockertest.NewPool("") + if err != nil { + return nil, err + } + return docker, nil +} + +func (m *Manager) ExecBitcoindCliCmd(t *testing.T, command []string) (bytes.Buffer, bytes.Buffer, error) { + // this is currently hardcoded, as it will be the same for all tests + cmd := []string{"bitcoin-cli", "-chain=regtest", "-rpcuser=user", "-rpcpassword=pass"} + cmd = append(cmd, command...) + return m.ExecCmd(t, bitcoindContainerName, cmd) +} + +// ExecCmd executes command by running it on the given container. +// It word for word `error` in output to discern between error and regular output. +// It retures stdout and stderr as bytes.Buffer and an error if the command fails. +func (m *Manager) ExecCmd(t *testing.T, containerName string, command []string) (bytes.Buffer, bytes.Buffer, error) { + if _, ok := m.resources[containerName]; !ok { + return bytes.Buffer{}, bytes.Buffer{}, fmt.Errorf("no resource %s found", containerName) + } + containerId := m.resources[containerName].Container.ID + + var ( + outBuf bytes.Buffer + errBuf bytes.Buffer + ) + + timeout := 20 * time.Second + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + + t.Logf("\n\nRunning: \"%s\"", command) + + // We use the `require.Eventually` function because it is only allowed to do one transaction per block without + // sequence numbers. For simplicity, we avoid keeping track of the sequence number and just use the `require.Eventually`. + require.Eventually( + t, + func() bool { + exec, err := m.pool.Client.CreateExec(docker.CreateExecOptions{ + Context: ctx, + AttachStdout: true, + AttachStderr: true, + Container: containerId, + User: "root", + Cmd: command, + }) + + if err != nil { + t.Logf("failed to create exec: %v", err) + return false + } + + err = m.pool.Client.StartExec(exec.ID, docker.StartExecOptions{ + Context: ctx, + Detach: false, + OutputStream: &outBuf, + ErrorStream: &errBuf, + }) + if err != nil { + t.Logf("failed to start exec: %v", err) + return false + } + + errBufString := errBuf.String() + // Note that this does not match all errors. + // This only works if CLI outputs "Error" or "error" + // to stderr. + if errRegex.MatchString(errBufString) { + t.Log("\nstderr:") + t.Log(errBufString) + + t.Log("\nstdout:") + t.Log(outBuf.String()) + return false + } + + return true + }, + timeout, + 500*time.Millisecond, + "command failed", + ) + + return outBuf, errBuf, nil +} + +func (m *Manager) RunBitcoindResource( + bitcoindCfgPath string, +) (*dockertest.Resource, error) { + bitcoindResource, err := m.pool.RunWithOptions( + &dockertest.RunOptions{ + Name: bitcoindContainerName, + Repository: m.cfg.BitcoindRepository, + Tag: m.cfg.BitcoindVersion, + User: "root:root", + Mounts: []string{ + fmt.Sprintf("%s/:/data/.bitcoin", bitcoindCfgPath), + }, + ExposedPorts: []string{ + "8332", + "8333", + "28332", + "28333", + "18443", + "18444", + }, + PortBindings: map[docker.Port][]docker.PortBinding{ + "8332/tcp": {{HostIP: "", HostPort: "8332"}}, + "8333/tcp": {{HostIP: "", HostPort: "8333"}}, + "28332/tcp": {{HostIP: "", HostPort: "28332"}}, + "28333/tcp": {{HostIP: "", HostPort: "28333"}}, + "18443/tcp": {{HostIP: "", HostPort: "18443"}}, + "18444/tcp": {{HostIP: "", HostPort: "18444"}}, + }, + Cmd: []string{ + "-regtest", + "-txindex", + "-rpcuser=user", + "-rpcpassword=pass", + "-rpcallowip=0.0.0.0/0", + "-rpcbind=0.0.0.0", + }, + }, + noRestart, + ) + if err != nil { + return nil, err + } + m.resources[bitcoindContainerName] = bitcoindResource + return bitcoindResource, nil +} + +// ClearResources removes all outstanding Docker resources created by the Manager. +func (m *Manager) ClearResources() error { + for _, resource := range m.resources { + if err := m.pool.Purge(resource); err != nil { + return err + } + } + + return nil +} + +func noRestart(config *docker.HostConfig) { + // in this case we don't want the nodes to restart on failure + config.RestartPolicy = docker.RestartPolicy{ + Name: "no", + } +} diff --git a/itest/e2e_test.go b/itest/e2e_test.go index 37ef78f..ecc0db1 100644 --- a/itest/e2e_test.go +++ b/itest/e2e_test.go @@ -4,10 +4,11 @@ package e2etest import ( + "bytes" "context" - "encoding/binary" "encoding/hex" "errors" + "fmt" "math/rand" "net" "net/netip" @@ -18,12 +19,17 @@ import ( "testing" "time" + btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types" + staking "github.com/babylonchain/babylon/btcstaking" - asig "github.com/babylonchain/babylon/crypto/schnorr-adaptor-signature" + txformat "github.com/babylonchain/babylon/btctxformatter" + "github.com/babylonchain/babylon/crypto/eots" "github.com/babylonchain/babylon/testutil/datagen" bbntypes "github.com/babylonchain/babylon/types" btcstypes "github.com/babylonchain/babylon/x/btcstaking/types" + ckpttypes "github.com/babylonchain/babylon/x/checkpointing/types" "github.com/babylonchain/btc-staker/babylonclient" + "github.com/babylonchain/btc-staker/metrics" "github.com/babylonchain/btc-staker/proto" "github.com/babylonchain/btc-staker/staker" "github.com/babylonchain/btc-staker/stakercfg" @@ -35,14 +41,13 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/hdkeychain" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/integration/rpctest" "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdkquerytypes "github.com/cosmos/cosmos-sdk/types/query" sttypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/lightningnetwork/lnd/kvdb" "github.com/lightningnetwork/lnd/signal" @@ -54,28 +59,7 @@ import ( var ( r = rand.New(rand.NewSource(time.Now().Unix())) - simnetParams = &chaincfg.SimNetParams - submitterAddrStr = "bbn1eppc73j56382wjn6nnq3quu5eye4pmm087xfdh" - babylonTag = []byte{1, 2, 3, 4} - babylonTagHex = hex.EncodeToString(babylonTag) - - // copy of the seed from btcd/integration/rpctest memWallet, this way we can - // import the same wallet in the btcd wallet - hdSeed = [chainhash.HashSize]byte{ - 0x79, 0xa6, 0x1a, 0xdb, 0xc6, 0xe5, 0xa2, 0xe1, - 0x39, 0xd2, 0x71, 0x3a, 0x54, 0x6e, 0xc7, 0xc8, - 0x75, 0x63, 0x2e, 0x75, 0xf1, 0xdf, 0x9c, 0x3f, - 0xa6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - } - - // current number of active test nodes. This is necessary to replicate btcd rpctest.Harness - // methods of generating keys i.e with each started btcd node we increment this number - // by 1, and then use hdSeed || numTestInstances as the seed for generating keys - numTestInstances = 0 - - existingWalletFile = "wallet.db" - exisitngWalletPass = "pass" - walletTimeout = 86400 + regtestParams = &chaincfg.RegressionNetParams eventuallyWaitTimeOut = 10 * time.Second eventuallyPollTime = 250 * time.Millisecond @@ -91,73 +75,65 @@ func keyToAddr(key *btcec.PrivateKey, net *chaincfg.Params) (btcutil.Address, er return pubKeyAddr.AddressPubKeyHash(), nil } -func defaultStakerConfig(btcdCert []byte, btcdHost string) *stakercfg.Config { +func defaultStakerConfig(t *testing.T, passphrase string) (*stakercfg.Config, *rpcclient.Client) { defaultConfig := stakercfg.DefaultConfig() - // configure node backend - defaultConfig.BtcNodeBackendConfig.Nodetype = "btcd" - defaultConfig.BtcNodeBackendConfig.Btcd.RPCHost = btcdHost - defaultConfig.BtcNodeBackendConfig.Btcd.RawRPCCert = hex.EncodeToString(btcdCert) - defaultConfig.BtcNodeBackendConfig.Btcd.RPCUser = "user" - defaultConfig.BtcNodeBackendConfig.Btcd.RPCPass = "pass" - defaultConfig.BtcNodeBackendConfig.FeeMode = "dynamic" - defaultConfig.BtcNodeBackendConfig.EstimationMode = types.DynamicFeeEstimation - defaultConfig.BtcNodeBackendConfig.ActiveNodeBackend = types.BtcdNodeBackend - defaultConfig.BtcNodeBackendConfig.ActiveWalletBackend = types.BtcwalletWalletBackend - - // configure wallet rpc - defaultConfig.ChainConfig.Network = "simnet" - defaultConfig.ActiveNetParams = *simnetParams - // Config setting necessary to connect btcwallet daemon - defaultConfig.WalletConfig.WalletPass = "pass" - - defaultConfig.WalletRpcConfig.Host = "127.0.0.1:18554" - defaultConfig.WalletRpcConfig.User = "user" - defaultConfig.WalletRpcConfig.Pass = "pass" - defaultConfig.WalletRpcConfig.DisableTls = true - // Set it to something low to not slow down tests - defaultConfig.StakerConfig.BabylonStallingInterval = 1 * time.Second - defaultConfig.StakerConfig.UnbondingTxCheckInterval = 1 * time.Second + // both wallet and node are bicoind + defaultConfig.BtcNodeBackendConfig.ActiveWalletBackend = types.BitcoindWalletBackend + defaultConfig.BtcNodeBackendConfig.ActiveNodeBackend = types.BitcoindNodeBackend + defaultConfig.ActiveNetParams = *regtestParams - return &defaultConfig -} - -func GetSpendingKeyAndAddress(id uint32) (*btcec.PrivateKey, btcutil.Address, error) { - var harnessHDSeed [chainhash.HashSize + 4]byte - copy(harnessHDSeed[:], hdSeed[:]) - // id used for our test wallet is always 0 - binary.BigEndian.PutUint32(harnessHDSeed[:chainhash.HashSize], id) - - hdRoot, err := hdkeychain.NewMaster(harnessHDSeed[:], simnetParams) + // Fees configuration + defaultConfig.BtcNodeBackendConfig.FeeMode = "dynamic" + defaultConfig.BtcNodeBackendConfig.EstimationMode = types.DynamicFeeEstimation - if err != nil { - return nil, nil, err - } + bitcoindHost := "127.0.0.1:18443" + bitcoindUser := "user" + bitcoindPass := "pass" - // The first child key from the hd root is reserved as the coinbase - // generation address. - coinbaseChild, err := hdRoot.Derive(0) - if err != nil { - return nil, nil, err - } + // Wallet configuration + defaultConfig.WalletRpcConfig.Host = bitcoindHost + defaultConfig.WalletRpcConfig.User = bitcoindUser + defaultConfig.WalletRpcConfig.Pass = bitcoindPass + defaultConfig.WalletRpcConfig.DisableTls = true + defaultConfig.WalletConfig.WalletPass = passphrase - coinbaseKey, err := coinbaseChild.ECPrivKey() + // node configuration + defaultConfig.BtcNodeBackendConfig.Bitcoind.RPCHost = bitcoindHost + defaultConfig.BtcNodeBackendConfig.Bitcoind.RPCUser = bitcoindUser + defaultConfig.BtcNodeBackendConfig.Bitcoind.RPCPass = bitcoindPass - if err != nil { - return nil, nil, err - } + // Use rpc polling, as it is our default mode and it is a bit more troublesome + // to configure ZMQ from inside the bitcoind docker container + defaultConfig.BtcNodeBackendConfig.Bitcoind.RPCPolling = true + defaultConfig.BtcNodeBackendConfig.Bitcoind.BlockPollingInterval = 1 * time.Second + defaultConfig.BtcNodeBackendConfig.Bitcoind.TxPollingInterval = 1 * time.Second - coinbaseAddr, err := keyToAddr(coinbaseKey, simnetParams) - if err != nil { - return nil, nil, err - } + defaultConfig.StakerConfig.BabylonStallingInterval = 1 * time.Second + defaultConfig.StakerConfig.UnbondingTxCheckInterval = 1 * time.Second - return coinbaseKey, coinbaseAddr, nil + // TODO: After bumping relayer version sending transactions concurrently fails wih + // fatal error: concurrent map writes + // For now diable concurrent sends but this need to be sorted out + defaultConfig.StakerConfig.MaxConcurrentTransactions = 1 + + testRpcClient, err := rpcclient.New(&rpcclient.ConnConfig{ + Host: bitcoindHost, + User: bitcoindUser, + Pass: bitcoindPass, + DisableTLS: true, + DisableConnectOnNew: true, + DisableAutoReconnect: false, + // we use post mode as it sure it works with either bitcoind or btcwallet + // we may need to re-consider it later if we need any notifications + HTTPPostMode: true, + }, nil) + require.NoError(t, err) + + return &defaultConfig, testRpcClient } type TestManager struct { - MinerNode *rpctest.Harness - BtcWalletHandler *WalletHandler BabylonHandler *BabylonNodeHandler Config *stakercfg.Config Db kvdb.Backend @@ -170,43 +146,57 @@ type TestManager struct { serviceAddress string StakerClient *dc.StakerServiceJsonRpcClient CovenantPrivKeys []*btcec.PrivateKey + BitcoindHandler *BitcoindTestHandler + TestRpcClient *rpcclient.Client } type testStakingData struct { - StakerKey *btcec.PublicKey - StakerBabylonPrivKey *secp256k1.PrivKey - StakerBabylonPubKey *secp256k1.PubKey - FinalityProviderBabylonPrivKey *secp256k1.PrivKey - FinalityProviderBabylonPublicKey *secp256k1.PubKey - FinalityProviderBtcPrivKey *btcec.PrivateKey - FinalityProviderBtcKey *btcec.PublicKey - StakingTime uint16 - StakingAmount int64 + StakerKey *btcec.PublicKey + StakerBabylonPrivKey *secp256k1.PrivKey + StakerBabylonPubKey *secp256k1.PubKey + FinalityProviderBabylonPrivKeys []*secp256k1.PrivKey + FinalityProviderBabylonPublicKeys []*secp256k1.PubKey + FinalityProviderBtcPrivKeys []*btcec.PrivateKey + FinalityProviderBtcKeys []*btcec.PublicKey + StakingTime uint16 + StakingAmount int64 +} + +func (d *testStakingData) GetNumRestakedFPs() int { + return len(d.FinalityProviderBabylonPrivKeys) } func (tm *TestManager) getTestStakingData( t *testing.T, stakerKey *btcec.PublicKey, stakingTime uint16, - stakingAmount int64) *testStakingData { - delegatarPrivKey, err := btcec.NewPrivateKey() - require.NoError(t, err) - finalityProviderBabylonPrivKey := secp256k1.GenPrivKey() - finalityProviderBabylonPubKey := finalityProviderBabylonPrivKey.PubKey().(*secp256k1.PubKey) + stakingAmount int64, + numRestakedFPs int, +) *testStakingData { + fpBTCSKs, fpBTCPKs, err := datagen.GenRandomBTCKeyPairs(r, numRestakedFPs) + require.NoError(t, err) + + fpBBNSKs, fpBBNPKs := []*secp256k1.PrivKey{}, []*secp256k1.PubKey{} + for i := 0; i < numRestakedFPs; i++ { + fpBBNSK := secp256k1.GenPrivKey() + fpBBNSKs = append(fpBBNSKs, fpBBNSK) + fpBBNPK := fpBBNSK.PubKey().(*secp256k1.PubKey) + fpBBNPKs = append(fpBBNPKs, fpBBNPK) + } stakerBabylonPrivKey := secp256k1.GenPrivKey() stakerBabylonPubKey := stakerBabylonPrivKey.PubKey().(*secp256k1.PubKey) return &testStakingData{ - StakerKey: stakerKey, - StakerBabylonPrivKey: stakerBabylonPrivKey, - StakerBabylonPubKey: stakerBabylonPubKey, - FinalityProviderBabylonPrivKey: finalityProviderBabylonPrivKey, - FinalityProviderBabylonPublicKey: finalityProviderBabylonPubKey, - FinalityProviderBtcPrivKey: delegatarPrivKey, - FinalityProviderBtcKey: delegatarPrivKey.PubKey(), - StakingTime: stakingTime, - StakingAmount: stakingAmount, + StakerKey: stakerKey, + StakerBabylonPrivKey: stakerBabylonPrivKey, + StakerBabylonPubKey: stakerBabylonPubKey, + FinalityProviderBabylonPrivKeys: fpBBNSKs, + FinalityProviderBabylonPublicKeys: fpBBNPKs, + FinalityProviderBtcPrivKeys: fpBTCSKs, + FinalityProviderBtcKeys: fpBTCPKs, + StakingTime: stakingTime, + StakingAmount: stakingAmount, } } @@ -222,58 +212,17 @@ func (td *testStakingData) withStakingAmout(amout int64) *testStakingData { return &tdCopy } -func initBtcWalletClient( - t *testing.T, - client walletcontroller.WalletController, - walletPrivKey *btcec.PrivateKey, - outputsToWaitFor int) { - - err := ImportWalletSpendingKey(t, client, walletPrivKey) - require.NoError(t, err) - - waitForNOutputs(t, client, outputsToWaitFor) -} - func StartManager( t *testing.T, - numMatureOutputsInWallet uint32, - numbersOfOutputsToWaitForDurintInit int, - handlers *rpcclient.NotificationHandlers) *TestManager { - args := []string{ - "--rejectnonstd", - "--txindex", - "--trickleinterval=100ms", - "--debuglevel=debug", - "--nowinservice", - // The miner will get banned and disconnected from the node if - // its requested data are not found. We add a nobanning flag to - // make sure they stay connected if it happens. - "--nobanning", - // Don't disconnect if a reply takes too long. - "--nostalldetect", - } - - miner, err := rpctest.New(simnetParams, handlers, args, "") - require.NoError(t, err) - - privkey, addr, err := GetSpendingKeyAndAddress(uint32(numTestInstances)) - require.NoError(t, err) - - if err := miner.SetUp(true, numMatureOutputsInWallet); err != nil { - t.Fatalf("unable to set up mining node: %v", err) - } - - minerNodeRpcConfig := miner.RPCConfig() - certFile := minerNodeRpcConfig.Certificates - - currentDir, err := os.Getwd() - require.NoError(t, err) - walletPath := filepath.Join(currentDir, existingWalletFile) + numMatureOutputsInWallet uint32) *TestManager { + h := NewBitcoindHandler(t) + h.Start() + passphrase := "pass" + _ = h.CreateWallet("test-wallet", passphrase) + // only outputs which are 100 deep are mature + br := h.GenerateBlocks(int(numMatureOutputsInWallet) + 100) - wh, err := NewWalletHandler(certFile, walletPath, minerNodeRpcConfig.Host) - require.NoError(t, err) - - err = wh.Start() + minerAddressDecoded, err := btcutil.DecodeAddress(br.Address, regtestParams) require.NoError(t, err) quorum := 2 @@ -285,21 +234,26 @@ func StartManager( coventantPrivKeys = append(coventantPrivKeys, covenantPrivKey) } + var buff bytes.Buffer + err = regtestParams.GenesisBlock.Header.Serialize(&buff) + require.NoError(t, err) + baseHeaderHex := hex.EncodeToString(buff.Bytes()) + bh, err := NewBabylonNodeHandler( quorum, coventantPrivKeys[0].PubKey(), coventantPrivKeys[1].PubKey(), coventantPrivKeys[2].PubKey(), + // all slashings will be sent back to wallet + minerAddressDecoded.EncodeAddress(), + baseHeaderHex, ) require.NoError(t, err) err = bh.Start() require.NoError(t, err) - // Wait for wallet to re-index the outputs - time.Sleep(5 * time.Second) - - cfg := defaultStakerConfig(certFile, minerNodeRpcConfig.Host) + cfg, c := defaultStakerConfig(t, passphrase) logger := logrus.New() logger.SetLevel(logrus.DebugLevel) @@ -324,18 +278,20 @@ func StartManager( dbbackend, err := stakercfg.GetDbBackend(cfg.DBConfig) require.NoError(t, err) - stakerApp, err := staker.NewStakerAppFromConfig(cfg, logger, zapLogger, dbbackend) + m := metrics.NewStakerMetrics() + stakerApp, err := staker.NewStakerAppFromConfig(cfg, logger, zapLogger, dbbackend, m) require.NoError(t, err) // we require separate client to send BTC headers to babylon node (interface does not need this method?) bl, err := babylonclient.NewBabylonController(cfg.BabylonConfig, &cfg.ActiveNetParams, logger, zapLogger) require.NoError(t, err) - initBtcWalletClient( - t, - stakerApp.Wallet(), - privkey, - numbersOfOutputsToWaitForDurintInit, - ) + walletClient := stakerApp.Wallet() + + err = walletClient.UnlockWallet(20) + require.NoError(t, err) + + walletPrivKey, err := walletClient.DumpPrivateKey(minerAddressDecoded) + require.NoError(t, err) interceptor, err := signal.Intercept() require.NoError(t, err) @@ -368,37 +324,31 @@ func StartManager( stakerClient, err := dc.NewStakerServiceJsonRpcClient("tcp://" + addressString) require.NoError(t, err) - numTestInstances++ - return &TestManager{ - MinerNode: miner, - BtcWalletHandler: wh, BabylonHandler: bh, Config: cfg, Db: dbbackend, Sa: stakerApp, BabylonClient: bl, - WalletPrivKey: privkey, - MinerAddr: addr, + WalletPrivKey: walletPrivKey, + MinerAddr: minerAddressDecoded, serverStopper: &interceptor, wg: &wg, serviceAddress: addressString, StakerClient: stakerClient, CovenantPrivKeys: coventantPrivKeys, + BitcoindHandler: h, + TestRpcClient: c, } } func (tm *TestManager) Stop(t *testing.T) { - err := tm.BtcWalletHandler.Stop() - require.NoError(t, err) tm.serverStopper.RequestShutdown() tm.wg.Wait() - err = tm.BabylonHandler.Stop() + err := tm.BabylonHandler.Stop() require.NoError(t, err) err = os.RemoveAll(tm.Config.DBConfig.DBPath) require.NoError(t, err) - err = tm.MinerNode.TearDown() - require.NoError(t, err) } func (tm *TestManager) RestartApp(t *testing.T) { @@ -413,8 +363,8 @@ func (tm *TestManager) RestartApp(t *testing.T) { dbbackend, err := stakercfg.GetDbBackend(tm.Config.DBConfig) require.NoError(t, err) - - stakerApp, err := staker.NewStakerAppFromConfig(tm.Config, logger, zapLogger, dbbackend) + m := metrics.NewStakerMetrics() + stakerApp, err := staker.NewStakerAppFromConfig(tm.Config, logger, zapLogger, dbbackend, m) require.NoError(t, err) interceptor, err := signal.Intercept() @@ -449,115 +399,232 @@ func (tm *TestManager) RestartApp(t *testing.T) { tm.StakerClient = stakerClient } -func ImportWalletSpendingKey( - t *testing.T, - walletClient walletcontroller.WalletController, - privKey *btcec.PrivateKey) error { +func retrieveTransactionFromMempool(t *testing.T, client *rpcclient.Client, hashes []*chainhash.Hash) []*btcutil.Tx { + var txes []*btcutil.Tx + for _, txHash := range hashes { + tx, err := client.GetRawTransaction(txHash) + require.NoError(t, err) + txes = append(txes, tx) + } + return txes +} - wifKey, err := btcutil.NewWIF(privKey, simnetParams, true) +func GetAllMinedBtcHeadersSinceGenesis(t *testing.T, c *rpcclient.Client) []*wire.BlockHeader { + height, err := c.GetBlockCount() require.NoError(t, err) - err = walletClient.UnlockWallet(int64(3)) + var headers []*wire.BlockHeader - if err != nil { - return err + for i := 1; i <= int(height); i++ { + hash, err := c.GetBlockHash(int64(i)) + require.NoError(t, err) + header, err := c.GetBlockHeader(hash) + require.NoError(t, err) + headers = append(headers, header) } - err = walletClient.ImportPrivKey(wifKey) + return headers +} +func opReturnScript(data []byte) []byte { + builder := txscript.NewScriptBuilder() + script, err := builder.AddOp(txscript.OP_RETURN).AddData(data).Script() if err != nil { - return err + panic(err) } - - return nil + return script } -// MineBlocksWithTxes mines a single block to include the specifies -// transactions only. -func mineBlockWithTxs(t *testing.T, h *rpctest.Harness, txes []*btcutil.Tx) *wire.MsgBlock { - var emptyTime time.Time - - // Generate a block. - b, err := h.GenerateAndSubmitBlock(txes, -1, emptyTime) - require.NoError(t, err, "unable to mine block") - - block, err := h.Client.GetBlock(b.Hash()) - require.NoError(t, err, "unable to get block") - - return block +func txToBytes(tx *wire.MsgTx) []byte { + buf := bytes.NewBuffer(make([]byte, 0, tx.SerializeSize())) + _ = tx.Serialize(buf) + return buf.Bytes() } -func retrieveTransactionFromMempool(t *testing.T, h *rpctest.Harness, hashes []*chainhash.Hash) []*btcutil.Tx { - var txes []*btcutil.Tx - for _, txHash := range hashes { - tx, err := h.Client.GetRawTransaction(txHash) - require.NoError(t, err) - txes = append(txes, tx) +func txsToBytes(txs []*wire.MsgTx) [][]byte { + var txsBytes [][]byte + for _, tx := range txs { + txsBytes = append(txsBytes, txToBytes(tx)) } - return txes + return txsBytes } -func waitForNOutputs(t *testing.T, walletClient walletcontroller.WalletController, n int) { +func (tm *TestManager) FinalizeUntilEpoch(t *testing.T, epoch uint64) { + bbnClient := tm.BabylonClient.GetBBNClient() + ckptParams, err := bbnClient.BTCCheckpointParams() + require.NoError(t, err) + // wait until the checkpoint of this epoch is sealed require.Eventually(t, func() bool { - outputs, err := walletClient.ListOutputs(false) - + lastSealedCkpt, err := bbnClient.LatestEpochFromStatus(ckpttypes.Sealed) if err != nil { return false } + return epoch <= lastSealedCkpt.RawCheckpoint.EpochNum + }, 1*time.Minute, 1*time.Second) - return len(outputs) >= n - }, eventuallyWaitTimeOut, eventuallyPollTime) -} + t.Logf("start finalizing epochs till %d", epoch) + // Random source for the generation of BTC data + // r := rand.New(rand.NewSource(time.Now().Unix())) -func GetAllMinedBtcHeadersSinceGenesis(t *testing.T, h *rpctest.Harness) []*wire.BlockHeader { - _, height, err := h.Client.GetBestBlock() + // get all checkpoints of these epochs + pagination := &sdkquerytypes.PageRequest{ + Key: ckpttypes.CkptsObjectKey(1), + Limit: epoch, + } + resp, err := bbnClient.RawCheckpoints(pagination) require.NoError(t, err) + require.Equal(t, int(epoch), len(resp.RawCheckpoints)) - var headers []*wire.BlockHeader + submitter := tm.BabylonClient.GetKeyAddress() - for i := 1; i <= int(height); i++ { - hash, err := h.Client.GetBlockHash(int64(i)) + for _, checkpoint := range resp.RawCheckpoints { + // currentBtcTipResp, err := tm.BabylonClient.QueryBtcLightClientTip() + // require.NoError(t, err) + // tipHeader, err := bbntypes.NewBTCHeaderBytesFromHex(currentBtcTipResp.HeaderHex) + // require.NoError(t, err) + + rawCheckpoint, err := checkpoint.Ckpt.ToRawCheckpoint() + require.NoError(t, err) + + btcCheckpoint, err := ckpttypes.FromRawCkptToBTCCkpt(rawCheckpoint, submitter) require.NoError(t, err) - header, err := h.Client.GetBlockHeader(hash) + + babylonTagBytes, err := hex.DecodeString("01020304") require.NoError(t, err) - headers = append(headers, header) + + p1, p2, err := txformat.EncodeCheckpointData( + babylonTagBytes, + txformat.CurrentVersion, + btcCheckpoint, + ) + + err = tm.Sa.Wallet().UnlockWallet(60) + require.NoError(t, err) + tx1, err := tm.Sa.Wallet().CreateAndSignTx( + []*wire.TxOut{ + wire.NewTxOut(0, opReturnScript(p1)), + }, + 2000, + tm.MinerAddr, + ) + require.NoError(t, err) + _, err = tm.Sa.Wallet().SendRawTransaction(tx1, true) + require.NoError(t, err) + + resp1 := tm.BitcoindHandler.GenerateBlocks(1) + + tx2, err := tm.Sa.Wallet().CreateAndSignTx( + []*wire.TxOut{ + wire.NewTxOut(0, opReturnScript(p2)), + }, + 2000, + tm.MinerAddr, + ) + require.NoError(t, err) + _, err = tm.Sa.Wallet().SendRawTransaction(tx2, true) + require.NoError(t, err) + resp2 := tm.BitcoindHandler.GenerateBlocks(1) + + block1Hash, err := chainhash.NewHashFromStr(resp1.Blocks[0]) + require.NoError(t, err) + block2Hash, err := chainhash.NewHashFromStr(resp2.Blocks[0]) + require.NoError(t, err) + + block1, err := tm.TestRpcClient.GetBlock(block1Hash) + require.NoError(t, err) + block2, err := tm.TestRpcClient.GetBlock(block2Hash) + require.NoError(t, err) + + _, err = tm.BabylonClient.InsertBtcBlockHeaders([]*wire.BlockHeader{ + &block1.Header, + &block2.Header, + }) + + header1Bytes := bbntypes.NewBTCHeaderBytesFromBlockHeader(&block1.Header) + header2Bytes := bbntypes.NewBTCHeaderBytesFromBlockHeader(&block2.Header) + + proof1, err := btcctypes.SpvProofFromHeaderAndTransactions(&header1Bytes, txsToBytes(block1.Transactions), 1) + require.NoError(t, err) + proof2, err := btcctypes.SpvProofFromHeaderAndTransactions(&header2Bytes, txsToBytes(block2.Transactions), 1) + require.NoError(t, err) + + _, err = tm.BabylonClient.InsertSpvProofs(submitter.String(), []*btcctypes.BTCSpvProof{ + proof1, + proof2, + }) + require.NoError(t, err) + + // // wait until this checkpoint is submitted + require.Eventually(t, func() bool { + ckpt, err := bbnClient.RawCheckpoint(checkpoint.Ckpt.EpochNum) + require.NoError(t, err) + return ckpt.RawCheckpoint.Status == ckpttypes.Submitted + }, eventuallyWaitTimeOut, eventuallyPollTime) } - return headers + tm.mineNEmptyBlocks(t, uint32(ckptParams.Params.CheckpointFinalizationTimeout), true) + + // // wait until the checkpoint of this epoch is finalised + require.Eventually(t, func() bool { + lastFinalizedCkpt, err := bbnClient.LatestEpochFromStatus(ckpttypes.Finalized) + if err != nil { + t.Logf("failed to get last finalized epoch: %v", err) + return false + } + return epoch <= lastFinalizedCkpt.RawCheckpoint.EpochNum + }, eventuallyWaitTimeOut, 1*time.Second) + + t.Logf("epoch %d is finalised", epoch) } -func (tm *TestManager) createAndRegisterFinalityProvider(t *testing.T, testStakingData *testStakingData) { - resp, err := tm.BabylonClient.QueryFinalityProviders(100, 0) +func (tm *TestManager) createAndRegisterFinalityProviders(t *testing.T, testStakingData *testStakingData) { + params, err := tm.BabylonClient.QueryStakingTracker() require.NoError(t, err) - // No providers yet - require.Len(t, resp.FinalityProviders, 0) - valResp, err := tm.BabylonClient.QueryFinalityProvider(testStakingData.FinalityProviderBtcKey) - require.Nil(t, valResp) - require.Error(t, err) - require.True(t, errors.Is(err, babylonclient.ErrFinalityProviderDoesNotExist)) - pop, err := btcstypes.NewPoP(testStakingData.FinalityProviderBabylonPrivKey, testStakingData.FinalityProviderBtcPrivKey) - require.NoError(t, err) + var regEpoch uint64 + for i := 0; i < testStakingData.GetNumRestakedFPs(); i++ { + // ensure the finality provider in testStakingData does not exist yet + fpResp, err := tm.BabylonClient.QueryFinalityProvider(testStakingData.FinalityProviderBtcKeys[i]) + require.Nil(t, fpResp) + require.Error(t, err) + require.True(t, errors.Is(err, babylonclient.ErrFinalityProviderDoesNotExist)) - btcValKey := bbntypes.NewBIP340PubKeyFromBTCPK(testStakingData.FinalityProviderBtcKey) + pop, err := btcstypes.NewPoP(testStakingData.FinalityProviderBabylonPrivKeys[i], testStakingData.FinalityProviderBtcPrivKeys[i]) + require.NoError(t, err) - params, err := tm.BabylonClient.QueryStakingTracker() - require.NoError(t, err) + btcFpKey := bbntypes.NewBIP340PubKeyFromBTCPK(testStakingData.FinalityProviderBtcKeys[i]) - _, err = tm.BabylonClient.RegisterFinalityProvider( - testStakingData.FinalityProviderBabylonPublicKey, - btcValKey, - ¶ms.MinComissionRate, - &sttypes.Description{ - Moniker: "tester", - }, - pop, - ) + // get current finality providers + resp, err := tm.BabylonClient.QueryFinalityProviders(100, 0) + require.NoError(t, err) + r = rand.New(rand.NewSource(time.Now().Unix())) + _, p, err := eots.NewMasterRandPair(r) + require.NoError(t, err) + // register the generated finality provider + _, err = tm.BabylonClient.RegisterFinalityProvider( + testStakingData.FinalityProviderBabylonPublicKeys[i], + btcFpKey, + ¶ms.MinComissionRate, + &sttypes.Description{ + Moniker: "tester", + }, + pop, + p.MarshalBase58(), + ) - resp, err = tm.BabylonClient.QueryFinalityProviders(100, 0) - require.NoError(t, err) - // After registration we should have one finality provider - require.Len(t, resp.FinalityProviders, 1) + resp2, err := tm.BabylonClient.QueryFinalityProviders(100, 0) + require.NoError(t, err) + + // After registration we should have one finality provider + require.Len(t, resp2.FinalityProviders, len(resp.FinalityProviders)+1) + + epoch, err := tm.BabylonClient.QueryFinalityProviderRegisteredEpoch(btcFpKey.MustToBTCPK()) + require.NoError(t, err) + regEpoch = epoch + } + + fmt.Printf("Wwaiting epoch %d to be registered\n", regEpoch) + tm.FinalizeUntilEpoch(t, regEpoch) } func (tm *TestManager) sendHeadersToBabylon(t *testing.T, headers []*wire.BlockHeader) { @@ -566,11 +633,15 @@ func (tm *TestManager) sendHeadersToBabylon(t *testing.T, headers []*wire.BlockH } func (tm *TestManager) mineNEmptyBlocks(t *testing.T, numHeaders uint32, sendToBabylon bool) []*wire.BlockHeader { + resp := tm.BitcoindHandler.GenerateBlocks(int(numHeaders)) var minedHeaders []*wire.BlockHeader - for i := 0; i < int(numHeaders); i++ { - bl := mineBlockWithTxs(t, tm.MinerNode, retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{})) - minedHeaders = append(minedHeaders, &bl.Header) + for _, hash := range resp.Blocks { + hash, err := chainhash.NewHashFromStr(hash) + require.NoError(t, err) + header, err := tm.TestRpcClient.GetBlockHeader(hash) + require.NoError(t, err) + minedHeaders = append(minedHeaders, header) } if sendToBabylon { @@ -580,13 +651,26 @@ func (tm *TestManager) mineNEmptyBlocks(t *testing.T, numHeaders uint32, sendToB return minedHeaders } +func (tm *TestManager) mineBlock(t *testing.T) *wire.MsgBlock { + resp := tm.BitcoindHandler.GenerateBlocks(1) + hash, err := chainhash.NewHashFromStr(resp.Blocks[0]) + require.NoError(t, err) + header, err := tm.TestRpcClient.GetBlock(hash) + require.NoError(t, err) + return header +} + func (tm *TestManager) sendStakingTx(t *testing.T, testStakingData *testStakingData) *chainhash.Hash { - fpKey := hex.EncodeToString(schnorr.SerializePubKey(testStakingData.FinalityProviderBtcKey)) + fpBTCPKs := []string{} + for i := 0; i < testStakingData.GetNumRestakedFPs(); i++ { + fpBTCPK := hex.EncodeToString(schnorr.SerializePubKey(testStakingData.FinalityProviderBtcKeys[i])) + fpBTCPKs = append(fpBTCPKs, fpBTCPK) + } res, err := tm.StakerClient.Stake( context.Background(), tm.MinerAddr.String(), testStakingData.StakingAmount, - []string{fpKey}, + fpBTCPKs, int64(testStakingData.StakingTime), ) require.NoError(t, err) @@ -601,11 +685,11 @@ func (tm *TestManager) sendStakingTx(t *testing.T, testStakingData *testStakingD require.NoError(t, err) require.Eventually(t, func() bool { - txFromMempool := retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{hashFromString}) + txFromMempool := retrieveTransactionFromMempool(t, tm.TestRpcClient, []*chainhash.Hash{hashFromString}) return len(txFromMempool) == 1 }, eventuallyWaitTimeOut, eventuallyPollTime) - mBlock := mineBlockWithTxs(t, tm.MinerNode, retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{hashFromString})) + mBlock := tm.mineBlock(t) require.Equal(t, 2, len(mBlock.Transactions)) _, err = tm.BabylonClient.InsertBtcBlockHeaders([]*wire.BlockHeader{&mBlock.Header}) @@ -617,12 +701,16 @@ func (tm *TestManager) sendStakingTx(t *testing.T, testStakingData *testStakingD func (tm *TestManager) sendMultipleStakingTx(t *testing.T, testStakingData []*testStakingData) []*chainhash.Hash { var hashes []*chainhash.Hash for _, data := range testStakingData { - fpKey := hex.EncodeToString(schnorr.SerializePubKey(data.FinalityProviderBtcKey)) + fpBTCPKs := []string{} + for i := 0; i < data.GetNumRestakedFPs(); i++ { + fpBTCPK := hex.EncodeToString(schnorr.SerializePubKey(data.FinalityProviderBtcKeys[i])) + fpBTCPKs = append(fpBTCPKs, fpBTCPK) + } res, err := tm.StakerClient.Stake( context.Background(), tm.MinerAddr.String(), data.StakingAmount, - []string{fpKey}, + fpBTCPKs, int64(data.StakingTime), ) require.NoError(t, err) @@ -640,7 +728,7 @@ func (tm *TestManager) sendMultipleStakingTx(t *testing.T, testStakingData []*te require.Equal(t, stakingDetails.StakingState, proto.TransactionState_SENT_TO_BTC.String()) } - mBlock := mineBlockWithTxs(t, tm.MinerNode, retrieveTransactionFromMempool(t, tm.MinerNode, hashes)) + mBlock := tm.mineBlock(t) require.Equal(t, len(hashes)+1, len(mBlock.Transactions)) _, err := tm.BabylonClient.InsertBtcBlockHeaders([]*wire.BlockHeader{&mBlock.Header}) @@ -657,12 +745,12 @@ func (tm *TestManager) sendWatchedStakingTx( stakingInfo, err := staking.BuildStakingInfo( testStakingData.StakerKey, - []*btcec.PublicKey{testStakingData.FinalityProviderBtcKey}, + testStakingData.FinalityProviderBtcKeys, params.CovenantPks, params.CovenantQuruomThreshold, testStakingData.StakingTime, btcutil.Amount(testStakingData.StakingAmount), - simnetParams, + regtestParams, ) require.NoError(t, err) @@ -682,7 +770,7 @@ func (tm *TestManager) sendWatchedStakingTx( // Wait for tx to be in mempool require.Eventually(t, func() bool { - tx, err := tm.MinerNode.Client.GetRawTransaction(&txHash) + tx, err := tm.TestRpcClient.GetRawTransaction(&txHash) if err != nil { return false } @@ -706,7 +794,7 @@ func (tm *TestManager) sendWatchedStakingTx( unbondingTme, int64(params.MinSlashingTxFeeSat)+10, params.SlashingRate, - simnetParams, + regtestParams, ) require.NoError(t, err) @@ -733,12 +821,12 @@ func (tm *TestManager) sendWatchedStakingTx( unbondingInfo, err := staking.BuildUnbondingInfo( testStakingData.StakerKey, - []*btcec.PublicKey{testStakingData.FinalityProviderBtcKey}, + testStakingData.FinalityProviderBtcKeys, params.CovenantPks, params.CovenantQuruomThreshold, unbondingTme, unbondingAmount, - simnetParams, + regtestParams, ) require.NoError(t, err) @@ -757,7 +845,7 @@ func (tm *TestManager) sendWatchedStakingTx( unbondingTme, int64(params.MinSlashingTxFeeSat)+10, params.SlashingRate, - simnetParams, + regtestParams, ) require.NoError(t, err) @@ -781,13 +869,18 @@ func (tm *TestManager) sendWatchedStakingTx( ) require.NoError(t, err) + fpBTCPKs := []string{} + for i := 0; i < testStakingData.GetNumRestakedFPs(); i++ { + fpBTCPK := hex.EncodeToString(schnorr.SerializePubKey(testStakingData.FinalityProviderBtcKeys[i])) + fpBTCPKs = append(fpBTCPKs, fpBTCPK) + } _, err = tm.StakerClient.WatchStaking( context.Background(), hex.EncodeToString(serializedStakingTx), int(testStakingData.StakingTime), int(testStakingData.StakingAmount), hex.EncodeToString(schnorr.SerializePubKey(testStakingData.StakerKey)), - []string{hex.EncodeToString(schnorr.SerializePubKey(testStakingData.FinalityProviderBtcKey))}, + fpBTCPKs, hex.EncodeToString(serializedSlashingTx), hex.EncodeToString(slashSig.Serialize()), hex.EncodeToString(testStakingData.StakerBabylonPubKey.Key), @@ -803,7 +896,10 @@ func (tm *TestManager) sendWatchedStakingTx( ) require.NoError(t, err) - mBlock := mineBlockWithTxs(t, tm.MinerNode, retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{&txHash})) + txs := retrieveTransactionFromMempool(t, tm.TestRpcClient, []*chainhash.Hash{&txHash}) + require.Len(t, txs, 1) + + mBlock := tm.mineBlock(t) require.Equal(t, 2, len(mBlock.Transactions)) _, err = tm.BabylonClient.InsertBtcBlockHeaders([]*wire.BlockHeader{&mBlock.Header}) require.NoError(t, err) @@ -822,11 +918,11 @@ func (tm *TestManager) spendStakingTxWithHash(t *testing.T, stakingTxHash *chain spendTxValue := btcutil.Amount(iAmount) require.Eventually(t, func() bool { - txFromMempool := retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{spendTxHash}) + txFromMempool := retrieveTransactionFromMempool(t, tm.TestRpcClient, []*chainhash.Hash{spendTxHash}) return len(txFromMempool) == 1 }, eventuallyWaitTimeOut, eventuallyPollTime) - sendTx := retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{spendTxHash})[0] + sendTx := retrieveTransactionFromMempool(t, tm.TestRpcClient, []*chainhash.Hash{spendTxHash})[0] // Tx is in mempool txDetails, txState, err := tm.Sa.Wallet().TxDetails(spendTxHash, sendTx.MsgTx().TxOut[0].PkScript) @@ -835,7 +931,7 @@ func (tm *TestManager) spendStakingTxWithHash(t *testing.T, stakingTxHash *chain require.Equal(t, txState, walletcontroller.TxInMemPool) // Block with spend is mined - mBlock1 := mineBlockWithTxs(t, tm.MinerNode, retrieveTransactionFromMempool(t, tm.MinerNode, []*chainhash.Hash{spendTxHash})) + mBlock1 := tm.mineBlock(t) require.Equal(t, 2, len(mBlock1.Transactions)) // Tx is in chain @@ -873,15 +969,20 @@ func (tm *TestManager) walletUnspentsOutputsContainsOutput(t *testing.T, from bt } func (tm *TestManager) insertAllMinedBlocksToBabylon(t *testing.T) { - headers := GetAllMinedBtcHeadersSinceGenesis(t, tm.MinerNode) + headers := GetAllMinedBtcHeadersSinceGenesis(t, tm.TestRpcClient) _, err := tm.BabylonClient.InsertBtcBlockHeaders(headers) require.NoError(t, err) } -func (tm *TestManager) insertCovenantSigForDelegation(t *testing.T, btcDel *btcstypes.BTCDelegation) { - slashingTx := btcDel.SlashingTx - stakingTx := btcDel.StakingTx - stakingMsgTx, err := bbntypes.NewBTCTxFromBytes(stakingTx) +func (tm *TestManager) insertCovenantSigForDelegation(t *testing.T, btcDel *btcstypes.BTCDelegationResponse) { + fpBTCPKs, err := bbntypes.NewBTCPKsFromBIP340PKs(btcDel.FpBtcPkList) + require.NoError(t, err) + + slashingTxBytes, err := hex.DecodeString(btcDel.SlashingTxHex) + require.NoError(t, err) + slashingTx := btcstypes.BTCSlashingTx(slashingTxBytes) + stakingTx := btcDel.StakingTxHex + stakingMsgTx, _, err := bbntypes.NewBTCTxFromHex(stakingTx) require.NoError(t, err) cl := tm.Sa.BabylonController() @@ -890,120 +991,79 @@ func (tm *TestManager) insertCovenantSigForDelegation(t *testing.T, btcDel *btcs stakingInfo, err := staking.BuildStakingInfo( btcDel.BtcPk.MustToBTCPK(), - // TODO: Handle multplie providers - []*btcec.PublicKey{btcDel.FpBtcPkList[0].MustToBTCPK()}, + fpBTCPKs, params.CovenantPks, params.CovenantQuruomThreshold, - btcDel.GetStakingTime(), + uint16(btcDel.EndHeight-btcDel.StartHeight), btcutil.Amount(btcDel.TotalSat), - simnetParams, + regtestParams, ) - stakingTxUnbondingPathInfo, err := stakingInfo.UnbondingPathSpendInfo() - require.NoError(t, err) - - idx, err := bbntypes.GetOutputIdxInBTCTx(stakingMsgTx, stakingInfo.StakingOutput) - require.NoError(t, err) - - require.NoError(t, err) slashingPathInfo, err := stakingInfo.SlashingPathSpendInfo() require.NoError(t, err) - // get covenant private key from the keyring - valEncKey, err := asig.NewEncryptionKeyFromBTCPK(btcDel.FpBtcPkList[0].MustToBTCPK()) + + covenantSlashingTxSigs, err := datagen.GenCovenantAdaptorSigs( + tm.CovenantPrivKeys, + fpBTCPKs, + stakingMsgTx, + slashingPathInfo.GetPkScriptPath(), + &slashingTx, + ) require.NoError(t, err) - unbondingMsgTx, err := bbntypes.NewBTCTxFromBytes(btcDel.BtcUndelegation.UnbondingTx) + // slash unbonding tx spends unbonding tx + unbondingMsgTx, _, err := bbntypes.NewBTCTxFromHex(btcDel.UndelegationResponse.UnbondingTxHex) require.NoError(t, err) unbondingInfo, err := staking.BuildUnbondingInfo( btcDel.BtcPk.MustToBTCPK(), - []*btcec.PublicKey{btcDel.FpBtcPkList[0].MustToBTCPK()}, + fpBTCPKs, params.CovenantPks, params.CovenantQuruomThreshold, uint16(btcDel.UnbondingTime), btcutil.Amount(unbondingMsgTx.TxOut[0].Value), - simnetParams, - ) - require.NoError(t, err) - - // Covenant 0 signatures - covenantAdaptorStakingSlashing1, err := slashingTx.EncSign( - stakingMsgTx, - idx, - slashingPathInfo.RevealedLeaf.Script, - tm.CovenantPrivKeys[0], - valEncKey, - ) - covenantUnbondingSig1, err := staking.SignTxWithOneScriptSpendInputFromTapLeaf( - unbondingMsgTx, - stakingInfo.StakingOutput, - tm.CovenantPrivKeys[0], - stakingTxUnbondingPathInfo.RevealedLeaf, + regtestParams, ) + unbondingSlashingPathInfo, err := unbondingInfo.SlashingPathSpendInfo() require.NoError(t, err) - unbondingSig1 := bbntypes.NewBIP340SignatureFromBTCSig(covenantUnbondingSig1) - // slashing unbonding tx sig - unbondingTxSlashingPathInfo, err := unbondingInfo.SlashingPathSpendInfo() + // generate all covenant signatures from all covenant members + unbondingSlashingTx, err := btcstypes.NewBTCSlashingTxFromHex(btcDel.UndelegationResponse.SlashingTxHex) require.NoError(t, err) - covenantAdaptorUnbondingSlashing1, err := btcDel.BtcUndelegation.SlashingTx.EncSign( + covenantUnbondingSlashingTxSigs, err := datagen.GenCovenantAdaptorSigs( + tm.CovenantPrivKeys, + fpBTCPKs, unbondingMsgTx, - 0, - unbondingTxSlashingPathInfo.RevealedLeaf.Script, - tm.CovenantPrivKeys[0], - valEncKey, + unbondingSlashingPathInfo.GetPkScriptPath(), + unbondingSlashingTx, ) require.NoError(t, err) - _, err = tm.BabylonClient.SubmitCovenantSig( - bbntypes.NewBIP340PubKeyFromBTCPK(tm.CovenantPrivKeys[0].PubKey()), - stakingMsgTx.TxHash().String(), - [][]byte{covenantAdaptorStakingSlashing1.MustMarshal()}, - unbondingSig1, - [][]byte{covenantAdaptorUnbondingSlashing1.MustMarshal()}, - ) + // each covenant member submits signatures + unbondingPathInfo, err := stakingInfo.UnbondingPathSpendInfo() require.NoError(t, err) - - // Covenant 1 signatures - covenantAdaptorStakingSlashing2, err := slashingTx.EncSign( + covUnbondingSigs, err := datagen.GenCovenantUnbondingSigs( + tm.CovenantPrivKeys, stakingMsgTx, - idx, - slashingPathInfo.RevealedLeaf.Script, - tm.CovenantPrivKeys[1], - valEncKey, - ) - covenantUnbondingSig2, err := staking.SignTxWithOneScriptSpendInputFromTapLeaf( + btcDel.StakingOutputIdx, + unbondingPathInfo.GetPkScriptPath(), unbondingMsgTx, - stakingInfo.StakingOutput, - tm.CovenantPrivKeys[1], - stakingTxUnbondingPathInfo.RevealedLeaf, ) require.NoError(t, err) - unbondingSig2 := bbntypes.NewBIP340SignatureFromBTCSig(covenantUnbondingSig2) - // slashing unbonding tx sig - - covenantAdaptorUnbondingSlashing2, err := btcDel.BtcUndelegation.SlashingTx.EncSign( - unbondingMsgTx, - 0, - unbondingTxSlashingPathInfo.RevealedLeaf.Script, - tm.CovenantPrivKeys[1], - valEncKey, - ) - require.NoError(t, err) - - require.NoError(t, err) - _, err = tm.BabylonClient.SubmitCovenantSig( - bbntypes.NewBIP340PubKeyFromBTCPK(tm.CovenantPrivKeys[1].PubKey()), - stakingMsgTx.TxHash().String(), - [][]byte{covenantAdaptorStakingSlashing2.MustMarshal()}, - unbondingSig2, - [][]byte{covenantAdaptorUnbondingSlashing2.MustMarshal()}, - ) - require.NoError(t, err) + for i := 0; i < len(tm.CovenantPrivKeys); i++ { + _, err = tm.BabylonClient.SubmitCovenantSig( + bbntypes.NewBIP340PubKeyFromBTCPK(tm.CovenantPrivKeys[i].PubKey()), + stakingMsgTx.TxHash().String(), + covenantSlashingTxSigs[i].AdaptorSigs, + bbntypes.NewBIP340SignatureFromBTCSig(covUnbondingSigs[i]), + covenantUnbondingSlashingTxSigs[i].AdaptorSigs, + ) + require.NoError(t, err) + } } func TestStakingFailures(t *testing.T) { numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1012,10 +1072,10 @@ func TestStakingFailures(t *testing.T) { require.NoError(t, err) stakingTime := uint16(staker.GetMinStakingTime(params)) - testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000) - fpKey := hex.EncodeToString(schnorr.SerializePubKey(testStakingData.FinalityProviderBtcKey)) + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000, 1) + fpKey := hex.EncodeToString(schnorr.SerializePubKey(testStakingData.FinalityProviderBtcKeys[0])) - tm.createAndRegisterFinalityProvider(t, testStakingData) + tm.createAndRegisterFinalityProviders(t, testStakingData) // Duplicated provider key _, err = tm.StakerClient.Stake( @@ -1043,7 +1103,7 @@ func TestSendingStakingTransaction(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1052,7 +1112,7 @@ func TestSendingStakingTransaction(t *testing.T) { require.NoError(t, err) stakingTime := uint16(staker.GetMinStakingTime(params)) - testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000) + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000, 1) hashed, err := chainhash.NewHash(datagen.GenRandomByteArray(r, 32)) require.NoError(t, err) @@ -1063,7 +1123,7 @@ func TestSendingStakingTransaction(t *testing.T) { require.NoError(t, erro) require.Equal(t, st, walletcontroller.TxNotFound) - tm.createAndRegisterFinalityProvider(t, testStakingData) + tm.createAndRegisterFinalityProviders(t, testStakingData) txHash := tm.sendStakingTx(t, testStakingData) @@ -1118,7 +1178,7 @@ func TestMultipleWithdrawableStakingTransactions(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1132,13 +1192,13 @@ func TestMultipleWithdrawableStakingTransactions(t *testing.T) { stakingTime4 := minStakingTime + 2 stakingTime5 := minStakingTime + 3 - testStakingData1 := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime1, 10000) + testStakingData1 := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime1, 10000, 1) testStakingData2 := testStakingData1.withStakingTime(stakingTime2) testStakingData3 := testStakingData1.withStakingTime(stakingTime3) testStakingData4 := testStakingData1.withStakingTime(stakingTime4) testStakingData5 := testStakingData1.withStakingTime(stakingTime5) - tm.createAndRegisterFinalityProvider(t, testStakingData1) + tm.createAndRegisterFinalityProviders(t, testStakingData1) txHashes := tm.sendMultipleStakingTx(t, []*testStakingData{ testStakingData1, testStakingData2, @@ -1184,7 +1244,7 @@ func TestSendingWatchedStakingTransaction(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1192,9 +1252,9 @@ func TestSendingWatchedStakingTransaction(t *testing.T) { params, err := cl.Params() require.NoError(t, err) stakingTime := uint16(staker.GetMinStakingTime(params)) - testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000) + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000, 1) - tm.createAndRegisterFinalityProvider(t, testStakingData) + tm.createAndRegisterFinalityProviders(t, testStakingData) txHash := tm.sendWatchedStakingTx(t, testStakingData, params) go tm.mineNEmptyBlocks(t, params.ConfirmationTimeBlocks, true) @@ -1206,7 +1266,7 @@ func TestRestartingTxNotDeepEnough(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1214,9 +1274,9 @@ func TestRestartingTxNotDeepEnough(t *testing.T) { params, err := cl.Params() require.NoError(t, err) stakingTime := uint16(staker.GetMinStakingTime(params)) - testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000) + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000, 1) - tm.createAndRegisterFinalityProvider(t, testStakingData) + tm.createAndRegisterFinalityProviders(t, testStakingData) txHash := tm.sendStakingTx(t, testStakingData) // restart app when tx is not deep enough @@ -1231,7 +1291,7 @@ func TestRestartingTxNotOnBabylon(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1240,10 +1300,10 @@ func TestRestartingTxNotOnBabylon(t *testing.T) { require.NoError(t, err) stakingTime := uint16(staker.GetMinStakingTime(params)) - testStakingData1 := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000) + testStakingData1 := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000, 1) testStakingData2 := testStakingData1.withStakingAmout(11000) - tm.createAndRegisterFinalityProvider(t, testStakingData1) + tm.createAndRegisterFinalityProviders(t, testStakingData1) txHashes := tm.sendMultipleStakingTx(t, []*testStakingData{ testStakingData1, @@ -1273,7 +1333,7 @@ func TestStakingUnbonding(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1282,9 +1342,9 @@ func TestStakingUnbonding(t *testing.T) { require.NoError(t, err) // large staking time stakingTime := uint16(1000) - testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 50000) + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 50000, 1) - tm.createAndRegisterFinalityProvider(t, testStakingData) + tm.createAndRegisterFinalityProviders(t, testStakingData) txHash := tm.sendStakingTx(t, testStakingData) @@ -1308,7 +1368,7 @@ func TestStakingUnbonding(t *testing.T) { require.NoError(t, err) require.Eventually(t, func() bool { - tx, err := tm.MinerNode.Client.GetRawTransaction(unbondingTxHash) + tx, err := tm.TestRpcClient.GetRawTransaction(unbondingTxHash) if err != nil { return false } @@ -1320,9 +1380,8 @@ func TestStakingUnbonding(t *testing.T) { return true }, 1*time.Minute, eventuallyPollTime) - tx, err := tm.MinerNode.Client.GetRawTransaction(unbondingTxHash) - require.NoError(t, err) - block := mineBlockWithTxs(t, tm.MinerNode, []*btcutil.Tx{tx}) + + block := tm.mineBlock(t) require.Equal(t, 2, len(block.Transactions)) require.Equal(t, block.Transactions[1].TxHash(), *unbondingTxHash) go tm.mineNEmptyBlocks(t, staker.UnbondingTxConfirmations, false) @@ -1345,7 +1404,7 @@ func TestUnbondingRestartWaitingForSignatures(t *testing.T) { // Mature output is out which has 100 confirmations, which means 200mature outputs // will generate 300 blocks numMatureOutputs := uint32(200) - tm := StartManager(t, numMatureOutputs, 2, nil) + tm := StartManager(t, numMatureOutputs) defer tm.Stop(t) tm.insertAllMinedBlocksToBabylon(t) @@ -1354,9 +1413,9 @@ func TestUnbondingRestartWaitingForSignatures(t *testing.T) { require.NoError(t, err) // large staking time stakingTime := uint16(1000) - testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 50000) + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 50000, 1) - tm.createAndRegisterFinalityProvider(t, testStakingData) + tm.createAndRegisterFinalityProviders(t, testStakingData) txHash := tm.sendStakingTx(t, testStakingData) @@ -1382,7 +1441,7 @@ func TestUnbondingRestartWaitingForSignatures(t *testing.T) { require.NoError(t, err) require.Eventually(t, func() bool { - tx, err := tm.MinerNode.Client.GetRawTransaction(unbondingTxHash) + tx, err := tm.TestRpcClient.GetRawTransaction(unbondingTxHash) if err != nil { return false } @@ -1395,13 +1454,131 @@ func TestUnbondingRestartWaitingForSignatures(t *testing.T) { return true }, 1*time.Minute, eventuallyPollTime) - // mine tx into the block - tx, err := tm.MinerNode.Client.GetRawTransaction(unbondingTxHash) - require.NoError(t, err) - block := mineBlockWithTxs(t, tm.MinerNode, []*btcutil.Tx{tx}) + block := tm.mineBlock(t) require.Equal(t, 2, len(block.Transactions)) require.Equal(t, block.Transactions[1].TxHash(), *unbondingTxHash) go tm.mineNEmptyBlocks(t, staker.UnbondingTxConfirmations, false) tm.waitForStakingTxState(t, txHash, proto.TransactionState_UNBONDING_CONFIRMED_ON_BTC) } + +func containsOutput(outputs []walletcontroller.Utxo, address string, amount btcutil.Amount) bool { + for _, o := range outputs { + if o.Address == address && o.Amount == amount { + return true + } + } + return false +} + +func TestBitcoindWalletRpcApi(t *testing.T) { + h := NewBitcoindHandler(t) + h.Start() + passphrase := "pass" + numMatureOutputs := 1 + _ = h.CreateWallet("test-wallet", passphrase) + // only outputs which are 100 deep are mature + _ = h.GenerateBlocks(numMatureOutputs + 100) + + // hardcoded config + scfg := stakercfg.DefaultConfig() + scfg.WalletRpcConfig.Host = "127.0.0.1:18443" + scfg.WalletRpcConfig.User = "user" + scfg.WalletRpcConfig.Pass = "pass" + scfg.ActiveNetParams.Name = "regtest" + scfg.WalletConfig.WalletPass = passphrase + scfg.BtcNodeBackendConfig.ActiveWalletBackend = types.BitcoindWalletBackend + scfg.ActiveNetParams = chaincfg.RegressionNetParams + + // Create wallet controller the same way as in staker program + wc, err := walletcontroller.NewRpcWalletController(&scfg) + require.NoError(t, err) + + outputs, err := wc.ListOutputs(true) + require.NoError(t, err) + require.Len(t, outputs, numMatureOutputs) + + // easiest way to get address controlled by wallet is to retrive address from one + // of the outputs + output := outputs[0] + walletAddress, err := btcutil.DecodeAddress(output.Address, &scfg.ActiveNetParams) + require.NoError(t, err) + payScript, err := txscript.PayToAddrScript(walletAddress) + require.NoError(t, err) + + // split this output into two: 49 and 1 BTC + toSend, err := btcutil.NewAmount(1) + require.NoError(t, err) + newOutput := wire.NewTxOut(int64(toSend), payScript) + err = wc.UnlockWallet(20) + require.NoError(t, err) + + // create transaction which shouls split one of the wallet outputs into two + tx, err := wc.CreateAndSignTx( + []*wire.TxOut{newOutput}, + btcutil.Amount(2000), + walletAddress, + ) + require.NoError(t, err) + + // send transaction to bitcoin node, it should be accepted + txHash, err := wc.SendRawTransaction( + tx, + false, + ) + require.NoError(t, err) + + // generates enough blocks to make tx mature + h.GenerateBlocks(10) + outputs, err = wc.ListOutputs(true) + require.NoError(t, err) + + // check that our wallet contains new output which should have 1 BTC + require.True(t, containsOutput(outputs, walletAddress.EncodeAddress(), toSend), "Not found expected output") + + // check that tx is registered on node side. It requires maintaining txindex + _, status, err := wc.TxDetails(txHash, payScript) + require.NoError(t, err) + require.Equal(t, walletcontroller.TxInChain, status) +} + +func TestSendingStakingTransaction_Restaking(t *testing.T) { + // need to have at least 300 block on testnet as only then segwit is activated. + // Mature output is out which has 100 confirmations, which means 200mature outputs + // will generate 300 blocks + numMatureOutputs := uint32(200) + tm := StartManager(t, numMatureOutputs) + defer tm.Stop(t) + tm.insertAllMinedBlocksToBabylon(t) + + cl := tm.Sa.BabylonController() + params, err := cl.Params() + require.NoError(t, err) + stakingTime := uint16(staker.GetMinStakingTime(params)) + + // restaked to 5 finality providers + testStakingData := tm.getTestStakingData(t, tm.WalletPrivKey.PubKey(), stakingTime, 10000, 5) + + hashed, err := chainhash.NewHash(datagen.GenRandomByteArray(r, 32)) + require.NoError(t, err) + scr, err := txscript.PayToTaprootScript(tm.CovenantPrivKeys[0].PubKey()) + require.NoError(t, err) + _, st, erro := tm.Sa.Wallet().TxDetails(hashed, scr) + // query for exsisting tx is not an error, proper state should be returned + require.NoError(t, erro) + require.Equal(t, st, walletcontroller.TxNotFound) + + tm.createAndRegisterFinalityProviders(t, testStakingData) + + txHash := tm.sendStakingTx(t, testStakingData) + + go tm.mineNEmptyBlocks(t, params.ConfirmationTimeBlocks, true) + tm.waitForStakingTxState(t, txHash, proto.TransactionState_SENT_TO_BABYLON) + + pend, err := tm.BabylonClient.QueryPendingBTCDelegations() + require.NoError(t, err) + require.Len(t, pend, 1) + // need to activate delegation to unbond + tm.insertCovenantSigForDelegation(t, pend[0]) + tm.waitForStakingTxState(t, txHash, proto.TransactionState_DELEGATION_ACTIVE) +} diff --git a/metrics/prometheus.go b/metrics/prometheus.go new file mode 100644 index 0000000..f6b157c --- /dev/null +++ b/metrics/prometheus.go @@ -0,0 +1,42 @@ +package metrics + +import ( + "errors" + "net/http" + _ "net/http/pprof" + "regexp" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" + "github.com/prometheus/client_golang/prometheus/promhttp" + "github.com/sirupsen/logrus" +) + +func Start(logger *logrus.Logger, addr string, reg *prometheus.Registry) { + go start(logger, addr, reg) +} + +func start(logger *logrus.Logger, addr string, reg *prometheus.Registry) { + // Add Go module build info. + reg.MustRegister(collectors.NewBuildInfoCollector()) + reg.MustRegister(collectors.NewGoCollector( + collectors.WithGoCollectorRuntimeMetrics(collectors.GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")})), + ) + + // Expose the registered metrics via HTTP. + http.Handle("/metrics", promhttp.HandlerFor( + reg, + promhttp.HandlerOpts{ + // Opt into OpenMetrics to support exemplars. + EnableOpenMetrics: true, + }, + )) + + logger.Infof("Successfully started Prometheus metrics server at %s", addr) + + err := http.ListenAndServe(addr, nil) + + if err != nil && !errors.Is(err, http.ErrServerClosed) { + logger.Errorf("prometheus server got err: %v", err) + } +} diff --git a/metrics/staker.go b/metrics/staker.go new file mode 100644 index 0000000..6bfcbaf --- /dev/null +++ b/metrics/staker.go @@ -0,0 +1,50 @@ +package metrics + +import ( + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" +) + +type StakerMetrics struct { + Registry *prometheus.Registry + ValidReceivedDelegationRequests prometheus.Counter + DelegationsConfirmedOnBtc prometheus.Counter + DelegationsSentToBabylon prometheus.Counter + DelegationsActivatedOnBabylon prometheus.Counter + NumberOfFatalErrors prometheus.Counter + CurrentBtcBlockHeight prometheus.Gauge +} + +func NewStakerMetrics() *StakerMetrics { + registry := prometheus.NewRegistry() + registerer := promauto.With(registry) + + metrics := &StakerMetrics{ + Registry: registry, + ValidReceivedDelegationRequests: registerer.NewCounter(prometheus.CounterOpts{ + Name: "staker_valid_received_delegation_requests", + Help: "Total number of received valid delegation requests", + }), + DelegationsConfirmedOnBtc: registerer.NewCounter(prometheus.CounterOpts{ + Name: "staker_delegations_confirmed_on_btc", + Help: "Total number of delegations confirmed on btc", + }), + DelegationsSentToBabylon: registerer.NewCounter(prometheus.CounterOpts{ + Name: "staker_delegations_send_to_babylon", + Help: "Total number of delegations sent to babylon", + }), + DelegationsActivatedOnBabylon: registerer.NewCounter(prometheus.CounterOpts{ + Name: "staker_delegations_activated_on_babylon", + Help: "Total number of delegations activated on babylon", + }), + NumberOfFatalErrors: registerer.NewCounter(prometheus.CounterOpts{ + Name: "staker_number_of_fatal_errors", + Help: "Total number of fatal errors received", + }), + CurrentBtcBlockHeight: registerer.NewGauge(prometheus.GaugeOpts{ + Name: "staker_current_btc_block_height", + Help: "Current block height of the btc chain", + }), + } + return metrics +} diff --git a/scripts/update_changelog.sh b/scripts/update_changelog.sh new file mode 100755 index 0000000..cb35c5c --- /dev/null +++ b/scripts/update_changelog.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# This is a wrapper around `github_changelog_generator` (https://github.com/github-changelog-generator) +# to simplify / automate updating of the CHANGELOG.md file. +# +# Originally developed for CosmWasm cw_plus (https://github.com/CosmWasm/cw-plus) repository. +set -o errexit -o pipefail + +ORIGINAL_OPTS=$* +# Requires getopt from util-linux 2.37.4 (brew install gnu-getopt on Mac) +OPTS=$(getopt -l "help,release-branch:,since-tag:,future-release:,full,token:" -o "hft" -- "$@") || exit 1 + +function print_usage() { + echo -e "Usage: $0 [-h|--help] [-f|--full] [--release-branch ] [--since-tag ] [--future-release] [-t|--token ] + +-h, --help Display help. +-f, --full Process changes since the beginning (by default: since latest git version tag). +--since-tag Process changes since git version tag (by default: since latest git version tag). +--future-release Put the unreleased changes in the specified . +--release-branch Limit pull requests to the release branch . +--token Pass changelog github token ." +} + +function remove_opt() { + ORIGINAL_OPTS=$(echo "$ORIGINAL_OPTS" | sed "s/\\B$1\\b//") +} + +eval set -- "$OPTS" +while true +do +case $1 in + -h|--help) + print_usage + exit 0 + ;; + --since-tag) + shift + TAG="$1" + ;; + -f|--full) + TAG="" + remove_opt $1 + ;; + --) + shift + break + ;; +esac +shift +done + +# Get user and repo from ./.git/config +ORIGIN_URL=$(git config --local remote.origin.url) +GITHUB_USER=$(echo $ORIGIN_URL | sed -n 's#.*:\([^\/]*\)\/.*#\1#p') +echo "Github user: $GITHUB_USER" +GITHUB_REPO=$(echo $ORIGIN_URL | sed -n 's#.*/\([^.]*\).*#\1#p') +echo "Github repo: $GITHUB_REPO" + +if [ -z "$TAG" ] +then + # Use latest git version tag + TAG=$(git tag --sort=creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | tail -1) + ORIGINAL_OPTS="$ORIGINAL_OPTS --since-tag $TAG" +fi + +echo "Git version tag: $TAG" + +touch CHANGELOG.md +cp CHANGELOG.md /tmp/CHANGELOG.md.$$ +# Consolidate tag for matching changelog entries +TAG=$(echo "$TAG" | sed -e 's/-\([A-Za-z]*\)[^A-Za-z]*/-\1/' -e 's/-$//') +echo "Consolidated tag: $TAG" +sed -i -n "/^## \\[${TAG}[^]]*\\]/,\$p" CHANGELOG.md + +echo github_changelog_generator -u $GITHUB_USER -p $GITHUB_REPO --base CHANGELOG.md $ORIGINAL_OPTS || cp /tmp/CHANGELOG.md.$$ CHANGELOG.md +github_changelog_generator -u $GITHUB_USER -p $GITHUB_REPO --base CHANGELOG.md $ORIGINAL_OPTS || cp /tmp/CHANGELOG.md.$$ CHANGELOG.md + +rm -f /tmp/CHANGELOG.md.$$ diff --git a/staker/stakerapp.go b/staker/stakerapp.go index 05be6e2..a6f46d4 100644 --- a/staker/stakerapp.go +++ b/staker/stakerapp.go @@ -14,6 +14,7 @@ import ( "github.com/avast/retry-go/v4" staking "github.com/babylonchain/babylon/btcstaking" cl "github.com/babylonchain/btc-staker/babylonclient" + "github.com/babylonchain/btc-staker/metrics" "github.com/babylonchain/btc-staker/proto" scfg "github.com/babylonchain/btc-staker/stakercfg" "github.com/babylonchain/btc-staker/stakerdb" @@ -140,6 +141,7 @@ type StakerApp struct { logger *logrus.Logger txTracker *stakerdb.TrackedTransactionStore babylonMsgSender *cl.BabylonMsgSender + m *metrics.StakerMetrics stakingRequestedEvChan chan *stakingRequestedEvent stakingTxBtcConfirmedEvChan chan *stakingTxBtcConfirmedEvent @@ -156,6 +158,7 @@ func NewStakerAppFromConfig( logger *logrus.Logger, rpcClientLogger *zap.Logger, db kvdb.Backend, + m *metrics.StakerMetrics, ) (*StakerApp, error) { // TODO: If we want to support multiple wallet types, this is most probably the place to decide // on concrete implementation @@ -206,7 +209,7 @@ func NewStakerAppFromConfig( return nil, fmt.Errorf("unknown fee estimation mode: %d", config.BtcNodeBackendConfig.EstimationMode) } - babylonMsgSender := cl.NewBabylonMsgSender(babylonClient, logger) + babylonMsgSender := cl.NewBabylonMsgSender(babylonClient, logger, config.StakerConfig.MaxConcurrentTransactions) return NewStakerAppFromDeps( config, @@ -217,6 +220,7 @@ func NewStakerAppFromConfig( feeEstimator, tracker, babylonMsgSender, + m, ) } @@ -229,6 +233,7 @@ func NewStakerAppFromDeps( feeEestimator FeeEstimator, tracker *stakerdb.TrackedTransactionStore, babylonMsgSender *cl.BabylonMsgSender, + metrics *metrics.StakerMetrics, ) (*StakerApp, error) { return &StakerApp{ babylonClient: cl, @@ -238,6 +243,7 @@ func NewStakerAppFromDeps( network: &config.ActiveNetParams, txTracker: tracker, babylonMsgSender: babylonMsgSender, + m: metrics, config: config, logger: logger, quit: make(chan struct{}), @@ -332,6 +338,7 @@ func (app *StakerApp) handleNewBlocks(blockNotifier *notifier.BlockEpochEvent) { if !ok { return } + app.m.CurrentBtcBlockHeight.Set(float64(block.Height)) app.currentBestBlockHeight.Store(uint32(block.Height)) app.logger.WithFields(logrus.Fields{ @@ -1008,9 +1015,7 @@ func (app *StakerApp) buildAndSendDelegation( if err != nil { return nil, nil, err } - resp, err := app.babylonMsgSender.SendDelegation(delegation, req.requiredInclusionBlockDepth) - if err != nil { return nil, nil, err } @@ -1138,6 +1143,7 @@ func (app *StakerApp) handleStakingEvents() { continue } + app.m.ValidReceivedDelegationRequests.Inc() ev.successChan <- &ev.stakingTxHash app.logStakingEventProcessed(ev) @@ -1163,6 +1169,7 @@ func (app *StakerApp) handleStakingEvents() { storedTx, stakerAddress := app.mustGetTransactionAndStakerAddress(&ev.stakingTxHash) + app.m.DelegationsConfirmedOnBtc.Inc() // TODO: Introduce max number of sendToDelegationToBabylonTasks. It should be tied to // accepting new staking delegations i.e we will hit it we should stop accepting new stakingrequests // as either babylon node is not healthy or we are constructing invalid delegations @@ -1178,6 +1185,7 @@ func (app *StakerApp) handleStakingEvents() { app.logger.Fatalf("Error setting state for tx %s: %s", ev.stakingTxHash, err) } + app.m.DelegationsSentToBabylon.Inc() // start checking for covenant signatures on unbodning transactions // when we receive them we treat delegation as active app.wg.Add(1) @@ -1196,6 +1204,7 @@ func (app *StakerApp) handleStakingEvents() { app.logger.Fatalf("Error setting state for tx %s: %s", &ev.stakingTxHash, err) } + app.m.DelegationsActivatedOnBabylon.Inc() app.logStakingEventProcessed(ev) case ev := <-app.unbondingTxConfirmedOnBtcEvChan: @@ -1227,6 +1236,8 @@ func (app *StakerApp) handleStakingEvents() { continue } + app.m.NumberOfFatalErrors.Inc() + // if app is configured to fail on critical error, just kill it, user then // can investigate and restart it, and delegation process should continue // from correct state diff --git a/staker/types.go b/staker/types.go index c5a9967..c841505 100644 --- a/staker/types.go +++ b/staker/types.go @@ -546,10 +546,9 @@ func parseWatchStakingRequest( // 4. Check slashig tx sig is good. It implicitly verify staker pubkey, as script // contain it. - err = staking.VerifyTransactionSigWithOutputData( + err = staking.VerifyTransactionSigWithOutput( slashingTx, - stakingTx.TxOut[stakingOutputIdx].PkScript, - stakingTx.TxOut[stakingOutputIdx].Value, + stakingTx.TxOut[stakingOutputIdx], stakingTxSlashingPathInfo.RevealedLeaf.Script, stakerBtcPk, slashingTxSig.Serialize(), @@ -612,10 +611,9 @@ func parseWatchStakingRequest( return nil, fmt.Errorf("failed to watch staking tx. Invalid unbonding slashing path info: %w", err) } - err = staking.VerifyTransactionSigWithOutputData( + err = staking.VerifyTransactionSigWithOutput( slashUnbondingTx, - unbondingTx.TxOut[0].PkScript, - unbondingTx.TxOut[0].Value, + unbondingTx.TxOut[0], unbondingSlashingInfo.RevealedLeaf.Script, stakerBtcPk, slashUnbondingTxSig.Serialize(), diff --git a/stakercfg/babylon.go b/stakercfg/babylon.go index 1e9caf0..6f94f3b 100644 --- a/stakercfg/babylon.go +++ b/stakercfg/babylon.go @@ -3,7 +3,7 @@ package stakercfg import ( "time" - bbncfg "github.com/babylonchain/rpc-client/config" + bbncfg "github.com/babylonchain/babylon/client/config" ) type BBNConfig struct { diff --git a/stakercfg/config.go b/stakercfg/config.go index 41837df..630cc0a 100644 --- a/stakercfg/config.go +++ b/stakercfg/config.go @@ -80,10 +80,12 @@ func DefaultWalletConfig() WalletConfig { } type WalletRpcConfig struct { - Host string `long:"wallethost" description:"location of the wallet rpc server"` - User string `long:"walletuser" description:"user auth for the wallet rpc server"` - Pass string `long:"walletpassword" description:"password auth for the wallet rpc server"` - DisableTls bool `long:"noclienttls" description:"disables tls for the wallet rpc client"` + Host string `long:"wallethost" description:"location of the wallet rpc server"` + User string `long:"walletuser" description:"user auth for the wallet rpc server"` + Pass string `long:"walletpassword" description:"password auth for the wallet rpc server"` + DisableTls bool `long:"noclienttls" description:"disables tls for the wallet rpc client"` + RPCWalletCert string `long:"rpcwalletcert" description:"File containing the wallet daemon's certificate file"` + RawRPCWalletCert string `long:"rawrpcwalletcert" description:"The raw bytes of the wallet daemon's PEM-encoded certificate chain which will be used to authenticate the RPC connection."` } func DefaultWalletRpcConfig() WalletRpcConfig { @@ -127,16 +129,18 @@ func DefaultBtcNodeBackendConfig() BtcNodeBackendConfig { } type StakerConfig struct { - BabylonStallingInterval time.Duration `long:"babylonstallinginterval" description:"The interval for Babylon node BTC light client to catch up with the real chain before re-sending delegation request"` - UnbondingTxCheckInterval time.Duration `long:"unbondingtxcheckinterval" description:"The interval for staker whether delegation received all covenant signatures"` - ExitOnCriticalError bool `long:"exitoncriticalerror" description:"Exit stakerd on critical error"` + BabylonStallingInterval time.Duration `long:"babylonstallinginterval" description:"The interval for Babylon node BTC light client to catch up with the real chain before re-sending delegation request"` + UnbondingTxCheckInterval time.Duration `long:"unbondingtxcheckinterval" description:"The interval for staker whether delegation received all covenant signatures"` + MaxConcurrentTransactions uint32 `long:"maxconcurrenttransactions" description:"Maximum concurrent transactions in flight to babylon node"` + ExitOnCriticalError bool `long:"exitoncriticalerror" description:"Exit stakerd on critical error"` } func DefaultStakerConfig() StakerConfig { return StakerConfig{ - BabylonStallingInterval: 1 * time.Minute, - UnbondingTxCheckInterval: 30 * time.Second, - ExitOnCriticalError: true, + BabylonStallingInterval: 1 * time.Minute, + UnbondingTxCheckInterval: 30 * time.Second, + MaxConcurrentTransactions: 1, + ExitOnCriticalError: true, } } @@ -164,6 +168,8 @@ type Config struct { StakerConfig *StakerConfig `group:"stakerconfig" namespace:"stakerconfig"` + MetricsConfig *MetricsConfig `group:"metricsconfig" namespace:"metricsconfig"` + JsonRpcServerConfig *JsonRpcServerConfig ActiveNetParams chaincfg.Params @@ -179,6 +185,7 @@ func DefaultConfig() Config { bbnConfig := DefaultBBNConfig() dbConfig := DefaultDBConfig() stakerConfig := DefaultStakerConfig() + metricsCfg := DefaultMetricsConfig() return Config{ StakerdDir: DefaultStakerdDir, ConfigFile: DefaultConfigFile, @@ -192,6 +199,7 @@ func DefaultConfig() Config { BabylonConfig: &bbnConfig, DBConfig: &dbConfig, StakerConfig: &stakerConfig, + MetricsConfig: &metricsCfg, } } diff --git a/stakercfg/metrics.go b/stakercfg/metrics.go new file mode 100644 index 0000000..d61bb8c --- /dev/null +++ b/stakercfg/metrics.go @@ -0,0 +1,39 @@ +package stakercfg + +import ( + "fmt" + "net" +) + +const ( + defaultMetricsServerPort = 2112 + defaultMetricsHost = "127.0.0.1" +) + +// MetricsConfig defines the server's basic configuration +type MetricsConfig struct { + // IP of the prometheus server + Host string `long:"host" description:"host of prometheus server."` + // Port of the prometheus server + ServerPort int `long:"server-pornt" description:"port of prometheus server."` +} + +func (cfg *MetricsConfig) Validate() error { + if cfg.ServerPort < 0 || cfg.ServerPort > 65535 { + return fmt.Errorf("invalid port: %d", cfg.ServerPort) + } + + ip := net.ParseIP(cfg.Host) + if ip == nil { + return fmt.Errorf("invalid host: %v", cfg.Host) + } + + return nil +} + +func DefaultMetricsConfig() MetricsConfig { + return MetricsConfig{ + ServerPort: defaultMetricsServerPort, + Host: defaultMetricsHost, + } +} diff --git a/tools/go.mod b/tools/go.mod index 910074f..0096180 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,11 +4,7 @@ go 1.21 toolchain go1.21.4 -require ( - github.com/babylonchain/babylon v0.8.0 - github.com/btcsuite/btcd v0.24.0 - github.com/btcsuite/btcwallet v0.16.9 -) +require github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236 require ( cloud.google.com/go v0.110.10 // indirect @@ -16,13 +12,13 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/storage v1.35.1 // indirect - cosmossdk.io/api v0.7.2 // indirect + cosmossdk.io/api v0.7.3 // indirect cosmossdk.io/client/v2 v2.0.0-beta.1 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect - cosmossdk.io/log v1.3.0 // indirect + cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.2.0 // indirect cosmossdk.io/store v1.0.2 // indirect cosmossdk.io/tools/confix v0.1.0 // indirect @@ -40,25 +36,17 @@ require ( github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect github.com/aead/siphash v1.0.1 // indirect - github.com/aws/aws-sdk-go v1.44.224 // indirect + github.com/aws/aws-sdk-go v1.44.312 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.8.0 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d // indirect + github.com/btcsuite/btcd v0.24.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.5 // indirect - github.com/btcsuite/btcd/btcutil/psbt v1.1.8 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f // indirect - github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 // indirect - github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 // indirect - github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 // indirect - github.com/btcsuite/btcwallet/walletdb v1.4.0 // indirect - github.com/btcsuite/btcwallet/wtxmgr v1.5.0 // indirect - github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect - github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect - github.com/btcsuite/winsvc v1.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -66,19 +54,19 @@ require ( github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb // indirect + github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft v0.38.5 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect github.com/cosmos/ibc-go/v8 v8.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect @@ -89,7 +77,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/decred/dcrd/lru v1.0.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -98,11 +85,11 @@ require ( github.com/docker/docker v23.0.8+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/emicklei/dot v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -113,7 +100,7 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -124,12 +111,12 @@ require ( github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.1 // indirect + github.com/hashicorp/go-getter v1.7.2 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.1 // indirect @@ -144,30 +131,20 @@ require ( github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jessevdk/go-flags v1.4.0 // indirect github.com/jinzhu/copier v0.3.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/jrick/logrotate v1.0.0 // indirect github.com/kkdai/bstream v0.0.0-20181106074824-b3251f7901ec // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.6 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect - github.com/lightninglabs/neutrino v0.15.0 // indirect - github.com/lightninglabs/neutrino/cache v1.1.0 // indirect - github.com/lightningnetwork/lnd/clock v1.0.1 // indirect - github.com/lightningnetwork/lnd/queue v1.0.1 // indirect - github.com/lightningnetwork/lnd/ticker v1.0.0 // indirect - github.com/lightningnetwork/lnd/tlv v1.0.2 // indirect - github.com/linxGnu/grocksdb v1.8.6 // indirect + github.com/linxGnu/grocksdb v1.8.12 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -180,14 +157,14 @@ require ( github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common v0.47.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.31.0 // indirect + github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -209,13 +186,13 @@ require ( go.etcd.io/bbolt v1.3.8 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect + golang.org/x/crypto v0.19.0 // indirect + golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect + golang.org/x/net v0.21.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.17.0 // indirect + golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/tools/go.sum b/tools/go.sum index 151c5ad..a9efa47 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -184,8 +184,8 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk= +cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= @@ -196,8 +196,8 @@ cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98ok cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.0 h1:L0Z0XstClo2kOU4h3V1iDoE5Ji64sg5HLOogzGg67Oo= -cosmossdk.io/log v1.3.0/go.mod h1:HIDyvWLqZe2ovlWabsDN4aPMpY/nUEquAhgfTf2ZzB8= +cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= +cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= @@ -267,11 +267,11 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= -github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +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/babylonchain/babylon v0.8.0 h1:QC04LPCFBD0MZyiM3cAjVBlr3CXEZPdhORWPBlO2gaQ= -github.com/babylonchain/babylon v0.8.0/go.mod h1:jR1b+5mA7BkRrXfd/PMHwk7W/RpoeQtunvjal+tKeHY= +github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236 h1:Ydna4VcP56xu1+zdgygqHdSCeMduZjuznVhr4exO5do= +github.com/babylonchain/babylon v0.8.6-0.20240426101001-7778c798e236/go.mod h1:lfeASLNJgcUsX7LEns3HRUv0k+MjzcB2q2AMasfz38M= 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= @@ -282,30 +282,23 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= -github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d h1:zsO4lp+bjv5XvPTF58Vq+qgmZEYZttJK+CWtSZhKenI= github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6ZhUWvbk7PdWVmOaak10o86cqMUYEmn1CZNGEI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= -github.com/btcsuite/btcd v0.22.0-beta.0.20220204213055-eaf0459ff879/go.mod h1:osu7EoKiL36UThEgzYPqdRaxeo0NU8VoXqgcnwpey0g= -github.com/btcsuite/btcd v0.22.0-beta.0.20220207191057-4dc4ff7963b4/go.mod h1:7alexyj/lHlOtr2PJK7L/+HDJZpcGDn/pAU98r7DY08= -github.com/btcsuite/btcd v0.23.1/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= github.com/btcsuite/btcd v0.24.0 h1:gL3uHE/IaFj6fcZSu03SvqPMSx7s/dPzfpG/atRwWdo= github.com/btcsuite/btcd v0.24.0/go.mod h1:K4IDc1593s8jKXIF7yS7yCTSxrknB9z0STzc2j6XgE4= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= -github.com/btcsuite/btcd/btcec/v2 v2.1.1/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= -github.com/btcsuite/btcd/btcutil v1.1.1/go.mod h1:nbKlBMNm9FGsdvKvu0essceubPiAcI57pYBNnsLAa34= github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdisflzM8= github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= -github.com/btcsuite/btcd/btcutil/psbt v1.1.8 h1:4voqtT8UppT7nmKQkXV+T9K8UyQjKOn2z/ycpmJK8wg= -github.com/btcsuite/btcd/btcutil/psbt v1.1.8/go.mod h1:kA6FLH/JfUx++j9pYU0pyu+Z8XGBQuuTmuKYUf6q7/U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= @@ -313,29 +306,12 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcwallet v0.16.9 h1:hLAzEJvsiSn+r6j374G7ThnrYD/toa+Lv7l1Rm6+0oM= -github.com/btcsuite/btcwallet v0.16.9/go.mod h1:T3DjEAMZYIqQ28l+ixlB6DX4mFJXCX8Pzz+yACQcLsc= -github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 h1:etuLgGEojecsDOYTII8rYiGHjGyV5xTqsXi+ZQ715UU= -github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2/go.mod h1:Zpk/LOb2sKqwP2lmHjaZT9AdaKsHPSbNLm2Uql5IQ/0= -github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 h1:BtEN5Empw62/RVnZ0VcJaVtVlBijnLlJY+dwjAye2Bg= -github.com/btcsuite/btcwallet/wallet/txrules v1.2.0/go.mod h1:AtkqiL7ccKWxuLYtZm8Bu8G6q82w4yIZdgq6riy60z0= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.2/go.mod h1:q08Rms52VyWyXcp5zDc4tdFRKkFgNsMQrv3/LvE1448= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 h1:PszOub7iXVYbtGybym5TGCp9Dv1h1iX4rIC3HICZGLg= -github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3/go.mod h1:q08Rms52VyWyXcp5zDc4tdFRKkFgNsMQrv3/LvE1448= -github.com/btcsuite/btcwallet/walletdb v1.3.5/go.mod h1:oJDxAEUHVtnmIIBaa22wSBPTVcs6hUp5NKWmI8xDwwU= -github.com/btcsuite/btcwallet/walletdb v1.4.0 h1:/C5JRF+dTuE2CNMCO/or5N8epsrhmSM4710uBQoYPTQ= -github.com/btcsuite/btcwallet/walletdb v1.4.0/go.mod h1:oJDxAEUHVtnmIIBaa22wSBPTVcs6hUp5NKWmI8xDwwU= -github.com/btcsuite/btcwallet/wtxmgr v1.5.0 h1:WO0KyN4l6H3JWnlFxfGR7r3gDnlGT7W2cL8vl6av4SU= -github.com/btcsuite/btcwallet/wtxmgr v1.5.0/go.mod h1:TQVDhFxseiGtZwEPvLgtfyxuNUDsIdaJdshvWzR0HJ4= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= -github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= @@ -383,8 +359,8 @@ github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZ github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb h1:6Po+YYKT5B5ZXN0wd2rwFBaebM0LufPf8p4zxOd48Kg= -github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= +github.com/cockroachdb/pebble v1.1.0 h1:pcFh8CdCIt2kmEpK0OIatq67Ln9uGDYY3d5XnE0LJG4= +github.com/cockroachdb/pebble v1.1.0/go.mod h1:sEHm5NOXxyiAoKWhoFxT8xMgd/f3RA6qUqQ1BXKrh2E= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -406,8 +382,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987 h1:Pjvcy7wHUoYh253LvNv5Dyx+d3SNkRPsDZH+FytqZ3w= github.com/cosmos/cosmos-sdk v0.50.4-0.20240126152601-c4a2fe2b8987/go.mod h1:0D9mrUy1eAUMQuvYzf2xvhEPk2ta9w7XH1zcYvyFiuM= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= @@ -417,8 +393,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= -github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= +github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg= @@ -449,7 +425,6 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPc github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= @@ -480,8 +455,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= -github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -509,8 +484,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -611,8 +586,9 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -696,8 +672,9 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -715,8 +692,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= -github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.2 h1:uJDtyXwEfalmp1PqdxuhZqrNkUyClZAhVeZYTArbqkg= +github.com/hashicorp/go-getter v1.7.2/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -773,7 +750,6 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= @@ -788,7 +764,6 @@ github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -813,8 +788,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI= +github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -832,24 +807,10 @@ github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf h1:HZKvJUHlcXI/f/O0Avg7t8sqkPo78HFzjmeYFl6DPnc= -github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf/go.mod h1:vxmQPeIQxPf6Jf9rM8R+B4rKBqLA2AjttNxkFBL2Plk= -github.com/lightninglabs/neutrino v0.15.0 h1:yr3uz36fLAq8hyM0TRUVlef1TRNoWAqpmmNlVtKUDtI= -github.com/lightninglabs/neutrino v0.15.0/go.mod h1:pmjwElN/091TErtSE9Vd5W4hpxoG2/+xlb+HoPm9Gug= -github.com/lightninglabs/neutrino/cache v1.1.0 h1:szZIhVabiQIsGzJjhvo76sj05Au+zVotj2M34EquGME= -github.com/lightninglabs/neutrino/cache v1.1.0/go.mod h1:XJNcgdOw1LQnanGjw8Vj44CvguYA25IMKjWFZczwZuo= -github.com/lightningnetwork/lnd/clock v1.0.1 h1:QQod8+m3KgqHdvVMV+2DRNNZS1GRFir8mHZYA+Z2hFo= -github.com/lightningnetwork/lnd/clock v1.0.1/go.mod h1:KnQudQ6w0IAMZi1SgvecLZQZ43ra2vpDNj7H/aasemg= -github.com/lightningnetwork/lnd/queue v1.0.1 h1:jzJKcTy3Nj5lQrooJ3aaw9Lau3I0IwvQR5sqtjdv2R0= -github.com/lightningnetwork/lnd/queue v1.0.1/go.mod h1:vaQwexir73flPW43Mrm7JOgJHmcEFBWWSl9HlyASoms= -github.com/lightningnetwork/lnd/ticker v1.0.0 h1:S1b60TEGoTtCe2A0yeB+ecoj/kkS4qpwh6l+AkQEZwU= -github.com/lightningnetwork/lnd/ticker v1.0.0/go.mod h1:iaLXJiVgI1sPANIF2qYYUJXjoksPNvGNYowB8aRbpX0= -github.com/lightningnetwork/lnd/tlv v1.0.2 h1:LG7H3Uw/mHYGnEeHRPg+STavAH+UsFvuBflD0PzcYFQ= -github.com/lightningnetwork/lnd/tlv v1.0.2/go.mod h1:fICAfsqk1IOsC1J7G9IdsWX1EqWRMqEDCNxZJSKr9C4= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= -github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -872,8 +833,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -982,24 +941,24 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= +github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1015,14 +974,14 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1127,7 +1086,6 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= @@ -1169,8 +1127,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1182,8 +1140,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= +golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1210,8 +1168,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= -golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1272,8 +1230,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1299,8 +1257,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1315,8 +1273,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1414,13 +1372,13 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.17.0 h1:mkTF7LCd6WGJNL3K1Ad7kwxNfYAW6a8a8QqtMblp/4U= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1502,8 +1460,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= -golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/tools/tools.go b/tools/tools.go index 4a93224..477dd3d 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -4,7 +4,5 @@ package btcstaker import ( - _ "github.com/btcsuite/btcd" - _ "github.com/btcsuite/btcwallet" _ "github.com/babylonchain/babylon/cmd/babylond" ) diff --git a/walletcontroller/client.go b/walletcontroller/client.go index 1510ace..12d9702 100644 --- a/walletcontroller/client.go +++ b/walletcontroller/client.go @@ -5,6 +5,7 @@ import ( "sort" "github.com/babylonchain/btc-staker/stakercfg" + scfg "github.com/babylonchain/btc-staker/stakercfg" "github.com/babylonchain/btc-staker/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" @@ -39,8 +40,9 @@ func NewRpcWalletController(scfg *stakercfg.Config) (*RpcWalletController, error scfg.WalletConfig.WalletPass, scfg.BtcNodeBackendConfig.ActiveWalletBackend, &scfg.ActiveNetParams, - // TODO for now just disable tls - true, + scfg.WalletRpcConfig.DisableTls, + scfg.WalletRpcConfig.RawRPCWalletCert, + scfg.WalletRpcConfig.RPCWalletCert, ) } @@ -53,6 +55,7 @@ func NewRpcWalletControllerFromArgs( nodeBackend types.SupportedWalletBackend, params *chaincfg.Params, disableTls bool, + rawWalletCert string, walletCertFilePath string, ) (*RpcWalletController, error) { connCfg := &rpcclient.ConnConfig{ @@ -67,8 +70,15 @@ func NewRpcWalletControllerFromArgs( HTTPPostMode: true, } - rpcclient, err := rpcclient.New(connCfg, nil) + if !connCfg.DisableTLS { + cert, err := scfg.ReadCertFile(rawWalletCert, walletCertFilePath) + if err != nil { + return nil, err + } + connCfg.Certificates = cert + } + rpcclient, err := rpcclient.New(connCfg, nil) if err != nil { return nil, err }