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

chore: update to babylon lab #1

Merged
merged 1 commit into from
Aug 5, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:

jobs:
lint_test:
uses: babylonchain/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0
filippos47 marked this conversation as resolved.
Show resolved Hide resolved
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.2.0
with:
run-unit-tests: true
run-integration-tests: false
run-lint: true

docker_pipeline:
uses: babylonchain/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.2.0
secrets: inherit
with:
publish: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ on:

jobs:
lint_test:
uses: babylonchain/.github/.github/workflows/reusable_go_lint_test.yml@v0.1.0
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.2.0
with:
run-unit-tests: true
run-integration-tests: false
run-lint: true

docker_pipeline:
needs: ["lint_test"]
uses: babylonchain/.github/.github/workflows/reusable_docker_pipeline.yml@v0.1.0
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.2.0
secrets: inherit
with:
publish: true
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: staking-expiry-checker
The Licensed Work is (c) 2024 Babylonchain, Inc.
The Licensed Work is (c) 2024 Babylon Labs, Ltd.

Additional Use Grant: None.

Change Date: 2027-05-15 (March 15th, 2027]
Change Date: 2027-05-15 (March 15th, 2027)

Change License: Apache 2.0

Expand Down
16 changes: 8 additions & 8 deletions cmd/staking-expiry-checker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"github.com/joho/godotenv"
"github.com/rs/zerolog/log"

"github.com/babylonchain/staking-expiry-checker/cmd/staking-expiry-checker/cli"
"github.com/babylonchain/staking-expiry-checker/internal/btcclient"
"github.com/babylonchain/staking-expiry-checker/internal/config"
"github.com/babylonchain/staking-expiry-checker/internal/db"
"github.com/babylonchain/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonchain/staking-expiry-checker/internal/poller"
"github.com/babylonchain/staking-expiry-checker/internal/queue"
"github.com/babylonchain/staking-expiry-checker/internal/services"
"github.com/babylonlabs-io/staking-expiry-checker/cmd/staking-expiry-checker/cli"
"github.com/babylonlabs-io/staking-expiry-checker/internal/btcclient"
"github.com/babylonlabs-io/staking-expiry-checker/internal/config"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db"
"github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonlabs-io/staking-expiry-checker/internal/poller"
"github.com/babylonlabs-io/staking-expiry-checker/internal/queue"
"github.com/babylonlabs-io/staking-expiry-checker/internal/services"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions contrib/images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ DOCKER = $(shell which docker)
.PHONY: staking-expiry-checker staking-expiry-checker-rmi

staking-expiry-checker:
$(DOCKER) build --tag babylonchain/staking-expiry-checker -f staking-expiry-checker/Dockerfile \
$(DOCKER) build --tag babylonlabs-io/staking-expiry-checker -f staking-expiry-checker/Dockerfile \
$(shell git rev-parse --show-toplevel)

staking-expiry-checker-rmi:
$(DOCKER) rmi babylonchain/staking-expiry-checker 2>/dev/null; true
$(DOCKER) rmi babylonlabs-io/staking-expiry-checker 2>/dev/null; true
12 changes: 6 additions & 6 deletions contrib/images/staking-expiry-checker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ RUN apk add --no-cache \
openssh

# Build
WORKDIR /go/src/github.com/babylonchain/staking-expiry-checker
WORKDIR /go/src/github.com/babylonlabs-io/staking-expiry-checker
# Cache dependencies
COPY go.mod go.sum /go/src/github.com/babylonchain/staking-expiry-checker/
COPY go.mod go.sum /go/src/github.com/babylonlabs-io/staking-expiry-checker/

# Copy the rest of the files
COPY ./ /go/src/github.com/babylonchain/staking-expiry-checker/
COPY ./ /go/src/github.com/babylonlabs-io/staking-expiry-checker/


RUN LDFLAGS='-extldflags "-static" -v' \
Expand All @@ -37,12 +37,12 @@ RUN addgroup --gid 1138 -S staking-expiry-checker && adduser --uid 1138 -S staki
RUN apk add bash curl jq

# Label should match your github repo
LABEL org.opencontainers.image.source="https://github.com/babylonchain/staking-expiry-checker:${VERSION}"
LABEL org.opencontainers.image.source="https://github.com/babylonlabs-io/staking-expiry-checker:${VERSION}"


# Copy over binaries from the build-env
COPY --from=builder /go/src/github.com/babylonchain/staking-expiry-checker/build/staking-expiry-checker /bin/staking-expiry-checker
COPY --from=builder /go/src/github.com/babylonchain/staking-expiry-checker/contrib/images/staking-expiry-checker/entrypoint.sh /bin/entrypoint.sh
COPY --from=builder /go/src/github.com/babylonlabs-io/staking-expiry-checker/build/staking-expiry-checker /bin/staking-expiry-checker
COPY --from=builder /go/src/github.com/babylonlabs-io/staking-expiry-checker/contrib/images/staking-expiry-checker/entrypoint.sh /bin/entrypoint.sh

WORKDIR /home/staking-expiry-checker
RUN chown -R staking-expiry-checker /home/staking-expiry-checker
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.9"
services:
staking-expiry-checker:
image: babylonchain/staking-expiry-checker:latest
image: babylonlabs/staking-expiry-checker:latest
container_name: staking-expiry-checker
environment:
- CONFIG=/home/staking-expiry-checker/config.yml
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/babylonchain/staking-expiry-checker
module github.com/babylonlabs-io/staking-expiry-checker

go 1.21.6

