Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Test cd #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 0 additions & 102 deletions .circleci/config.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ci

on:
pull_request:
branches:
- '**'

jobs:
lint_test:
uses: babylonlabs-io/.github/.github/workflows/[email protected]
with:
run-unit-tests: true
run-integration-tests: true
run-lint: true

docker_pipeline:
uses: babylonlabs-io/.github/.github/workflows/[email protected]
secrets: inherit
with:
publish: false
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: docker_publish

on:
push:
branches:
- 'main'
- 'dev'
tags:
- '*'

jobs:
lint_test:
uses: babylonlabs-io/.github/.github/workflows/[email protected]
with:
run-unit-tests: true
run-integration-tests: true
run-lint: true

docker_pipeline:
needs: ["lint_test"]
uses: babylonlabs-io/.github/.github/workflows/[email protected]
secrets: inherit
with:
publish: true
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: 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

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
Loading
Loading