From cd5a9693b912ee43471916e8c251a739fe1ce887 Mon Sep 17 00:00:00 2001 From: Fangyu Gai Date: Wed, 31 Jul 2024 10:37:42 +0800 Subject: [PATCH 1/2] migrate to labs --- CHANGELOG.md | 42 +++++++++++++++--------------- Dockerfile | 10 +++---- LICENSE | 6 ++--- Makefile | 4 +-- README.md | 6 ++--- clientcontroller/babylon.go | 22 +++++++--------- clientcontroller/interface.go | 4 +-- clientcontroller/retry_utils.go | 2 +- cmd/covd/init.go | 4 +-- cmd/covd/key.go | 6 ++--- cmd/covd/start.go | 12 ++++----- config/babylon.go | 2 +- config/config.go | 2 +- covenant/covenant.go | 16 ++++++------ covenant/covenant_test.go | 16 ++++++------ covenant/service/server.go | 2 +- go.mod | 14 +++++----- go.sum | 22 +++++++++------- itest/babylon_node_handler.go | 2 +- itest/test_manager.go | 46 +++++++++++++++------------------ keyring/keyring.go | 2 +- keyring/keyringcontroller.go | 2 +- log/log.go | 2 +- testutil/datagen.go | 8 +++--- testutil/mocks/babylon.go | 2 +- testutil/utils.go | 4 +-- tools/go.mod | 14 +++++----- tools/go.sum | 22 +++++++++------- tools/tools.go | 2 +- types/delegation.go | 2 +- 30 files changed, 151 insertions(+), 149 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da8d7a0..dcb29e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,43 +1,43 @@ # Changelog -## [Unreleased](https://github.com/babylonchain/covenant-emulator/tree/HEAD) +## [Unreleased](https://github.com/babylonlabs-io/covenant-emulator/tree/HEAD) -[Full Changelog](https://github.com/babylonchain/covenant-emulator/compare/v0.1.0...HEAD) +[Full Changelog](https://github.com/babylonlabs-io/covenant-emulator/compare/v0.1.0...HEAD) **Merged pull requests:** -- chore: Bump Babylon v0.8.0 [\#17](https://github.com/babylonchain/covenant-emulator/pull/17) ([gitferry](https://github.com/gitferry)) -- Bumps babylon to latest version [\#16](https://github.com/babylonchain/covenant-emulator/pull/16) ([KonradStaniec](https://github.com/KonradStaniec)) -- feat: Allow the covenant emulator to submit signatures in batches [\#15](https://github.com/babylonchain/covenant-emulator/pull/15) ([vitsalis](https://github.com/vitsalis)) -- CI: Remove redundant SSH key logic [\#14](https://github.com/babylonchain/covenant-emulator/pull/14) ([filippos47](https://github.com/filippos47)) -- chore: Remove dependency on finality-provider [\#13](https://github.com/babylonchain/covenant-emulator/pull/13) ([gitferry](https://github.com/gitferry)) -- chore: Remove private repo thingy [\#11](https://github.com/babylonchain/covenant-emulator/pull/11) ([gitferry](https://github.com/gitferry)) +- chore: Bump Babylon v0.8.0 [\#17](https://github.com/babylonlabs-io/covenant-emulator/pull/17) ([gitferry](https://github.com/gitferry)) +- Bumps babylon to latest version [\#16](https://github.com/babylonlabs-io/covenant-emulator/pull/16) ([KonradStaniec](https://github.com/KonradStaniec)) +- feat: Allow the covenant emulator to submit signatures in batches [\#15](https://github.com/babylonlabs-io/covenant-emulator/pull/15) ([vitsalis](https://github.com/vitsalis)) +- CI: Remove redundant SSH key logic [\#14](https://github.com/babylonlabs-io/covenant-emulator/pull/14) ([filippos47](https://github.com/filippos47)) +- chore: Remove dependency on finality-provider [\#13](https://github.com/babylonlabs-io/covenant-emulator/pull/13) ([gitferry](https://github.com/gitferry)) +- chore: Remove private repo thingy [\#11](https://github.com/babylonlabs-io/covenant-emulator/pull/11) ([gitferry](https://github.com/gitferry)) -## [v0.1.0](https://github.com/babylonchain/covenant-emulator/tree/v0.1.0) (2024-02-08) +## [v0.1.0](https://github.com/babylonlabs-io/covenant-emulator/tree/v0.1.0) (2024-02-08) -[Full Changelog](https://github.com/babylonchain/covenant-emulator/compare/v0.1.0-rc.0...v0.1.0) +[Full Changelog](https://github.com/babylonlabs-io/covenant-emulator/compare/v0.1.0-rc.0...v0.1.0) **Implemented enhancements:** -- Cycle dependency with finality-provider [\#9](https://github.com/babylonchain/covenant-emulator/issues/9) +- Cycle dependency with finality-provider [\#9](https://github.com/babylonlabs-io/covenant-emulator/issues/9) -## [v0.1.0-rc.0](https://github.com/babylonchain/covenant-emulator/tree/v0.1.0-rc.0) (2024-01-22) +## [v0.1.0-rc.0](https://github.com/babylonlabs-io/covenant-emulator/tree/v0.1.0-rc.0) (2024-01-22) -[Full Changelog](https://github.com/babylonchain/covenant-emulator/compare/5187e721981f61e36012e183af9171068d9b2544...v0.1.0-rc.0) +[Full Changelog](https://github.com/babylonlabs-io/covenant-emulator/compare/5187e721981f61e36012e183af9171068d9b2544...v0.1.0-rc.0) **Closed issues:** -- Log directory won't be created automatically if not existing [\#3](https://github.com/babylonchain/covenant-emulator/issues/3) +- Log directory won't be created automatically if not existing [\#3](https://github.com/babylonlabs-io/covenant-emulator/issues/3) **Merged pull requests:** -- chore: Upgrade bbn to 0.8.0-rc.0 [\#12](https://github.com/babylonchain/covenant-emulator/pull/12) ([vitsalis](https://github.com/vitsalis)) -- chore: Prepare public release [\#7](https://github.com/babylonchain/covenant-emulator/pull/7) ([gitferry](https://github.com/gitferry)) -- chore: Bump babylon with checking of slashing time lock [\#6](https://github.com/babylonchain/covenant-emulator/pull/6) ([gitferry](https://github.com/gitferry)) -- doc: Add initial documentation of covenant emulator [\#5](https://github.com/babylonchain/covenant-emulator/pull/5) ([gitferry](https://github.com/gitferry)) -- chore: Fix directory permission when `init` [\#4](https://github.com/babylonchain/covenant-emulator/pull/4) ([gitferry](https://github.com/gitferry)) -- chore: display the error when failing to load docs [\#2](https://github.com/babylonchain/covenant-emulator/pull/2) ([vitsalis](https://github.com/vitsalis)) -- Init covenant emulator [\#1](https://github.com/babylonchain/covenant-emulator/pull/1) ([gitferry](https://github.com/gitferry)) +- chore: Upgrade bbn to 0.8.0-rc.0 [\#12](https://github.com/babylonlabs-io/covenant-emulator/pull/12) ([vitsalis](https://github.com/vitsalis)) +- chore: Prepare public release [\#7](https://github.com/babylonlabs-io/covenant-emulator/pull/7) ([gitferry](https://github.com/gitferry)) +- chore: Bump babylon with checking of slashing time lock [\#6](https://github.com/babylonlabs-io/covenant-emulator/pull/6) ([gitferry](https://github.com/gitferry)) +- doc: Add initial documentation of covenant emulator [\#5](https://github.com/babylonlabs-io/covenant-emulator/pull/5) ([gitferry](https://github.com/gitferry)) +- chore: Fix directory permission when `init` [\#4](https://github.com/babylonlabs-io/covenant-emulator/pull/4) ([gitferry](https://github.com/gitferry)) +- chore: display the error when failing to load docs [\#2](https://github.com/babylonlabs-io/covenant-emulator/pull/2) ([vitsalis](https://github.com/vitsalis)) +- Init covenant emulator [\#1](https://github.com/babylonlabs-io/covenant-emulator/pull/1) ([gitferry](https://github.com/gitferry)) diff --git a/Dockerfile b/Dockerfile index ff9dea5..31a4ca2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ FROM golang:1.21.4 as builder RUN apt-get update && apt-get install -y make git bash gcc curl jq # Build -WORKDIR /go/src/github.com/babylonchain/covenant-emulator +WORKDIR /go/src/github.com/babylonlabs-io/covenant-emulator # Cache dependencies -COPY go.mod go.sum /go/src/github.com/babylonchain/covenant-emulator/ +COPY go.mod go.sum /go/src/github.com/babylonlabs-io/covenant-emulator/ RUN go mod download # Copy the rest of the files -COPY ./ /go/src/github.com/babylonchain/covenant-emulator/ +COPY ./ /go/src/github.com/babylonlabs-io/covenant-emulator/ RUN BUILD_TAGS=netgo \ LDFLAGS="-w -s" \ @@ -21,7 +21,7 @@ RUN addgroup --gid 1138 --system covenant-emulator && adduser --uid 1138 --syste RUN apt-get update && apt-get install -y bash curl jq wget -COPY --from=builder /go/src/github.com/babylonchain/covenant-emulator/go.mod /tmp +COPY --from=builder /go/src/github.com/babylonlabs-io/covenant-emulator/go.mod /tmp RUN WASMVM_VERSION=$(grep github.com/CosmWasm/wasmvm /tmp/go.mod | cut -d' ' -f2) && \ wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm.$(uname -m).so \ -O /lib/libwasmvm.$(uname -m).so && \ @@ -30,7 +30,7 @@ RUN WASMVM_VERSION=$(grep github.com/CosmWasm/wasmvm /tmp/go.mod | cut -d' ' -f2 sha256sum /lib/libwasmvm.$(uname -m).so | grep $(cat /tmp/checksums.txt | grep libwasmvm.$(uname -m) | cut -d ' ' -f 1) RUN rm -f /tmp/go.mod -COPY --from=builder /go/src/github.com/babylonchain/covenant-emulator/build/covd /bin/covd +COPY --from=builder /go/src/github.com/babylonlabs-io/covenant-emulator/build/covd /bin/covd WORKDIR /home/covenant-emulator RUN chown -R covenant-emulator /home/covenant-emulator diff --git a/LICENSE b/LICENSE index b114447..8769c52 100644 --- a/LICENSE +++ b/LICENSE @@ -8,14 +8,14 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. Parameters -Licensor: Babylonchain, Inc. +Licensor: Babylon Labs, Ltd. Licensed Work: covenant-emulator - The Licensed Work is (c) 2023 Babylonchain, Inc. + The Licensed Work is (c) 2024 Babylon Labs, Ltd. Additional Use Grant: None. -Change Date: 2027-01-20 (January 20th, 2027] +Change Date: 2027-01-20 (January 20th, 2027) Change License: Apache 2.0 diff --git a/Makefile b/Makefile index b5980da..7cf7ca6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ BUILDDIR ?= $(CURDIR)/build TOOLS_DIR := tools -BABYLON_PKG := github.com/babylonchain/babylon/cmd/babylond +BABYLON_PKG := github.com/babylonlabs-io/babylon/cmd/babylond GO_BIN := ${GOPATH}/bin @@ -48,7 +48,7 @@ $(BUILDDIR)/: mkdir -p $(BUILDDIR)/ build-docker: - $(DOCKER) build --tag babylonchain/covenant-emulator -f Dockerfile \ + $(DOCKER) build --tag babylonlabs-io/covenant-emulator -f Dockerfile \ $(shell git rev-parse --show-toplevel) .PHONY: build build-docker diff --git a/README.md b/README.md index 2077e48..bd2542c 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ verified the validity of the transactions and sent corresponding signatures. Upon a pending staking request being found, the covenant emulation daemon (`covd`), validates it against the spending rules defined in -[Staking Script specification](https://github.com/babylonchain/babylon/blob/dev/docs/staking-script.md), +[Staking Script specification](https://github.com/babylonlabs-io/babylon/blob/dev/docs/staking-script.md), and sends three types of signatures to the Babylon chain: 1. **Slashing signature**. This signature is an [adaptor signature](https://bitcoinops.org/en/topics/adaptor-signatures/), @@ -100,11 +100,11 @@ the [official Go installation guide](https://golang.org/doc/install). To get started, clone the repository to your local machine from Github: ```bash -$ git clone git@github.com:babylonchain/covenant-emulator.git +$ git clone git@github.com:babylonlabs-io/covenant-emulator.git ``` You can choose a specific version from -the [official releases page](https://github.com/babylonchain/covenant-emulator/releases): +the [official releases page](https://github.com/babylonlabs-io/covenant-emulator/releases): ```bash $ cd covenant-emulator # cd into the project directory diff --git a/clientcontroller/babylon.go b/clientcontroller/babylon.go index e9047be..6641dd9 100644 --- a/clientcontroller/babylon.go +++ b/clientcontroller/babylon.go @@ -9,22 +9,21 @@ import ( "github.com/btcsuite/btcd/btcec/v2" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - bbnclient "github.com/babylonchain/babylon/client/client" - bbntypes "github.com/babylonchain/babylon/types" - btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types" - btclctypes "github.com/babylonchain/babylon/x/btclightclient/types" - btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types" + bbnclient "github.com/babylonlabs-io/babylon/client/client" + bbntypes "github.com/babylonlabs-io/babylon/types" + btcctypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types" + btclctypes "github.com/babylonlabs-io/babylon/x/btclightclient/types" + btcstakingtypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" sdkclient "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" sdk "github.com/cosmos/cosmos-sdk/types" sdkquery "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/relayer/v2/relayer/provider" "go.uber.org/zap" - "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/types" + "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/types" ) var _ ClientController = &BabylonController{} @@ -363,12 +362,11 @@ func (bc *BabylonController) CreateBTCDelegation( // Register a finality provider to Babylon // Currently this is only used for e2e tests, probably does not need to add it into the interface func (bc *BabylonController) RegisterFinalityProvider( - bbnPubKey *secp256k1.PubKey, btcPubKey *bbntypes.BIP340PubKey, commission *sdkmath.LegacyDec, - description *stakingtypes.Description, pop *btcstakingtypes.ProofOfPossession) (*provider.RelayerTxResponse, error) { + btcPubKey *bbntypes.BIP340PubKey, commission *sdkmath.LegacyDec, + description *stakingtypes.Description, pop *btcstakingtypes.ProofOfPossessionBTC) (*provider.RelayerTxResponse, error) { registerMsg := &btcstakingtypes.MsgCreateFinalityProvider{ - Signer: bc.mustGetTxSigner(), + Addr: bc.mustGetTxSigner(), Commission: commission, - BabylonPk: bbnPubKey, BtcPk: btcPubKey, Description: description, Pop: pop, diff --git a/clientcontroller/interface.go b/clientcontroller/interface.go index 2f3ea48..7d15314 100644 --- a/clientcontroller/interface.go +++ b/clientcontroller/interface.go @@ -6,8 +6,8 @@ import ( "github.com/btcsuite/btcd/chaincfg" "go.uber.org/zap" - "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/types" + "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/types" ) const ( diff --git a/clientcontroller/retry_utils.go b/clientcontroller/retry_utils.go index 82b25af..70d28c5 100644 --- a/clientcontroller/retry_utils.go +++ b/clientcontroller/retry_utils.go @@ -2,7 +2,7 @@ package clientcontroller import ( sdkErr "cosmossdk.io/errors" - btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types" + btcstakingtypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" ) // these errors are considered unrecoverable because these indicate diff --git a/cmd/covd/init.go b/cmd/covd/init.go index f6f9403..e099849 100644 --- a/cmd/covd/init.go +++ b/cmd/covd/init.go @@ -7,8 +7,8 @@ import ( "github.com/jessevdk/go-flags" "github.com/urfave/cli" - covcfg "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/util" + covcfg "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/util" ) var initCommand = cli.Command{ diff --git a/cmd/covd/key.go b/cmd/covd/key.go index 560de27..bb6633f 100644 --- a/cmd/covd/key.go +++ b/cmd/covd/key.go @@ -4,12 +4,12 @@ import ( "encoding/json" "fmt" - "github.com/babylonchain/babylon/types" + "github.com/babylonlabs-io/babylon/types" "github.com/jessevdk/go-flags" "github.com/urfave/cli" - covcfg "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/covenant" + covcfg "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/covenant" ) type covenantKey struct { diff --git a/cmd/covd/start.go b/cmd/covd/start.go index 226878f..1256f61 100644 --- a/cmd/covd/start.go +++ b/cmd/covd/start.go @@ -4,16 +4,16 @@ import ( "fmt" "path/filepath" - covcfg "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/log" - "github.com/babylonchain/covenant-emulator/util" + covcfg "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/log" + "github.com/babylonlabs-io/covenant-emulator/util" "github.com/lightningnetwork/lnd/signal" "github.com/urfave/cli" - "github.com/babylonchain/covenant-emulator/clientcontroller" - "github.com/babylonchain/covenant-emulator/covenant" - covsrv "github.com/babylonchain/covenant-emulator/covenant/service" + "github.com/babylonlabs-io/covenant-emulator/clientcontroller" + "github.com/babylonlabs-io/covenant-emulator/covenant" + covsrv "github.com/babylonlabs-io/covenant-emulator/covenant/service" ) var startCommand = cli.Command{ diff --git a/config/babylon.go b/config/babylon.go index 6090fa9..e55a595 100644 --- a/config/babylon.go +++ b/config/babylon.go @@ -3,7 +3,7 @@ package config import ( "time" - bbncfg "github.com/babylonchain/babylon/client/config" + bbncfg "github.com/babylonlabs-io/babylon/client/config" ) type BBNConfig struct { diff --git a/config/config.go b/config/config.go index d21f585..04d4f94 100644 --- a/config/config.go +++ b/config/config.go @@ -5,7 +5,7 @@ import ( "path/filepath" "time" - "github.com/babylonchain/covenant-emulator/util" + "github.com/babylonlabs-io/covenant-emulator/util" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" diff --git a/covenant/covenant.go b/covenant/covenant.go index 4066c49..53a277a 100644 --- a/covenant/covenant.go +++ b/covenant/covenant.go @@ -9,10 +9,10 @@ import ( "time" "github.com/avast/retry-go/v4" - "github.com/babylonchain/babylon/btcstaking" - asig "github.com/babylonchain/babylon/crypto/schnorr-adaptor-signature" - bbntypes "github.com/babylonchain/babylon/types" - bstypes "github.com/babylonchain/babylon/x/btcstaking/types" + "github.com/babylonlabs-io/babylon/btcstaking" + asig "github.com/babylonlabs-io/babylon/crypto/schnorr-adaptor-signature" + bbntypes "github.com/babylonlabs-io/babylon/types" + bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcutil" @@ -20,10 +20,10 @@ import ( "github.com/btcsuite/btcd/wire" "go.uber.org/zap" - "github.com/babylonchain/covenant-emulator/clientcontroller" - covcfg "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/keyring" - "github.com/babylonchain/covenant-emulator/types" + "github.com/babylonlabs-io/covenant-emulator/clientcontroller" + covcfg "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/keyring" + "github.com/babylonlabs-io/covenant-emulator/types" ) var ( diff --git a/covenant/covenant_test.go b/covenant/covenant_test.go index d277d64..4c62945 100644 --- a/covenant/covenant_test.go +++ b/covenant/covenant_test.go @@ -5,19 +5,19 @@ import ( "math/rand" "testing" - "github.com/babylonchain/babylon/btcstaking" - asig "github.com/babylonchain/babylon/crypto/schnorr-adaptor-signature" - "github.com/babylonchain/babylon/testutil/datagen" - bbntypes "github.com/babylonchain/babylon/types" + "github.com/babylonlabs-io/babylon/btcstaking" + asig "github.com/babylonlabs-io/babylon/crypto/schnorr-adaptor-signature" + "github.com/babylonlabs-io/babylon/testutil/datagen" + bbntypes "github.com/babylonlabs-io/babylon/types" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/wire" "github.com/stretchr/testify/require" "go.uber.org/zap" - covcfg "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/covenant" - "github.com/babylonchain/covenant-emulator/testutil" - "github.com/babylonchain/covenant-emulator/types" + covcfg "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/covenant" + "github.com/babylonlabs-io/covenant-emulator/testutil" + "github.com/babylonlabs-io/covenant-emulator/types" ) const ( diff --git a/covenant/service/server.go b/covenant/service/server.go index 0d5501c..52145c7 100644 --- a/covenant/service/server.go +++ b/covenant/service/server.go @@ -7,7 +7,7 @@ import ( "github.com/lightningnetwork/lnd/signal" "go.uber.org/zap" - "github.com/babylonchain/covenant-emulator/covenant" + "github.com/babylonlabs-io/covenant-emulator/covenant" ) // CovenantServer is the main daemon construct for the covenant emulator. diff --git a/go.mod b/go.mod index fd4892c..b13d1bf 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/babylonchain/covenant-emulator +module github.com/babylonlabs-io/covenant-emulator go 1.21 @@ -8,8 +8,8 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 github.com/avast/retry-go/v4 v4.5.1 - github.com/babylonchain/babylon v0.8.6-0.20240619103849-013f733e9537 - github.com/btcsuite/btcd v0.24.0 + github.com/babylonlabs-io/babylon v0.9.0 + github.com/btcsuite/btcd v0.24.2 github.com/btcsuite/btcd/btcec/v2 v2.3.2 github.com/btcsuite/btcd/btcutil v1.1.5 github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 @@ -49,7 +49,7 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/CosmWasm/wasmd v0.51.0 // indirect - github.com/CosmWasm/wasmvm/v2 v2.0.0 // indirect + github.com/CosmWasm/wasmvm/v2 v2.0.1 // indirect 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 @@ -70,7 +70,7 @@ require ( 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.6 // indirect + github.com/cometbft/cometbft v0.38.7 // 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 @@ -82,7 +82,8 @@ require ( github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/iavl v1.1.2 // 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/ibc-go/modules/light-clients/08-wasm v0.0.0-20240429153234-e1e6da7e4ead // indirect + github.com/cosmos/ibc-go/v8 v8.3.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -197,6 +198,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.18.2 // 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 diff --git a/go.sum b/go.sum index 916c8dd..d175898 100644 --- a/go.sum +++ b/go.sum @@ -226,8 +226,8 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CosmWasm/wasmd v0.51.0 h1:3A2o20RrdF7P1D3Xb+R7A/pHbbHWsYCDXrHLa7S0SC8= github.com/CosmWasm/wasmd v0.51.0/go.mod h1:7TSaj5HoolghujuVWeExqmcUKgpcYWEySGLSODbnnwY= -github.com/CosmWasm/wasmvm/v2 v2.0.0 h1:IqNCI2G0mvs7K6ej17/I28805rVqnu+Y1cWDqIdwb08= -github.com/CosmWasm/wasmvm/v2 v2.0.0/go.mod h1:su9lg5qLr7adV95eOfzjZWkGiky8WNaNIHDr7Fpu7Ck= +github.com/CosmWasm/wasmvm/v2 v2.0.1 h1:0YCQ7MKGNri7NFeRp75erPJXrqyCtH4gdc9jMstyMzk= +github.com/CosmWasm/wasmvm/v2 v2.0.1/go.mod h1:su9lg5qLr7adV95eOfzjZWkGiky8WNaNIHDr7Fpu7Ck= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -273,8 +273,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.6-0.20240619103849-013f733e9537 h1:jbUK7ooiB8Syfrn3bFxueCS3pxbA8ezx3hG+OaEEkrE= -github.com/babylonchain/babylon v0.8.6-0.20240619103849-013f733e9537/go.mod h1:YFALTW+Kp/b5jSDoA7Z70RggJjAedlmQTrpdeU8c3hY= +github.com/babylonlabs-io/babylon v0.9.0 h1:dHZ9wUrI5XLaO4UIwJRgiCdnzFdi5yv7dpibbu6TDv0= +github.com/babylonlabs-io/babylon v0.9.0/go.mod h1:t7B4e+ooD2oYvAxkegtNKDL9bXe+vU29a8xnCQh+UKo= 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= @@ -292,8 +292,8 @@ github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6Z 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.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 v0.24.2 h1:aLmxPguqxza+4ag8R1I2nnJjSu2iFn/kqtHTIImswcY= +github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= 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= @@ -371,8 +371,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= -github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= +github.com/cometbft/cometbft v0.38.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk= +github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= @@ -408,8 +408,10 @@ github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= 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= -github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0-20240429153234-e1e6da7e4ead h1:QB50+AmrEVqFr2hzvIxMkICziWQ/uuebze0vNYKMnBg= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0-20240429153234-e1e6da7e4ead/go.mod h1:AJeroAXnPKeFpD1AfEfjYBHGEWt5gBfzUjgs4SYn2ZY= +github.com/cosmos/ibc-go/v8 v8.3.0 h1:fdW2S7NjZYFhSwmCaFjjyDv80kI1ePOJDQmco4qrnD0= +github.com/cosmos/ibc-go/v8 v8.3.0/go.mod h1:izwHZvn9lKrBn8xWj0aXWut6HKcwHMPD3uyuvOJoPSA= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= diff --git a/itest/babylon_node_handler.go b/itest/babylon_node_handler.go index 9b1362d..5ab915a 100644 --- a/itest/babylon_node_handler.go +++ b/itest/babylon_node_handler.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "github.com/babylonchain/babylon/types" + "github.com/babylonlabs-io/babylon/types" "github.com/stretchr/testify/require" ) diff --git a/itest/test_manager.go b/itest/test_manager.go index 9a923e5..4d4550a 100644 --- a/itest/test_manager.go +++ b/itest/test_manager.go @@ -7,25 +7,25 @@ import ( "testing" "time" - "github.com/babylonchain/babylon/testutil/datagen" - bbntypes "github.com/babylonchain/babylon/types" - btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types" - btclctypes "github.com/babylonchain/babylon/x/btclightclient/types" - bstypes "github.com/babylonchain/babylon/x/btcstaking/types" + "github.com/babylonlabs-io/babylon/testutil/datagen" + bbntypes "github.com/babylonlabs-io/babylon/types" + btcctypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types" + btclctypes "github.com/babylonlabs-io/babylon/x/btclightclient/types" + bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/wire" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" "go.uber.org/zap" - covcc "github.com/babylonchain/covenant-emulator/clientcontroller" - covcfg "github.com/babylonchain/covenant-emulator/config" - "github.com/babylonchain/covenant-emulator/covenant" - "github.com/babylonchain/covenant-emulator/testutil" - "github.com/babylonchain/covenant-emulator/types" + covcc "github.com/babylonlabs-io/covenant-emulator/clientcontroller" + covcfg "github.com/babylonlabs-io/covenant-emulator/config" + "github.com/babylonlabs-io/covenant-emulator/covenant" + "github.com/babylonlabs-io/covenant-emulator/testutil" + "github.com/babylonlabs-io/covenant-emulator/types" ) var ( @@ -64,11 +64,10 @@ type TestDelegationData struct { } type testFinalityProviderData struct { - BabylonPrivKey *secp256k1.PrivKey - BabylonPublicKey *secp256k1.PubKey - BtcPrivKey *btcec.PrivateKey - BtcKey *btcec.PublicKey - PoP *bstypes.ProofOfPossession + BabylonAddress sdk.AccAddress + BtcPrivKey *btcec.PrivateKey + BtcKey *btcec.PublicKey + PoP *bstypes.ProofOfPossessionBTC } func StartManager(t *testing.T) *TestManager { @@ -133,7 +132,6 @@ func StartManagerWithFinalityProvider(t *testing.T, n int) (*TestManager, []*btc fpData := genTestFinalityProviderData(t) btcPubKey := bbntypes.NewBIP340PubKeyFromBTCPK(fpData.BtcKey) _, err := tm.CovBBNClient.RegisterFinalityProvider( - fpData.BabylonPublicKey, btcPubKey, &tm.StakingParams.MinComissionRate, &stakingtypes.Description{ @@ -165,17 +163,15 @@ func StartManagerWithFinalityProvider(t *testing.T, n int) (*TestManager, []*btc func genTestFinalityProviderData(t *testing.T) *testFinalityProviderData { finalityProviderEOTSPrivKey, err := btcec.NewPrivateKey() require.NoError(t, err) - finalityProviderBabylonPrivKey := secp256k1.GenPrivKey() - finalityProviderBabylonPubKey := finalityProviderBabylonPrivKey.PubKey().(*secp256k1.PubKey) - pop, err := bstypes.NewPoP(finalityProviderBabylonPrivKey, finalityProviderEOTSPrivKey) + finalityProviderBabylonAccAddress := datagen.GenRandomAccount().GetAddress() + pop, err := bstypes.NewPoPBTC(finalityProviderBabylonAccAddress, finalityProviderEOTSPrivKey) require.NoError(t, err) return &testFinalityProviderData{ - BabylonPrivKey: finalityProviderBabylonPrivKey, - BabylonPublicKey: finalityProviderBabylonPubKey, - BtcPrivKey: finalityProviderEOTSPrivKey, - BtcKey: finalityProviderEOTSPrivKey.PubKey(), - PoP: pop, + BabylonAddress: finalityProviderBabylonAccAddress, + BtcPrivKey: finalityProviderEOTSPrivKey, + BtcKey: finalityProviderEOTSPrivKey.PubKey(), + PoP: pop, } } diff --git a/keyring/keyring.go b/keyring/keyring.go index 118eb7f..c1c914a 100644 --- a/keyring/keyring.go +++ b/keyring/keyring.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/babylonchain/covenant-emulator/codec" + "github.com/babylonlabs-io/covenant-emulator/codec" ) func CreateKeyring(keyringDir string, chainId string, backend string, input *strings.Reader) (keyring.Keyring, error) { diff --git a/keyring/keyringcontroller.go b/keyring/keyringcontroller.go index 67fc407..e6ae73f 100644 --- a/keyring/keyringcontroller.go +++ b/keyring/keyringcontroller.go @@ -10,7 +10,7 @@ import ( sdksecp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/go-bip39" - "github.com/babylonchain/covenant-emulator/types" + "github.com/babylonlabs-io/covenant-emulator/types" ) const ( diff --git a/log/log.go b/log/log.go index 7036ba1..e2f658a 100644 --- a/log/log.go +++ b/log/log.go @@ -2,7 +2,7 @@ package log import ( "fmt" - "github.com/babylonchain/covenant-emulator/util" + "github.com/babylonlabs-io/covenant-emulator/util" "io" "os" "path/filepath" diff --git a/testutil/datagen.go b/testutil/datagen.go index eae3875..9b09ce8 100644 --- a/testutil/datagen.go +++ b/testutil/datagen.go @@ -7,9 +7,9 @@ import ( "time" sdkmath "cosmossdk.io/math" - "github.com/babylonchain/babylon/btcstaking" - "github.com/babylonchain/babylon/testutil/datagen" - bstypes "github.com/babylonchain/babylon/x/btcstaking/types" + "github.com/babylonlabs-io/babylon/btcstaking" + "github.com/babylonlabs-io/babylon/testutil/datagen" + bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" @@ -18,7 +18,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/stretchr/testify/require" - "github.com/babylonchain/covenant-emulator/types" + "github.com/babylonlabs-io/covenant-emulator/types" ) type TestStakingSlashingInfo struct { diff --git a/testutil/mocks/babylon.go b/testutil/mocks/babylon.go index 24a241b..6fd3173 100644 --- a/testutil/mocks/babylon.go +++ b/testutil/mocks/babylon.go @@ -7,7 +7,7 @@ package mocks import ( reflect "reflect" - types "github.com/babylonchain/covenant-emulator/types" + types "github.com/babylonlabs-io/covenant-emulator/types" gomock "github.com/golang/mock/gomock" ) diff --git a/testutil/utils.go b/testutil/utils.go index 5667c1f..b889c2a 100644 --- a/testutil/utils.go +++ b/testutil/utils.go @@ -5,8 +5,8 @@ import ( "github.com/golang/mock/gomock" - "github.com/babylonchain/covenant-emulator/testutil/mocks" - "github.com/babylonchain/covenant-emulator/types" + "github.com/babylonlabs-io/covenant-emulator/testutil/mocks" + "github.com/babylonlabs-io/covenant-emulator/types" ) func PrepareMockedClientController(t *testing.T, params *types.StakingParams) *mocks.MockClientController { diff --git a/tools/go.mod b/tools/go.mod index 78eb595..d20c038 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,10 +1,10 @@ -module github.com/babylonchain/covenant-emulator/tools +module github.com/babylonlabs-io/covenant-emulator/tools go 1.21 toolchain go1.21.4 -require github.com/babylonchain/babylon v0.8.6-0.20240619103849-013f733e9537 +require github.com/babylonlabs-io/babylon v0.9.0 require ( cloud.google.com/go v0.112.0 // indirect @@ -32,7 +32,7 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/CosmWasm/wasmd v0.51.0 // indirect - github.com/CosmWasm/wasmvm/v2 v2.0.0 // indirect + github.com/CosmWasm/wasmvm/v2 v2.0.1 // indirect 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 @@ -42,7 +42,7 @@ require ( github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // 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 v0.24.2 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.5 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect @@ -57,7 +57,7 @@ require ( 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.6 // indirect + github.com/cometbft/cometbft v0.38.7 // 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.2 // indirect @@ -68,7 +68,8 @@ require ( github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/iavl v1.1.2 // 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/ibc-go/modules/light-clients/08-wasm v0.0.0-20240429153234-e1e6da7e4ead // indirect + github.com/cosmos/ibc-go/v8 v8.3.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/creachadair/atomicfile v0.3.1 // indirect @@ -177,6 +178,7 @@ 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/stretchr/objx v0.5.2 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/supranational/blst v0.3.11 // indirect diff --git a/tools/go.sum b/tools/go.sum index 96dd4ff..eac797b 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -227,8 +227,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CosmWasm/wasmd v0.51.0 h1:3A2o20RrdF7P1D3Xb+R7A/pHbbHWsYCDXrHLa7S0SC8= github.com/CosmWasm/wasmd v0.51.0/go.mod h1:7TSaj5HoolghujuVWeExqmcUKgpcYWEySGLSODbnnwY= -github.com/CosmWasm/wasmvm/v2 v2.0.0 h1:IqNCI2G0mvs7K6ej17/I28805rVqnu+Y1cWDqIdwb08= -github.com/CosmWasm/wasmvm/v2 v2.0.0/go.mod h1:su9lg5qLr7adV95eOfzjZWkGiky8WNaNIHDr7Fpu7Ck= +github.com/CosmWasm/wasmvm/v2 v2.0.1 h1:0YCQ7MKGNri7NFeRp75erPJXrqyCtH4gdc9jMstyMzk= +github.com/CosmWasm/wasmvm/v2 v2.0.1/go.mod h1:su9lg5qLr7adV95eOfzjZWkGiky8WNaNIHDr7Fpu7Ck= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= @@ -268,8 +268,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.6-0.20240619103849-013f733e9537 h1:jbUK7ooiB8Syfrn3bFxueCS3pxbA8ezx3hG+OaEEkrE= -github.com/babylonchain/babylon v0.8.6-0.20240619103849-013f733e9537/go.mod h1:YFALTW+Kp/b5jSDoA7Z70RggJjAedlmQTrpdeU8c3hY= +github.com/babylonlabs-io/babylon v0.9.0 h1:dHZ9wUrI5XLaO4UIwJRgiCdnzFdi5yv7dpibbu6TDv0= +github.com/babylonlabs-io/babylon v0.9.0/go.mod h1:t7B4e+ooD2oYvAxkegtNKDL9bXe+vU29a8xnCQh+UKo= 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= @@ -287,8 +287,8 @@ github.com/boljen/go-bitmap v0.0.0-20151001105940-23cd2fb0ce7d/go.mod h1:f1iKL6Z 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.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 v0.24.2 h1:aLmxPguqxza+4ag8R1I2nnJjSu2iFn/kqtHTIImswcY= +github.com/btcsuite/btcd v0.24.2/go.mod h1:5C8ChTkl5ejr3WHj8tkQSCmydiMEPB0ZhQhehpq7Dgg= github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= 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= @@ -366,8 +366,8 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.6 h1:QSgpCzrGWJ2KUq1qpw+FCfASRpE27T6LQbfEHscdyOk= -github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7CyUw+6ukO4nw= +github.com/cometbft/cometbft v0.38.7 h1:ULhIOJ9+LgSy6nLekhq9ae3juX3NnQUMMPyVdhZV6Hk= +github.com/cometbft/cometbft v0.38.7/go.mod h1:HIyf811dFMI73IE0F7RrnY/Fr+d1+HuJAgtkEpQjCMY= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -397,8 +397,10 @@ github.com/cosmos/iavl v1.1.2 h1:zL9FK7C4L/P4IF1Dm5fIwz0WXCnn7Bp1M2FxH0ayM7Y= github.com/cosmos/iavl v1.1.2/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= 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= -github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0-20240429153234-e1e6da7e4ead h1:QB50+AmrEVqFr2hzvIxMkICziWQ/uuebze0vNYKMnBg= +github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.0.0-20240429153234-e1e6da7e4ead/go.mod h1:AJeroAXnPKeFpD1AfEfjYBHGEWt5gBfzUjgs4SYn2ZY= +github.com/cosmos/ibc-go/v8 v8.3.0 h1:fdW2S7NjZYFhSwmCaFjjyDv80kI1ePOJDQmco4qrnD0= +github.com/cosmos/ibc-go/v8 v8.3.0/go.mod h1:izwHZvn9lKrBn8xWj0aXWut6HKcwHMPD3uyuvOJoPSA= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= diff --git a/tools/tools.go b/tools/tools.go index 752851f..7c3505d 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -4,5 +4,5 @@ package finalityprovider import ( - _ "github.com/babylonchain/babylon/cmd/babylond" + _ "github.com/babylonlabs-io/babylon/cmd/babylond" ) diff --git a/types/delegation.go b/types/delegation.go index 5d56293..ab557f4 100644 --- a/types/delegation.go +++ b/types/delegation.go @@ -3,7 +3,7 @@ package types import ( "math" - bbn "github.com/babylonchain/babylon/types" + bbn "github.com/babylonlabs-io/babylon/types" "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" From 81c6fbf39789ca8c74b19e704243452098a8159d Mon Sep 17 00:00:00 2001 From: Fangyu Gai Date: Wed, 31 Jul 2024 15:19:41 +0800 Subject: [PATCH 2/2] migrate gh action --- .circleci/config.yml | 102 ---------------------------------- .github/workflows/ci.yml | 20 +++++++ .github/workflows/publish.yml | 24 ++++++++ 3 files changed, 44 insertions(+), 102 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/publish.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ef8f5f4..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,102 +0,0 @@ -version: 2.1 - -orbs: - go: circleci/go@1.7.3 - aws-ecr: circleci/aws-ecr@8.2.1 - -jobs: - build_lint_test: - machine: - image: ubuntu-2204:2022.10.1 - resource_class: large - steps: - - go/install: - version: "1.21.4" - - checkout - - run: - name: Print Go environment - command: "go env" - - go/load-cache: - key: go-mod-v6-{{ checksum "go.sum" }} - - go/mod-download - - go/save-cache: - key: go-mod-v6-{{ checksum "go.sum" }} - path: "/home/circleci/.go_workspace/pkg/mod" - - run: - name: Build cli app - command: make build - - run: - name: Lint - command: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 - ./bin/golangci-lint run --timeout 5m0s - - run: - name: Run tests - command: | - make test - - run: - name: Run integration tests - command: | - make test-e2e - - build_docker: - machine: - image: ubuntu-2204:2022.10.1 - resource_class: large - steps: - - checkout - - aws-ecr/build-image: - push-image: false - dockerfile: Dockerfile - path: ./ - build-path: ./ - tag: "$CIRCLE_SHA1,$CIRCLE_TAG" - repo: "$CIRCLE_PROJECT_REPONAME" - - run: - name: Save Docker image to export it to workspace - command: | - docker save $(docker image ls --format '{{.Repository}}:{{.Tag}}') > /tmp/covenant-emulator.tar - - persist_to_workspace: - root: /tmp - paths: - - covenant-emulator.tar - - push_docker: - machine: - image: ubuntu-2204:2022.10.1 - resource_class: large - steps: - - attach_workspace: - at: /tmp - - run: - name: Load Docker image from workspace - command: | - docker load -i /tmp/covenant-emulator.tar - - aws-ecr/ecr-login: - aws-access-key-id: AWS_ACCESS_KEY_ID - aws-secret-access-key: AWS_SECRET_ACCESS_KEY - region: "$AWS_REGION" - - aws-ecr/push-image: - registry-id: AWS_ECR_REGISTRY_ID - region: "$AWS_REGION" - repo: "$CIRCLE_PROJECT_REPONAME" - tag: "$CIRCLE_SHA1,$CIRCLE_TAG" - -workflows: - CI: - jobs: - - build_lint_test - - build_docker: - filters: - tags: - only: /.*/ - - push_docker: - requires: - - build_docker - filters: - tags: - only: /.*/ - branches: - only: - - main - - dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cd23d11 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: ci + +on: + pull_request: + branches: + - '**' + +jobs: + lint_test: + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0 + with: + run-unit-tests: true + run-integration-tests: true + run-lint: true + + docker_pipeline: + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0 + secrets: inherit + with: + publish: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9fa69f4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: docker_publish + +on: + push: + branches: + - 'main' + - 'dev' + tags: + - '*' + +jobs: + lint_test: + uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0 + with: + run-unit-tests: true + run-integration-tests: true + run-lint: true + + docker_pipeline: + needs: ["lint_test"] + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0 + secrets: inherit + with: + publish: true