Skip to content

Commit

Permalink
Migrate to labs (#1)
Browse files Browse the repository at this point in the history
* Migrate to labs
  • Loading branch information
KonradStaniec authored Jul 30, 2024
1 parent 6ba8d4f commit 9ec494f
Show file tree
Hide file tree
Showing 45 changed files with 311 additions and 368 deletions.
103 changes: 0 additions & 103 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
196 changes: 98 additions & 98 deletions CHANGELOG.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ FROM golang:1.22.3 as builder
RUN apt-get update && apt-get install -y make git bash gcc curl jq

# Build
WORKDIR /go/src/github.com/babylonchain/btc-staker
WORKDIR /go/src/github.com/babylonlabs-io/btc-staker
# Cache dependencies
COPY go.mod go.sum /go/src/github.com/babylonchain/btc-staker/
COPY go.mod go.sum /go/src/github.com/babylonlabs-io/btc-staker/
RUN go mod download

# Copy the rest of the files
COPY ./ /go/src/github.com/babylonchain/btc-staker/
COPY ./ /go/src/github.com/babylonlabs-io/btc-staker/

RUN BUILD_TAGS=netgo \
LDFLAGS="-w -s" \
Expand All @@ -22,7 +22,7 @@ FROM debian:bookworm-slim AS run
RUN addgroup --gid 1138 --system btcstaker && adduser --uid 1138 --system --home /home/btcstaker btcstaker
RUN apt-get update && apt-get install -y bash curl jq wget

COPY --from=builder /go/src/github.com/babylonchain/btc-staker/go.mod /tmp
COPY --from=builder /go/src/github.com/babylonlabs-io/btc-staker/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 @@ -31,8 +31,8 @@ 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/btc-staker/build/stakerd /bin/stakerd
COPY --from=builder /go/src/github.com/babylonchain/btc-staker/build/stakercli /bin/stakercli
COPY --from=builder /go/src/github.com/babylonlabs-io/btc-staker/build/stakerd /bin/stakerd
COPY --from=builder /go/src/github.com/babylonlabs-io/btc-staker/build/stakercli /bin/stakercli

WORKDIR /home/btcstaker
RUN chown -R btcstaker /home/btcstaker
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: btc-staker
The Licensed Work is (c) 2023 Babylonchain, Inc.
The Licensed Work is (c) 2023 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
Expand Up @@ -2,7 +2,7 @@ DOCKER = $(shell which docker)
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 @@ -42,7 +42,7 @@ $(BUILDDIR)/:
mkdir -p $(BUILDDIR)/

build-docker:
$(DOCKER) build --tag babylonchain/btc-staker -f Dockerfile \
$(DOCKER) build --tag babylonlabs-io/btc-staker -f Dockerfile \
$(shell git rev-parse --show-toplevel)

.PHONY: build build-docker
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ Please update the following configurations in the provided file:
and this [link](https://github.com/bitcoin/bitcoin/pull/28597).
4. If you want to enable remote connections to the node, you can add
`rpcallowip=0.0.0.0/0` and `rpcbind=0.0.0.0` to the bitcoind command.
5. Start the `bitcoind` with `-txindex` option to make sure btc-staker can get
5. Start the `bitcoind` with `-txindex` option to make sure btc-staker can get
all needed bitcoin transaction data.

```bash
```bash
# Create the service file
sudo tee /etc/systemd/system/bitcoind.service >/dev/null <<EOF
[Unit]
Expand Down Expand Up @@ -228,7 +228,7 @@ command
getwalletinfo
```
The output should be similar to this and the `format` should be `bdb`:
```bash
```bash
{
"walletname": "btcstaker",
"walletversion": 169900,
Expand Down Expand Up @@ -276,11 +276,11 @@ sudo apt install build-essential
To get started, clone the repository to your local machine from Github:
```bash
git clone https://github.com/babylonchain/btc-staker.git
git clone https://github.com/babylonlabs-io/btc-staker.git
```
You can choose a specific version from
the [official releases page](https://github.com/babylonchain/btc-staker/releases)
the [official releases page](https://github.com/babylonlabs-io/btc-staker/releases)
```bash
cd btc-staker # cd into the project directory
Expand Down
18 changes: 9 additions & 9 deletions babylonclient/babyloncontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import (
"strings"
"time"

btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types"
btcctypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"

sdkErr "cosmossdk.io/errors"
sdkmath "cosmossdk.io/math"
"github.com/avast/retry-go/v4"
bbnclient "github.com/babylonchain/babylon/client/client"
bbntypes "github.com/babylonchain/babylon/types"
bcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types"
btclctypes "github.com/babylonchain/babylon/x/btclightclient/types"
btcstypes "github.com/babylonchain/babylon/x/btcstaking/types"
"github.com/babylonchain/btc-staker/stakercfg"
"github.com/babylonchain/btc-staker/stakerdb"
"github.com/babylonchain/btc-staker/utils"
bbnclient "github.com/babylonlabs-io/babylon/client/client"
bbntypes "github.com/babylonlabs-io/babylon/types"
bcctypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"
btclctypes "github.com/babylonlabs-io/babylon/x/btclightclient/types"
btcstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
"github.com/babylonlabs-io/btc-staker/stakercfg"
"github.com/babylonlabs-io/btc-staker/stakerdb"
"github.com/babylonlabs-io/btc-staker/utils"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcutil"
Expand Down
4 changes: 2 additions & 2 deletions babylonclient/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

sdkmath "cosmossdk.io/math"
"github.com/babylonchain/babylon/testutil/datagen"
"github.com/babylonchain/babylon/x/btcstaking/types"
"github.com/babylonlabs-io/babylon/testutil/datagen"
"github.com/babylonlabs-io/babylon/x/btcstaking/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
Expand Down
2 changes: 1 addition & 1 deletion babylonclient/msgsender.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
pv "github.com/cosmos/relayer/v2/relayer/provider"
"golang.org/x/sync/semaphore"

"github.com/babylonchain/btc-staker/utils"
"github.com/babylonlabs-io/btc-staker/utils"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/sirupsen/logrus"
)
Expand Down
6 changes: 3 additions & 3 deletions babylonclient/pop.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package babylonclient
import (
"fmt"

"github.com/babylonchain/babylon/crypto/bip322"
bbn "github.com/babylonchain/babylon/types"
btcstypes "github.com/babylonchain/babylon/x/btcstaking/types"
"github.com/babylonlabs-io/babylon/crypto/bip322"
bbn "github.com/babylonlabs-io/babylon/types"
btcstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
Expand Down
6 changes: 3 additions & 3 deletions babylonclient/utils.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package babylonclient

import (
babylontypes "github.com/babylonchain/babylon/types"
btcctypes "github.com/babylonchain/babylon/x/btccheckpoint/types"
"github.com/babylonchain/btc-staker/utils"
babylontypes "github.com/babylonlabs-io/babylon/types"
btcctypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types"
"github.com/babylonlabs-io/btc-staker/utils"
"github.com/btcsuite/btcd/wire"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/stakercli/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"path"

babylonApp "github.com/babylonchain/babylon/app"
"github.com/babylonchain/btc-staker/stakercfg"
babylonApp "github.com/babylonlabs-io/babylon/app"
"github.com/babylonlabs-io/btc-staker/stakercfg"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/go-bip39"
Expand Down
6 changes: 3 additions & 3 deletions cmd/stakercli/daemon/daemoncommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"strconv"

"github.com/babylonchain/btc-staker/cmd/stakercli/helpers"
scfg "github.com/babylonchain/btc-staker/stakercfg"
dc "github.com/babylonchain/btc-staker/stakerservice/client"
"github.com/babylonlabs-io/btc-staker/cmd/stakercli/helpers"
scfg "github.com/babylonlabs-io/btc-staker/stakercfg"
dc "github.com/babylonlabs-io/btc-staker/stakerservice/client"
"github.com/urfave/cli"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/stakercli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

cmdadmin "github.com/babylonchain/btc-staker/cmd/stakercli/admin"
cmddaemon "github.com/babylonchain/btc-staker/cmd/stakercli/daemon"
cmdtx "github.com/babylonchain/btc-staker/cmd/stakercli/transaction"
cmdadmin "github.com/babylonlabs-io/btc-staker/cmd/stakercli/admin"
cmddaemon "github.com/babylonlabs-io/btc-staker/cmd/stakercli/daemon"
cmdtx "github.com/babylonlabs-io/btc-staker/cmd/stakercli/transaction"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/stakercli/transaction/parsers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"math"

"github.com/babylonchain/babylon/btcstaking"
"github.com/babylonlabs-io/babylon/btcstaking"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcec/v2/schnorr"
"github.com/btcsuite/btcd/btcutil"
Expand Down
Loading

0 comments on commit 9ec494f

Please sign in to comment.