require (
github.com/babylonchain/staking-queue-client v0.2.0
github.com/babylonlabs-io/staking-queue-client v0.4.1
github.com/btcsuite/btcd v0.24.0
github.com/rabbitmq/amqp091-go v1.9.0
github.com/spf13/viper v1.18.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/babylonchain/staking-queue-client v0.2.0 h1:kktKgXJXDAheBv82s7LV5L2CPAfzhtHllNrIopXGjIo=
github.com/babylonchain/staking-queue-client v0.2.0/go.mod h1:mEgA6N3SnwFwGEOsUYr/HdjpKa13Wck08MS7VY/Icvo=
github.com/babylonlabs-io/staking-queue-client v0.4.1 h1:AW+jtrNxZYN/isRx+njqjHbUU9CzhF42Ke6roK+0N3I=
github.com/babylonlabs-io/staking-queue-client v0.4.1/go.mod h1:n3fr3c+9LNiJlyETmcrVk94Zn76rAADhGZKxX+rVf+Q=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
Expand Down
6 changes: 3 additions & 3 deletions internal/btcclient/btcclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/rpcclient"

"github.com/babylonchain/staking-expiry-checker/internal/config"
"github.com/babylonchain/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonchain/staking-expiry-checker/internal/utils"
"github.com/babylonlabs-io/staking-expiry-checker/internal/config"
"github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonlabs-io/staking-expiry-checker/internal/utils"
)

type BtcClient struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/btc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"fmt"

"github.com/babylonchain/staking-expiry-checker/internal/utils"
"github.com/babylonlabs-io/staking-expiry-checker/internal/utils"
)

type BtcConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

queue "github.com/babylonchain/staking-queue-client/config"
queue "github.com/babylonlabs-io/staking-queue-client/config"
"github.com/spf13/viper"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/db/dbclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

"github.com/babylonchain/staking-expiry-checker/internal/config"
"github.com/babylonchain/staking-expiry-checker/internal/db/model"
"github.com/babylonlabs-io/staking-expiry-checker/internal/config"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db/model"
)

type Database struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/db/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package db
import (
"context"

"github.com/babylonchain/staking-expiry-checker/internal/db/model"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db/model"
"go.mongodb.org/mongo-driver/bson/primitive"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/observability/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/zerolog/log"

"github.com/babylonchain/staking-expiry-checker/internal/utils"
"github.com/babylonlabs-io/staking-expiry-checker/internal/utils"
)

type Outcome string
Expand Down
2 changes: 1 addition & 1 deletion internal/poller/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/rs/zerolog/log"

"github.com/babylonchain/staking-expiry-checker/internal/services"
"github.com/babylonlabs-io/staking-expiry-checker/internal/services"
)

type Poller struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/rs/zerolog/log"

"github.com/babylonchain/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonchain/staking-queue-client/client"
queueConfig "github.com/babylonchain/staking-queue-client/config"
"github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonlabs-io/staking-queue-client/client"
queueConfig "github.com/babylonlabs-io/staking-queue-client/config"
)

type QueueManager struct {
Expand Down
8 changes: 4 additions & 4 deletions internal/services/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package services
import (
"context"

"github.com/babylonchain/staking-expiry-checker/internal/btcclient"
"github.com/babylonchain/staking-expiry-checker/internal/db"
"github.com/babylonchain/staking-expiry-checker/internal/queue"
queueclient "github.com/babylonchain/staking-queue-client/client"
"github.com/babylonlabs-io/staking-expiry-checker/internal/btcclient"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db"
"github.com/babylonlabs-io/staking-expiry-checker/internal/queue"
queueclient "github.com/babylonlabs-io/staking-queue-client/client"
)

type Service struct {
Expand Down
6 changes: 3 additions & 3 deletions tests/expired_delegations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"testing"
"time"

"github.com/babylonchain/staking-expiry-checker/internal/db/model"
"github.com/babylonchain/staking-expiry-checker/tests/mocks"
"github.com/babylonchain/staking-queue-client/client"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db/model"
"github.com/babylonlabs-io/staking-expiry-checker/tests/mocks"
"github.com/babylonlabs-io/staking-queue-client/client"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"go.mongodb.org/mongo-driver/bson/primitive"
Expand Down
2 changes: 1 addition & 1 deletion tests/mocks/mock_db_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions tests/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import (
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

"github.com/babylonchain/staking-expiry-checker/internal/btcclient"
"github.com/babylonchain/staking-expiry-checker/internal/config"
"github.com/babylonchain/staking-expiry-checker/internal/db"
"github.com/babylonchain/staking-expiry-checker/internal/db/model"
"github.com/babylonchain/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonchain/staking-expiry-checker/internal/poller"
"github.com/babylonchain/staking-expiry-checker/internal/queue"
"github.com/babylonchain/staking-expiry-checker/internal/services"
"github.com/babylonchain/staking-queue-client/client"

queueconfig "github.com/babylonchain/staking-queue-client/config"
"github.com/babylonlabs-io/staking-expiry-checker/internal/btcclient"
"github.com/babylonlabs-io/staking-expiry-checker/internal/config"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db"
"github.com/babylonlabs-io/staking-expiry-checker/internal/db/model"
"github.com/babylonlabs-io/staking-expiry-checker/internal/observability/metrics"
"github.com/babylonlabs-io/staking-expiry-checker/internal/poller"
"github.com/babylonlabs-io/staking-expiry-checker/internal/queue"
"github.com/babylonlabs-io/staking-expiry-checker/internal/services"
"github.com/babylonlabs-io/staking-queue-client/client"

queueconfig "github.com/babylonlabs-io/staking-queue-client/config"
)

type TestServerDependency struct {
Expand Down