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

build: Release with v-tags #424

Merged
merged 29 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f45e2ab
fix(installer): Get installer to handle multi-platform binaries [DEV-…
ankurdotb Aug 22, 2022
e748357
fix(installer): Backport to v0.6.x release branch (#379)
ankurdotb Aug 22, 2022
904f50d
dragonberry
faddat Oct 16, 2022
35ba628
dragonberry
faddat Oct 16, 2022
a5cb640
build: Backport workflow and other fixes to release/0.6.x branch [DEV…
ankurdotb Oct 16, 2022
cdebe8e
Merge branch 'dragonberry-fix' into dragonberry
ankurdotb Oct 17, 2022
24a8ef4
fix: dragonberry (#409)
ankurdotb Oct 17, 2022
c7f6920
Bump version of cosmos sdk
Oct 17, 2022
1d702bb
Go mod tidy
askolesov Oct 17, 2022
6667393
Switch back to cheqd cosmos fork
askolesov Oct 17, 2022
9dda22f
Fix build
askolesov Oct 17, 2022
8fee4b1
Bump dockerfile go v1.18
Eengineer1 Oct 17, 2022
2ac121a
Added recommended patch changes
Eengineer1 Oct 17, 2022
c6e1ae9
Update configure.go
askolesov Oct 17, 2022
a7ee8c6
Woraround for Tendermint's defaut storage config
askolesov Oct 17, 2022
04db591
Fix dockerfile
askolesov Oct 17, 2022
68b66b9
Remove .dockerignore
askolesov Oct 17, 2022
784122c
Fix cosmos deafult config
askolesov Oct 17, 2022
d332dbc
fix(security): Bump version of cosmos sdk (#413)
askolesov Oct 17, 2022
7ddf6a6
Merge branch 'release/0.6.x' into dragonberry-fix
ankurdotb Oct 17, 2022
68d03ca
Create .dockerignore
ankurdotb Oct 17, 2022
5e53237
Revert copy stage changes
ankurdotb Oct 17, 2022
77c6f08
Bump golang CI linter to 1.18
ankurdotb Oct 17, 2022
644a0df
Bump CodeQL to 1.18
ankurdotb Oct 17, 2022
fb1d244
ci(docker): Docker build for Dragonberry patch [DEV-1824] (#411)
ankurdotb Oct 17, 2022
fb1840e
Update .releaserc.json
ankurdotb Oct 25, 2022
20b5abe
Update package-lock.json
ankurdotb Oct 25, 2022
db8d086
Update go.mod
ankurdotb Oct 25, 2022
aec60a2
Merge branch 'main' into release-with-v-tags
ankurdotb Oct 25, 2022
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
2 changes: 1 addition & 1 deletion .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ linters:
linters-settings:

gofumpt:
lang-version: "1.17"
lang-version: "1.18"

misspell:
ignore-words:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: 1.17

go-version: 1.18
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- main
- develop
- release/**
types:
- opened
- reopened
Expand Down
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"prerelease": true
}
],
"tagFormat": "${version}",
"tagFormat": "v${version}",
"ci": true,
"preset": "conventionalcommits",
"plugins": [
Expand Down
1 change: 1 addition & 0 deletions cmd/cheqd-noded/cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func minGasPricesCmd(defaultNodeHome string) *cobra.Command {

return updateCosmConfig(clientCtx.HomeDir, func(config *cosmcfg.Config) {
config.MinGasPrices = args[0]
config.IAVLDisableFastNode = false
})
},
}
Expand Down
6 changes: 6 additions & 0 deletions cmd/cheqd-noded/cmd/init_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ func applyConfigDefaults(cmd *cobra.Command) error {
config.P2P.SendRate = 20000000
config.P2P.RecvRate = 20000000
config.P2P.MaxPacketMsgPayloadSize = 10240

// Workaroud for Tendermint's bug
config.Storage = tmcfg.DefaultStorageConfig()
})
if err != nil {
return err
}

err = updateCosmConfig(clientCtx.HomeDir, func(config *cosmcfg.Config) {
config.BaseConfig.MinGasPrices = "25ncheq"

// Workaroud for Cosmos's bug
config.BaseConfig.PruningKeepEvery = "0"
})
if err != nil {
return err
Expand Down
2 changes: 2 additions & 0 deletions cmd/cheqd-noded/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a
baseapp.SetSnapshotStore(snapshotStore),
baseapp.SetSnapshotInterval(cast.ToUint64(appOpts.Get(server.FlagStateSyncSnapshotInterval))),
baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))),
baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))),
baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode))),
)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/cheqd-noded/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func readCosmConfig(homeDir string) (cosmcfg.Config, error) {
return cosmcfg.Config{}, fmt.Errorf("failed to read in app.toml: %w", err)
}

config := cosmcfg.GetConfig(v)
config, _ := cosmcfg.GetConfig(v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to propagate errors instead of ignoring


return config, nil
}
Expand Down
15 changes: 9 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### STAGE 1: Build node binary pre-requisites ###
###############################################################

FROM golang:1.17-alpine AS builder
FROM golang:1.18-alpine AS builder

# Install minimum necessary dependencies
ENV PACKAGES curl make git libc-dev bash gcc linux-headers
Expand All @@ -15,7 +15,7 @@ WORKDIR /go/src/github.com/cheqd/cheqd-node
COPY . .

# Make node binary
RUN go mod download && make build-linux
RUN make build

###############################################################
### STAGE 2: Build cheqd-node image ###
Expand All @@ -32,14 +32,17 @@ COPY --from=builder /go/src/github.com/cheqd/cheqd-node/build/cheqd-noded /bin/c
# Set user directory and details
ARG HOME_DIR="/home/cheqd"
ARG USER="cheqd"
ARG GROUP=${USER}
ARG UID=1000
ARG GID=${UID}

# Add cheqd user to use in the container
RUN addgroup --system ${USER} \
&& adduser ${USER} --system --home ${HOME_DIR} --shell /bin/bash
RUN addgroup --system ${GROUP} --gid ${GID} \
&& adduser ${USER} --uid ${UID} -G ${GROUP} --system --home ${HOME_DIR} --shell /bin/bash

# Set entrypoint script
COPY --chown=cheqd:cheqd docker/entrypoint.sh /bin/node-start
RUN chmod +x /bin/node-start
COPY --chown=${USER}:${GROUP} docker/entrypoint.sh /bin/node-start
RUN chmod +rx /bin/node-start

# Set working directory & bash defaults
WORKDIR ${HOME_DIR}
Expand Down
58 changes: 32 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/cheqd/cheqd-node

go 1.17
go 1.18

require (
filippo.io/edwards25519 v1.0.0-beta.2
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/cosmos/cosmos-sdk v0.45.5
github.com/cosmos/ibc-go/v3 v3.1.0
github.com/cosmos/cosmos-sdk v0.45.9
github.com/cosmos/ibc-go/v3 v3.3.0
github.com/gabriel-vasile/mimetype v1.4.1
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/gogo/protobuf v1.3.3
Expand All @@ -22,31 +22,32 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.0
github.com/tendermint/tendermint v0.34.19
github.com/tendermint/tendermint v0.34.21
github.com/tendermint/tm-db v0.6.6
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd
google.golang.org/grpc v1.46.2
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
google.golang.org/grpc v1.48.0
)

require (
github.com/99designs/keyring v1.1.6 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/DataDog/zstd v1.4.5 // indirect
github.com/Workiva/go-datastructures v1.0.53 // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/armon/go-metrics v0.4.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/btcsuite/btcd v0.22.0-beta // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/coinbase/rosetta-sdk-go v0.7.0 // indirect
github.com/confio/ics23/go v0.7.0 // indirect
github.com/cosmos/btcutil v1.0.4 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/iavl v0.17.3 // indirect
github.com/cosmos/iavl v0.19.3 // indirect
github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect
github.com/cosmos/ledger-go v0.9.2 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
github.com/danieljoos/wincred v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d // indirect
Expand All @@ -59,7 +60,7 @@ require (
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/goccy/go-json v0.9.7 // indirect
Expand All @@ -82,18 +83,19 @@ require (
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
github.com/lestrrat-go/blackmagic v1.0.0 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/iter v1.0.1 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/lib/pq v1.10.4 // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/lib/pq v1.10.6 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand All @@ -104,47 +106,51 @@ require (
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/onsi/gomega v1.22.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/common v0.34.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/rs/cors v1.8.2 // indirect
github.com/rs/zerolog v1.23.0 // indirect
github.com/rs/zerolog v1.27.0 // indirect
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca // indirect
github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect
github.com/tendermint/btcd v0.1.1 // indirect
github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/zondax/hid v0.9.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.0.0-20220726230323-06994584191e // indirect
golang.org/x/sys v0.0.0-20220727055044-e65921a090b8 // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.6 // indirect
)

replace (
github.com/cosmos/cosmos-sdk => github.com/cheqd/cosmos-sdk v0.45.5-cheqd-tag
// Dragonberry fix
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0

// Fee payer support
github.com/cosmos/cosmos-sdk => github.com/cheqd/cosmos-sdk v0.45.9-cheqd-tag

// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0

github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/tecbot/gorocksdb => github.com/cosmos/gorocksdb v1.2.0
google.golang.org/grpc => google.golang.org/grpc v1.33.2
Expand Down
Loading