Skip to content

Commit

Permalink
Merge branch 'main' into tuan/fix-serializer-offset
Browse files Browse the repository at this point in the history
  • Loading branch information
TropicalDog17 committed Jun 15, 2024
2 parents 44c835a + c39920a commit 2c429af
Show file tree
Hide file tree
Showing 85 changed files with 1,564 additions and 873 deletions.
35 changes: 22 additions & 13 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ name: pipeline
on:
push:
branches:
- main
- main
tags:
- "v*"
pull_request:
merge_group:

Expand All @@ -45,8 +47,8 @@ env:
GCP_SERVICE_ACCOUNT: 'sa-apps-deployment@prj-berachain-automation-st-01.iam.gserviceaccount.com'
GCP_REGISTRY: northamerica-northeast1-docker.pkg.dev
GHCR_REGISTRY: ghcr.io
PUSH_DOCKER_IMAGE: ${{ (github.base_ref == 'main' && github.head_ref == 'main' && github.event_name == 'push') || github.ref == 'refs/tags/v*.*.*'}}
VERSION: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/tags/v*.*.*' ) && github.ref_name || github.sha }}
PUSH_DOCKER_IMAGE: ${{ (github.base_ref == github.head_ref && github.event_name == 'push') || github.ref == 'refs/tags/v*'}}
VERSION: ${{ github.ref_name }}

jobs:

Expand Down Expand Up @@ -179,31 +181,38 @@ jobs:
echo "GitHub Head Ref: ${{ github.head_ref }}"
echo "GitHub Base Ref: ${{ github.base_ref }}"
echo "PUSH_DOCKER_IMAGE: ${{ env.PUSH_DOCKER_IMAGE }}"
echo "VERSION: ${{ env.VERSION }}"
- name: Build Docker image
run: |
make build-docker
- name: Authenticate to GitHub Container Registry
- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: Authenticate to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GH_TOKEN }}
if: ${{ env.PUSH_DOCKER_IMAGE == true }}
- name: Authenticate to Google Cloud

- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: Authenticate to Google Cloud
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
workload_identity_provider: ${{ env.GCP_ID_PROVIDER }}
service_account: ${{ env.GCP_SERVICE_ACCOUNT }}
if: ${{ env.PUSH_DOCKER_IMAGE == true }}
- name: 'Set up Cloud SDK'

- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
if: ${{ env.PUSH_DOCKER_IMAGE == true }}
- name: Setup Docker to use Google Cloud OIDC

- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: Setup Docker to use Google Cloud OIDC
run: |
gcloud auth configure-docker ${{ env.GCP_REGISTRY }} --quiet
if: ${{ env.PUSH_DOCKER_IMAGE == true }}
- name: Push Docker image
- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: Push Docker image
run: |
make push-docker-gcp push-docker-github
if: ${{ env.PUSH_DOCKER_IMAGE == true }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ COPY ./mod/async/go.mod ./mod/async/go.sum ./mod/async/
COPY ./mod/beacon/go.mod ./mod/beacon/go.sum ./mod/beacon/
COPY ./mod/cli/go.mod ./mod/cli/go.sum ./mod/cli/
COPY ./mod/consensus-types/go.mod ./mod/consensus-types/go.sum ./mod/consensus-types/
COPY ./mod/config/go.mod ./mod/config/go.sum ./mod/config/
COPY ./mod/da/go.mod ./mod/da/go.sum ./mod/da/
COPY ./mod/engine-primitives/go.mod ./mod/engine-primitives/go.sum ./mod/engine-primitives/
COPY ./mod/execution/go.mod ./mod/execution/go.sum ./mod/execution/
Expand All @@ -61,6 +62,7 @@ RUN go work use ./beacond
RUN go work use ./mod/async
RUN go work use ./mod/beacon
RUN go work use ./mod/cli
RUN go work use ./mod/config
RUN go work use ./mod/consensus-types
RUN go work use ./mod/da
RUN go work use ./mod/execution
Expand Down
16 changes: 13 additions & 3 deletions beacond/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ import (
"log/slog"
"os"

"github.com/berachain/beacon-kit/mod/cli/pkg/components"
nodebuilder "github.com/berachain/beacon-kit/mod/node-core/pkg/builder"
"github.com/berachain/beacon-kit/mod/node-core/pkg/components"
nodecomponents "github.com/berachain/beacon-kit/mod/node-core/pkg/components"
"github.com/berachain/beacon-kit/mod/node-core/pkg/types"
"github.com/cosmos/cosmos-sdk/server"
"go.uber.org/automaxprocs/maxprocs"
)

Expand All @@ -50,7 +52,15 @@ func run() error {
nodebuilder.DefaultDepInjectConfig()),
// Set the Runtime Components to the Default.
nodebuilder.WithComponents[types.NodeI](
components.DefaultComponentsWithStandardTypes(),
nodecomponents.DefaultComponentsWithStandardTypes(),
),
// Set the Client Components to the Default.
nodebuilder.WithClientComponents[types.NodeI](
components.DefaultClientComponents(),
),
// TODO: this is hood and needs to be refactored.
nodebuilder.WithTODORemoveRunHandler[types.NodeI](
server.InterceptConfigsPreRunHandler,
),
)

