Skip to content

Commit

Permalink
fix deps (GH migration) (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
bap2pecs authored Aug 1, 2024
1 parent 363fbaf commit 678f0a3
Show file tree
Hide file tree
Showing 105 changed files with 761 additions and 511 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ RUN apk add --no-cache --update openssh git make build-base linux-headers libc-d

RUN mkdir -p /root/.ssh && ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN git config --global url."[email protected]:".insteadOf "https://github.com/"
ENV GOPRIVATE=github.com/babylonchain/*
ENV GOPRIVATE=github.com/babylonlabs-io/*

# Build
WORKDIR /go/src/github.com/babylonchain/finality-provider
WORKDIR /go/src/github.com/babylonlabs-io/finality-provider
# Cache dependencies
COPY go.mod go.sum /go/src/github.com/babylonchain/finality-provider/
COPY go.mod go.sum /go/src/github.com/babylonlabs-io/finality-provider/
RUN --mount=type=secret,id=sshKey,target=/root/.ssh/id_rsa go mod download
# Copy the rest of the files
COPY ./ /go/src/github.com/babylonchain/finality-provider/
COPY ./ /go/src/github.com/babylonlabs-io/finality-provider/

# Cosmwasm - Download correct libwasmvm version
RUN WASMVM_VERSION=$(grep github.com/CosmWasm/wasmvm go.mod | cut -d' ' -f2) && \
Expand All @@ -45,8 +45,8 @@ RUN addgroup --gid 1138 -S finality-provider && adduser --uid 1138 -S finality-p

RUN apk add bash curl jq

COPY --from=builder /go/src/github.com/babylonchain/finality-provider/build/fpd /bin/fpd
COPY --from=builder /go/src/github.com/babylonchain/finality-provider/build/eotsd /bin/eotsd
COPY --from=builder /go/src/github.com/babylonlabs-io/finality-provider/build/fpd /bin/fpd
COPY --from=builder /go/src/github.com/babylonlabs-io/finality-provider/build/eotsd /bin/eotsd

WORKDIR /home/finality-provider
RUN chown -R finality-provider /home/finality-provider
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
WASMD_PKG := github.com/CosmWasm/wasmd/cmd/wasmd
BCD_PKG := github.com/babylonchain/babylon-sdk/demo/cmd/bcd

Expand Down Expand Up @@ -121,7 +121,7 @@ test-e2e-op-ci: clean-e2e install-babylond
"xargs go test -race -mod=readonly -timeout=25m -v $(PACKAGES_E2E_OP) -count=1 --tags=e2e_op --run" \
--split-by=name --timings-type=name

DEVNET_REPO_URL := https://github.com/babylonchain/op-e2e-devnet
DEVNET_REPO_URL := https://github.com/babylonlabs-io/op-e2e-devnet
TARGET_DIR := ./itest/opstackl2/devnet-data

.PHONY: op-e2e-devnet
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,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 https://github.com/babylonchain/finality-provider.git
git clone https://github.com/babylonlabs-io/finality-provider.git
```

You can choose a specific version from
the [official releases page](https://github.com/babylonchain/finality-provider/releases)
the [official releases page](https://github.com/babylonlabs-io/finality-provider/releases)

```bash
cd finality-provider # cd into the project directory
Expand Down Expand Up @@ -113,5 +113,5 @@ A finality provider receives BTC delegations through delegators
interacting with Babylon and choosing it as the recipient of their delegations.
To perform a self-delegation,
the operator can either visit the staking web app we provide,
or run the Babylon [BTC Staker program](https://github.com/babylonchain/btc-staker) once.
or run the Babylon [BTC Staker program](https://github.com/babylonlabs-io/btc-staker) once.
The BTC staker connects to a Bitcoin wallet and Babylon to perform delegations.
2 changes: 1 addition & 1 deletion clientcontroller/api/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"

"github.com/babylonchain/finality-provider/types"
"github.com/babylonlabs-io/finality-provider/types"
)

type ClientController interface {
Expand Down
20 changes: 10 additions & 10 deletions clientcontroller/babylon/babylon.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (

sdkErr "cosmossdk.io/errors"
"cosmossdk.io/math"
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"
bsctypes "github.com/babylonchain/babylon/x/btcstkconsumer/types"
finalitytypes "github.com/babylonchain/babylon/x/finality/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"
bsctypes "github.com/babylonlabs-io/babylon/x/btcstkconsumer/types"
finalitytypes "github.com/babylonlabs-io/babylon/x/finality/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcutil"
Expand All @@ -23,9 +23,9 @@ import (
"github.com/cosmos/relayer/v2/relayer/provider"
"go.uber.org/zap"

"github.com/babylonchain/finality-provider/clientcontroller/api"
fpcfg "github.com/babylonchain/finality-provider/finality-provider/config"
"github.com/babylonchain/finality-provider/types"
"github.com/babylonlabs-io/finality-provider/clientcontroller/api"
fpcfg "github.com/babylonlabs-io/finality-provider/finality-provider/config"
"github.com/babylonlabs-io/finality-provider/types"
)

var _ api.ClientController = &BabylonController{}
Expand Down
14 changes: 7 additions & 7 deletions clientcontroller/babylon/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"fmt"

sdkErr "cosmossdk.io/errors"
bbnclient "github.com/babylonchain/babylon/client/client"
bbntypes "github.com/babylonchain/babylon/types"
btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types"
finalitytypes "github.com/babylonchain/babylon/x/finality/types"
"github.com/babylonchain/finality-provider/clientcontroller/api"
fpcfg "github.com/babylonchain/finality-provider/finality-provider/config"
"github.com/babylonchain/finality-provider/types"
bbnclient "github.com/babylonlabs-io/babylon/client/client"
bbntypes "github.com/babylonlabs-io/babylon/types"
btcstakingtypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
finalitytypes "github.com/babylonlabs-io/babylon/x/finality/types"
"github.com/babylonlabs-io/finality-provider/clientcontroller/api"
fpcfg "github.com/babylonlabs-io/finality-provider/finality-provider/config"
"github.com/babylonlabs-io/finality-provider/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/chaincfg"
Expand Down
10 changes: 5 additions & 5 deletions clientcontroller/cosmwasm/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
sdkErr "cosmossdk.io/errors"
wasmdparams "github.com/CosmWasm/wasmd/app/params"
wasmdtypes "github.com/CosmWasm/wasmd/x/wasm/types"
bbntypes "github.com/babylonchain/babylon/types"
"github.com/babylonchain/finality-provider/clientcontroller/api"
cwcclient "github.com/babylonchain/finality-provider/cosmwasmclient/client"
fpcfg "github.com/babylonchain/finality-provider/finality-provider/config"
fptypes "github.com/babylonchain/finality-provider/types"
bbntypes "github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/finality-provider/clientcontroller/api"
cwcclient "github.com/babylonlabs-io/finality-provider/cosmwasmclient/client"
fpcfg "github.com/babylonlabs-io/finality-provider/finality-provider/config"
fptypes "github.com/babylonlabs-io/finality-provider/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
cmtcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
Expand Down
12 changes: 6 additions & 6 deletions clientcontroller/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package clientcontroller
import (
"fmt"

"github.com/babylonchain/finality-provider/clientcontroller/api"
"github.com/babylonchain/finality-provider/clientcontroller/babylon"
"github.com/babylonchain/finality-provider/clientcontroller/cosmwasm"
"github.com/babylonchain/finality-provider/clientcontroller/opstackl2"
cosmwasmcfg "github.com/babylonchain/finality-provider/cosmwasmclient/config"
fpcfg "github.com/babylonchain/finality-provider/finality-provider/config"
"github.com/babylonlabs-io/finality-provider/clientcontroller/api"
"github.com/babylonlabs-io/finality-provider/clientcontroller/babylon"
"github.com/babylonlabs-io/finality-provider/clientcontroller/cosmwasm"
"github.com/babylonlabs-io/finality-provider/clientcontroller/opstackl2"
cosmwasmcfg "github.com/babylonlabs-io/finality-provider/cosmwasmclient/config"
fpcfg "github.com/babylonlabs-io/finality-provider/finality-provider/config"
"go.uber.org/zap"
)

Expand Down
16 changes: 8 additions & 8 deletions clientcontroller/opstackl2/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
sdkErr "cosmossdk.io/errors"
wasmdparams "github.com/CosmWasm/wasmd/app/params"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
bbnapp "github.com/babylonchain/babylon/app"
bbntypes "github.com/babylonchain/babylon/types"
"github.com/babylonchain/finality-provider/clientcontroller/api"
cwclient "github.com/babylonchain/finality-provider/cosmwasmclient/client"
cwconfig "github.com/babylonchain/finality-provider/cosmwasmclient/config"
fpcfg "github.com/babylonchain/finality-provider/finality-provider/config"
"github.com/babylonchain/finality-provider/types"
bbnapp "github.com/babylonlabs-io/babylon/app"
bbntypes "github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/finality-provider/clientcontroller/api"
cwclient "github.com/babylonlabs-io/finality-provider/cosmwasmclient/client"
cwconfig "github.com/babylonlabs-io/finality-provider/cosmwasmclient/config"
fpcfg "github.com/babylonlabs-io/finality-provider/finality-provider/config"
"github.com/babylonlabs-io/finality-provider/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
cmtcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
Expand Down Expand Up @@ -244,7 +244,7 @@ func (cc *OPStackL2ConsumerController) SubmitBatchFinalitySigs(
// QueryFinalityProviderHasPower queries whether the finality provider has voting power at a given height
// This interface function only used for checking if the FP is eligible for submitting sigs.
// Now we can simply hardcode the voting power to true
// TODO: see this issue https://github.com/babylonchain/finality-provider/issues/390 for more details
// TODO: see this issue https://github.com/babylonlabs-io/finality-provider/issues/390 for more details
func (cc *OPStackL2ConsumerController) QueryFinalityProviderHasPower(fpPk *btcec.PublicKey, blockHeight uint64) (bool, error) {
return true, nil
}
Expand Down
4 changes: 2 additions & 2 deletions clientcontroller/retry_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"

sdkErr "cosmossdk.io/errors"
btcstakingtypes "github.com/babylonchain/babylon/x/btcstaking/types"
finalitytypes "github.com/babylonchain/babylon/x/finality/types"
btcstakingtypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
finalitytypes "github.com/babylonlabs-io/babylon/x/finality/types"
)

// these errors are considered unrecoverable because they indicate
Expand Down
4 changes: 2 additions & 2 deletions cosmwasmclient/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

wasmdparams "github.com/CosmWasm/wasmd/app/params"
"github.com/babylonchain/finality-provider/cosmwasmclient/config"
"github.com/babylonchain/finality-provider/cosmwasmclient/query"
"github.com/babylonlabs-io/finality-provider/cosmwasmclient/config"
"github.com/babylonlabs-io/finality-provider/cosmwasmclient/query"
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
"github.com/cosmos/relayer/v2/relayer/chains/cosmos"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion cosmwasmclient/config/query_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config_test
import (
"testing"

"github.com/babylonchain/finality-provider/cosmwasmclient/config"
"github.com/babylonlabs-io/finality-provider/cosmwasmclient/config"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion cosmwasmclient/query/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/babylonchain/finality-provider/cosmwasmclient/config"
"github.com/babylonlabs-io/finality-provider/cosmwasmclient/config"
rpcclient "github.com/cometbft/cometbft/rpc/client"
"github.com/cosmos/cosmos-sdk/client"
)
Expand Down
8 changes: 4 additions & 4 deletions docs/eots.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ You can use your key to create a Schnorr signature over arbitrary data
through the `eotsd sign-schnorr` command.
The command takes as an argument the file path, hashes the file content using
sha256, and signs the hash with the EOTS private key in Schnorr format by the
given `key-name` or `btc-pk`. If both flags `--key-name` and `--btc-pk` are
provided, `btc-pk` takes priority.
given `key-name` or `eots-pk`. If both flags `--key-name` and `--eots-pk` are
provided, `eots-pk` takes priority.
```shell
eotsd sign-schnorr /path/to/data/file --home /path/to/eotsd/home/ --key-name my-key-name --keyring-backend file
Expand All @@ -146,12 +146,12 @@ You can verify the Schnorr signature signed in the previous step through
the `eptsd veify-schnorr-sig` command.
The command takes as an argument the file path, hashes the file content using
sha256 to generate the signed data, and verifies the signature from the `--signature`
flag using the given public key from the `--btc-pk` flag.
flag using the given public key from the `--eots-pk` flag.
If the signature is valid, you will see `Verification is successful!` in the output.
Otherwise, an error message will be printed out.
```shell
eotsd verify-schnorr-sig /path/to/data/file --btc-pk 50b106208c921b5e8a1c45494306fe1fc2cf68f33b8996420867dc7667fde383 \
eotsd verify-schnorr-sig /path/to/data/file --eots-pk 50b106208c921b5e8a1c45494306fe1fc2cf68f33b8996420867dc7667fde383 \
--signature b91fc06b30b78c0ca66a7e033184d89b61cd6ab572329b20f6052411ab83502effb5c9a1173ed69f20f6502a741eeb5105519bb3f67d37612bc2bcce411f8d72 \
--keyring-backend file
```
Expand Down
10 changes: 5 additions & 5 deletions docs/finality-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ this value and specify a custom address using the `--rpc-listener` flag.
This will also start all the registered finality provider instances except for
slashed ones added in [step](#5-create-and-register-a-finality-provider). To start
the daemon with a specific finality provider instance, use the
`--btc-pk` flag followed by the hex string of the BTC public key of the finality
`--eots-pk` flag followed by the hex string of the BTC public key of the finality
provider (`btc_pk_hex`) obtained
in [step](#5-create-and-register-a-finality-provider).

Expand Down Expand Up @@ -175,7 +175,7 @@ the hash of the Babylon finality provider registration transaction.

```bash
fpd register-finality-provider \
--btc-pk d0fc4db48643fbb4339dc4bbf15f272411716b0d60f18bdfeb3861544bf5ef63
--eots-pk d0fc4db48643fbb4339dc4bbf15f272411716b0d60f18bdfeb3861544bf5ef63
{
"tx_hash": "800AE5BBDADE974C5FA5BD44336C7F1A952FAB9F5F9B43F7D4850BA449319BAA"
}
Expand Down Expand Up @@ -219,11 +219,11 @@ fpd list-finality-providers
After the creation of the finality provider in the local db, it is possible
to export the finality provider information through the `fpd export-finality-provider` command.
This command connects with the `fpd` daemon to retrieve the finality
provider previously created using the flag `--btc-pk` as key.
provider previously created using the flag `--eots-pk` as key.

This command also has several flag options:

- `--btc-pk` the hex string of the BTC public key.
- `--eots-pk` the hex string of the BTC public key.
- `--daemon-address` the RPC server address of `fpd` daemon.
- `--signed` signs the finality provider with the chain key of the PoS
chain secured as a proof of untempered exported data.
Expand All @@ -235,7 +235,7 @@ passphrase is required.
- `--hd-path` the hd derivation path of the private key.

```shell
$ fpd export-finality-provider --btc-pk 02face5996b2792114677604ec9dfad4fe66eeace3df92dab834754add5bdd7077 \
$ fpd export-finality-provider --eots-pk 02face5996b2792114677604ec9dfad4fe66eeace3df92dab834754add5bdd7077 \
--home ./export-fp/fpd --key-name finality-provider --signed
```

Expand Down
6 changes: 3 additions & 3 deletions eotsmanager/client/rpcclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/babylonchain/finality-provider/eotsmanager"
"github.com/babylonchain/finality-provider/eotsmanager/proto"
"github.com/babylonchain/finality-provider/eotsmanager/types"
"github.com/babylonlabs-io/finality-provider/eotsmanager"
"github.com/babylonlabs-io/finality-provider/eotsmanager/proto"
"github.com/babylonlabs-io/finality-provider/eotsmanager/types"
)

var _ eotsmanager.EOTSManager = &EOTSManagerGRpcClient{}
Expand Down
2 changes: 1 addition & 1 deletion eotsmanager/cmd/eotsd/daemon/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const (
homeFlag = "home"
forceFlag = "force"
rpcListenerFlag = "rpc-listener"
fpPkFlag = "btc-pk"
eotsPkFlag = "eots-pk"
signatureFlag = "signature"

// flags for keys
Expand Down
4 changes: 2 additions & 2 deletions eotsmanager/cmd/eotsd/daemon/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/jessevdk/go-flags"
"github.com/urfave/cli"

eotscfg "github.com/babylonchain/finality-provider/eotsmanager/config"
"github.com/babylonchain/finality-provider/util"
eotscfg "github.com/babylonlabs-io/finality-provider/eotsmanager/config"
"github.com/babylonlabs-io/finality-provider/util"
)

var InitCommand = cli.Command{
Expand Down
8 changes: 4 additions & 4 deletions eotsmanager/cmd/eotsd/daemon/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/cosmos/go-bip39"
"github.com/urfave/cli"

bbntypes "github.com/babylonchain/babylon/types"
"github.com/babylonchain/finality-provider/eotsmanager"
"github.com/babylonchain/finality-provider/eotsmanager/config"
"github.com/babylonchain/finality-provider/log"
bbntypes "github.com/babylonlabs-io/babylon/types"
"github.com/babylonlabs-io/finality-provider/eotsmanager"
"github.com/babylonlabs-io/finality-provider/eotsmanager/config"
"github.com/babylonlabs-io/finality-provider/log"
)

type KeyOutput struct {
Expand Down
Loading

0 comments on commit 678f0a3

Please sign in to comment.