Skip to content

Commit

Permalink
migrate to labs
Browse files Browse the repository at this point in the history
  • Loading branch information
gitferry committed Jul 31, 2024
1 parent d7647a2 commit 578f4f1
Show file tree
Hide file tree
Showing 30 changed files with 151 additions and 149 deletions.
42 changes: 21 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))



Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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 && \
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.

Parameters

Licensor: Babylonchain, Inc.
Licensor: BabylonLabs, Ltd.

Licensed Work: covenant-emulator
The Licensed Work is (c) 2023 Babylonchain, Inc.
The Licensed Work is (c) 2024 BabylonLabs, 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

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

GO_BIN := ${GOPATH}/bin

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/),
Expand Down Expand Up @@ -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 [email protected]:babylonchain/covenant-emulator.git
$ git clone [email protected]: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
Expand Down
22 changes: 10 additions & 12 deletions clientcontroller/babylon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions clientcontroller/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion clientcontroller/retry_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/covd/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"

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{
Expand Down
6 changes: 3 additions & 3 deletions cmd/covd/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 6 additions & 6 deletions cmd/covd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion config/babylon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 8 additions & 8 deletions covenant/covenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ 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"
"github.com/btcsuite/btcd/chaincfg"
"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 (
Expand Down
16 changes: 8 additions & 8 deletions covenant/covenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion covenant/service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 578f4f1

Please sign in to comment.