Expand All @@ -61,7 +71,7 @@ func run() error {
}

// TODO: create a "runner" type harness that takes the node as a parameter.
return node.Run()
return node.Run(components.DefaultNodeHome)
}

// main is the entry point.
Expand Down
50 changes: 26 additions & 24 deletions beacond/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ replace (
cosmossdk.io/core => cosmossdk.io/core v0.12.1-0.20240530104414-90cbb022d5f6
cosmossdk.io/x/auth => cosmossdk.io/x/auth v0.0.0-20240530104414-90cbb022d5f6
cosmossdk.io/x/staking => cosmossdk.io/x/staking v0.0.0-20240530104414-90cbb022d5f6
github.com/berachain/beacon-kit/mod/cli => ../mod/cli
github.com/berachain/beacon-kit/mod/config => ../mod/config
github.com/cosmos/cosmos-sdk => github.com/berachain/cosmos-sdk v0.46.0-beta2.0.20240529213909-58c32d695e1a
)

require (
github.com/berachain/beacon-kit/mod/cli v0.0.0-20240614154006-a5defa6198f5
github.com/berachain/beacon-kit/mod/node-core v0.0.0-20240614135647-9814c0c41144
github.com/cosmos/cosmos-sdk v0.51.0
go.uber.org/automaxprocs v1.5.3
)

Expand Down Expand Up @@ -46,19 +50,19 @@ require (
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/berachain/beacon-kit/mod/async v0.0.0-20240613053350-44a7fdc4cd1d // indirect
github.com/berachain/beacon-kit/mod/beacon v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/cli v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240612175710-7d5f3e4f7041 // indirect
github.com/berachain/beacon-kit/mod/da v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240612175710-7d5f3e4f7041 // indirect
github.com/berachain/beacon-kit/mod/errors v0.0.0-20240614135647-9814c0c41144 // indirect
github.com/berachain/beacon-kit/mod/execution v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/async v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/beacon v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/config v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/da v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240614170830-558fac144a58 // indirect
github.com/berachain/beacon-kit/mod/errors v0.0.0-20240614170055-80f843fefa51 // indirect
github.com/berachain/beacon-kit/mod/execution v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/interfaces v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/log v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/log v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/p2p v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/payload v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240614135647-9814c0c41144 // indirect
github.com/berachain/beacon-kit/mod/payload v0.0.0-20240614154006-a5defa6198f5 // indirect
github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240614170055-80f843fefa51 // indirect
github.com/berachain/beacon-kit/mod/runtime v0.0.0-20240614135647-9814c0c41144 // indirect
github.com/berachain/beacon-kit/mod/state-transition v0.0.0-20240610210054-bfdc14c4013c // indirect
github.com/berachain/beacon-kit/mod/storage v0.0.0-20240610210054-bfdc14c4013c // indirect
Expand All @@ -72,15 +76,14 @@ require (
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240610113006-a7ff6f377099 // indirect
github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240613135100-716d8f8c592d // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.2 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect
github.com/cosmos/cosmos-sdk v0.51.0 // indirect
github.com/cosmos/crypto v0.0.0-20240312084433-de8f9c76030d // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
Expand Down Expand Up @@ -131,7 +134,7 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
Expand All @@ -145,14 +148,14 @@ require (
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/holiman/uint256 v1.2.5-0.20240612125212-75a520988c94 // indirect
github.com/huandu/skiplist v1.2.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/itsdevbear/comet-bls12-381 v0.0.0-20240413212931-2ae2f204cde7 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
Expand Down Expand Up @@ -182,26 +185,26 @@ require (
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.54.0 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prysmaticlabs/gohashtree v0.0.4-beta // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.11.0 // indirect
github.com/rs/zerolog v1.33.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/supranational/blst v0.3.12 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.7.0 // indirect
Expand All @@ -214,9 +217,8 @@ require (
gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect
go.etcd.io/bbolt v1.4.0-alpha.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240529005216-23cca8864a10 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
Expand All @@ -226,7 +228,7 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 2c429af

Please sign in to comment.