Skip to content

Commit

Permalink
build: Release with v-tags (#424)
Browse files Browse the repository at this point in the history
* fix(installer): Get installer to handle multi-platform binaries [DEV-1667] (#376)

* Add support for determining the correct Github Release asset based on OS type and architecture
* Set recommended Docker image version

Signed-off-by: Andrew Nikitin <andrew.nikitin@evernym.com>
Co-authored-by: Andrew Nikitin <andrew.nikitin@evernym.com>

* fix(installer): Backport to v0.6.x release branch (#379)

* dragonberry

* dragonberry

* build: Backport workflow and other fixes to release/0.6.x branch [DEV-1822] (#410)

* feat(installer): Get installer to handle multi-platform binaries [DEV-1667] (#376)
* Add support for determining the correct Github Release asset based on OS type and architecture
* Set recommended Docker image version

Signed-off-by: Andrew Nikitin <andrew.nikitin@evernym.com>
Co-authored-by: Andrew Nikitin <andrew.nikitin@evernym.com>

* fix(release): Bump semantic release package (#377)
Bump semantic release

* ci: Add v0.6.x release branch (#378)
Update .releaserc.json

* chore(deps-dev): Bump semantic-release from 19.0.4 to 19.0.5 (#383)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 19.0.4 to 19.0.5.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](semantic-release/semantic-release@v19.0.4...v19.0.5)

---
updated-dependencies:
- dependency-name: semantic-release
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump: Proto dependencies (#391)

* chore(deps): Bump bufbuild/buf-setup-action from 1.7.0 to 1.8.0 (#393)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Fix installer template for rsyslog [DEV-1815] (#403)

* Remove Debian postinstall/purge scripts
* Fix rsyslog template

* ci: Sync workflow changes to main [DEV-1816] (#407)

* Fix localnet running
* Squashed commit of the following:
* Change dispatch dependencies
* Add persist credentials to CodeQL
* Update .releaserc.json
* Update package-lock.json
* Added Docker metadata step to build
* Add updated caching and tagging in release
* Update test.yml
* Cache go setup
* Deactivate junit action
* Update dispatch.yml
* Bump go mod
* Revert changes in sync
* Reset testify

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Andrew Nikitin <andrew.nikitin@cheqd.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Kolesov <alexandr.kolesov@dsr-corporation.com>
Co-authored-by: abdulla-ashurov <abdulla.ashurov@dsr-corporation.com>
Co-authored-by: Andrew Nikitin <andrew.nikitin@cheqd.io>

* Bump version of cosmos sdk

Signed-off-by: Andrew Nikitin <andrew.nikitin@cheqd.io>

* Go mod tidy

* Switch back to cheqd cosmos fork

* Fix build

* Bump dockerfile go v1.18

* Added recommended patch changes

* Update configure.go

* Woraround for Tendermint's defaut storage config

* Fix dockerfile

* Remove .dockerignore

* Fix cosmos deafult config

* Create .dockerignore

* Revert copy stage changes

* Bump golang CI linter to 1.18

* Bump CodeQL to 1.18

* Update .releaserc.json

* Update package-lock.json

* Update go.mod

Signed-off-by: Andrew Nikitin <andrew.nikitin@evernym.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Andrew Nikitin <andrew.nikitin@cheqd.io>
Co-authored-by: Andrew Nikitin <andrew.nikitin@evernym.com>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Kolesov <alexandr.kolesov@dsr-corporation.com>
Co-authored-by: abdulla-ashurov <abdulla.ashurov@dsr-corporation.com>
Co-authored-by: Andrew Nikitin <andrew.nikitin@cheqd.io>
Co-authored-by: Alexandr Kolesov <kolesov.alex.s@gmail.com>
Co-authored-by: Tasos <50984242+Eengineer1@users.noreply.github.com>
Co-authored-by: Alexander Kolesov <alexandr.kolesov@cheqd.io>
  • Loading branch information
10 people committed Oct 25, 2022
1 parent 5d08b60 commit 46c569a
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 566 deletions.
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)

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

0 comments on commit 46c569a

Please sign in to comment.