Skip to content

Commit

Permalink
chore(all): update cosmos-sdk deps (berachain#2221)
Browse files Browse the repository at this point in the history
Co-authored-by: Alessandro Sforzin <alessandro@informal.systems>
Co-authored-by: Friðrik Ásmundsson <fridrik01@gmail.com>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent f30b1db commit e5e526b
Show file tree
Hide file tree
Showing 18 changed files with 266 additions and 233 deletions.
37 changes: 17 additions & 20 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ concurrency:
cancel-in-progress: ${{ !(github.base_ref == 'refs/heads/main' && github.event_name == 'merge_group') || github.ref != 'refs/heads/main' }}

env:
GCP_ID_PROVIDER: 'projects/341806074811/locations/global/workloadIdentityPools/oidc-apps-automation-st-01-pool/providers/gh-apps-oidc-provider'
GCP_SERVICE_ACCOUNT: 'sa-apps-deployment@prj-berachain-automation-st-01.iam.gserviceaccount.com'
GCP_ID_PROVIDER: "projects/341806074811/locations/global/workloadIdentityPools/oidc-apps-automation-st-01-pool/providers/gh-apps-oidc-provider"
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 == github.head_ref && github.event_name == 'push') || github.ref == 'refs/tags/v*'}}
VERSION: ${{ github.ref_name }}

jobs:

# -------------------------------------------------------------------------- #
# Main Pipeline #
# -------------------------------------------------------------------------- #
# -------------------------------------------------------------------------- #
# Main Pipeline #
# -------------------------------------------------------------------------- #

ci:
strategy:
Expand All @@ -64,7 +63,6 @@ jobs:
- "lint"
- "slither"
- "gosec"
- "nilaway"
- "markdownlint"
- "generate-check"
- "tidy-sync-check"
Expand All @@ -90,7 +88,7 @@ jobs:
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: "1.23.0"
go-version: "1.23.4"
check-latest: true
cache-dependency-path: "**/*.sum"
if: ${{ !(matrix.args == 'test-forge-cover' || matrix.args == 'test-forge-fuzz') }}
Expand All @@ -106,10 +104,9 @@ jobs:
files: ./${{ matrix.args }}.txt
if: ${{ matrix.args == 'test-unit-cover' || matrix.args == 'test-forge-cover'}}


# -------------------------------------------------------------------------- #
# E2E Testing #
# -------------------------------------------------------------------------- #
# -------------------------------------------------------------------------- #
# E2E Testing #
# -------------------------------------------------------------------------- #

ci-e2e:
strategy:
Expand Down Expand Up @@ -155,9 +152,9 @@ jobs:
env:
GOPATH: /home/runner/go

# -------------------------------------------------------------------------- #
# Docker Container Build and Push #
# -------------------------------------------------------------------------- #
# -------------------------------------------------------------------------- #
# Docker Container Build and Push #
# -------------------------------------------------------------------------- #

build-and-push-container:
runs-on:
Expand Down Expand Up @@ -203,15 +200,15 @@ jobs:

- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: Authenticate to Google Cloud
id: 'auth'
uses: 'google-github-actions/auth@v2'
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'
uses: 'google-github-actions/setup-gcloud@v2'
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
Expand All @@ -221,4 +218,4 @@ jobs:
- if: ${{ env.PUSH_DOCKER_IMAGE == 'true' }}
name: Push Docker image
run: |
make push-docker-gcp push-docker-github
make push-docker-gcp push-docker-github
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
### Stage 0 - Build Arguments ###
#######################################################

ARG GO_VERSION=1.23.0
ARG GO_VERSION=1.23.4
ARG RUNNER_IMAGE=alpine:3.20
ARG BUILD_TAGS="netgo,muslc,blst,bls12381,pebbledb"
ARG NAME=beacond
Expand Down
5 changes: 5 additions & 0 deletions cli/commands/server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package server

import (
"context"
"errors"

pruningtypes "cosmossdk.io/store/pruning/types"
types "github.com/berachain/beacon-kit/cli/commands/server/types"
Expand Down Expand Up @@ -106,6 +107,10 @@ custom: allow pruning options to be manually specified through 'pruning-keep-rec
RunE: func(cmd *cobra.Command, _ []string) error {
logger := clicontext.GetLoggerFromCmd[LoggerT](cmd)
cfg := clicontext.GetConfigFromCmd(cmd)
if cfg.Consensus.TimeoutCommit == 0 {
return errors.New("please edit your config.toml file and set timeout_commit to 1s")
}

v := clicontext.GetViperFromCmd(cmd)
_, err := GetPruningOptionsFromFlags(v)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/beacond/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/berachain/beacon-kit/node-core/components"
)

//nolint:funlen // happens
//nolint:funlen
func DefaultComponents() []any {
c := []any{
components.ProvideAttributesFactory[
Expand Down
2 changes: 1 addition & 1 deletion cmd/beacond/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package main

import (
"cosmossdk.io/core/appmodule/v2"
appmodule "cosmossdk.io/core/appmodule/v2"
"github.com/berachain/beacon-kit/beacon/blockchain"
"github.com/berachain/beacon-kit/beacon/validator"
"github.com/berachain/beacon-kit/consensus-types/types"
Expand Down
6 changes: 5 additions & 1 deletion consensus/cometbft/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@ func StatusCommand() *cobra.Command {
if err != nil {
return err
}
cometRPC, err := clientCtx.GetNode()
if err != nil {
return err
}

status, err := cmtservice.GetNodeStatus(
context.Background(),
clientCtx,
cometRPC,
)
if err != nil {
return err
Expand Down
14 changes: 10 additions & 4 deletions consensus/cometbft/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,19 @@ func (s *Service[_]) Start(
return err
}

privVal, err := pvm.LoadOrGenFilePV(
cfg.PrivValidatorKeyFile(),
cfg.PrivValidatorStateFile(),
nil,
)
if err != nil {
return err
}

s.node, err = node.NewNode(
ctx,
cfg,
pvm.LoadOrGenFilePV(
cfg.PrivValidatorKeyFile(),
cfg.PrivValidatorStateFile(),
),
privVal,
nodeKey,
proxy.NewLocalClientCreator(s),
GetGenDocProvider(cfg),
Expand Down
Loading

0 comments on commit e5e526b

Please sign in to comment.