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

Merge 'main-v0.50' into main. #1908

Merged
merged 13 commits into from
Apr 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'

- name: Go mod vendor
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.21'
- name: Setup Job
id: setup
run: |
Expand Down
64 changes: 8 additions & 56 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
version: ${{ steps.vars.outputs.version }}
is_release: ${{ steps.vars.outputs.is_release }}
prerelease: ${{ steps.vars.outputs.prerelease }}
go_version: '1.20'
go_version: '1.21'

build_osx:
runs-on: macos-latest
Expand All @@ -72,10 +72,10 @@ jobs:
- name: Build osx binary
run: |
export VERSION=${{ needs.build_init.outputs.version }}
export WITH_CLEVELDB=false
export WITH_ROCKSDB=false
make build-release-zip
- name: Provenanced version
# TODO[1760]: github: Re-enable the build_osx provenanced version step.
if: false
run: build/provenanced version --long
- uses: actions/upload-artifact@v4
with:
Expand All @@ -100,54 +100,22 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
- name: Build and install cleveldb
run: make cleveldb
- name: Build linux binary
run: |
export VERSION=${{ needs.build_init.outputs.version }}
export WITH_CLEVELDB=true
make build-release-zip
- name: Provenanced version
# TODO[1760]: github: Re-enable the build_linux provenanced version step.
if: false
run: build/provenanced version --long
- name: Compile Tests
# TODO[1760]: github: Delete this build_linux Compile Tests step.
run: go test -mod=readonly -timeout 30m -tags='norace ledger test_ledger_mock' -run='ZYX_NOT_A_REAL_TEST_XZY' ./...
- uses: actions/upload-artifact@v4
with:
name: linux-zip
path: build/provenance*.zip

build_dbmigrate:
runs-on: ubuntu-20.04
needs:
- build_init
name: Build dbmigrate
env:
LD_LIBRARY_PATH: /usr/local/lib:/usr/local/lib/x86_64-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ needs.build_init.outputs.go_version }}
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
- name: Build and install cleveldb
run: make cleveldb
- name: Build dbmigrate binary
run: |
export VERSION=${{ needs.build_init.outputs.version }}
export WITH_CLEVELDB=true
export WITH_ROCKSDB=false
export WITH_BADGERDB=false
make build-dbmigrate-zip
- name: dbmigrate --help
run: build/dbmigrate --help
- uses: actions/upload-artifact@v4
with:
name: dbmigrate-zip
path: build/dbmigrate*.zip

buf_push:
needs:
- build_init
Expand All @@ -169,7 +137,6 @@ jobs:
needs:
- build_init
- build_linux
- build_dbmigrate
if: needs.build_init.outputs.is_release == 'true'
runs-on: ubuntu-latest
name: Create Release
Expand Down Expand Up @@ -209,11 +176,6 @@ jobs:
with:
name: linux-zip
path: build/
- name: Download dbmigrate zip artifact
uses: actions/download-artifact@v4
with:
name: dbmigrate-zip
path: build/
- name: Create release items
id: create-items
run: |
Expand All @@ -228,16 +190,6 @@ jobs:
asset_path: ./build/provenance-linux-amd64-${{ needs.build_init.outputs.version }}.zip
asset_name: provenance-linux-amd64-${{ needs.build_init.outputs.version }}.zip
asset_content_type: application/octet-stream
- name: Upload dbmigrate zip artifact
if: always() && steps.create-items.outcome == 'success'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.release_url }}
asset_path: ./build/dbmigrate-linux-amd64-${{ needs.build_init.outputs.version }}.zip
asset_name: dbmigrate-linux-amd64-${{ needs.build_init.outputs.version }}.zip
asset_content_type: application/octet-stream
- name: Upload release checksum
if: always() && steps.create-items.outcome == 'success'
uses: actions/upload-release-asset@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rosetta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-go@v5
if: ${{ env.GIT_DIFF }}
with:
go-version: '1.20'
go-version: '1.21'
- name: Go mod vendor
if: ${{ env.GIT_DIFF }}
run: |
Expand Down
51 changes: 2 additions & 49 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,13 @@ jobs:
file_prefix="sim-test-${GITHUB_SHA:0:7}-${GITHUB_RUN_ATTEMPT}"
echo "Setting output: file-prefix=$file_prefix"
echo "file-prefix=$file_prefix" >> "$GITHUB_OUTPUT"
db_cache_key_hash="${{ hashFiles('scripts/cleveldb_build_and_install.sh') }}"
echo "Setting output: db-cache-key-hash=$db_cache_key_hash"
echo "db-cache-key-hash=$db_cache_key_hash" >> "$GITHUB_OUTPUT"
go_cache_key_hash="${{ hashFiles('go.sum') }}"
echo "Setting output: go-cache-key-hash=$go_cache_key_hash"
echo "go-cache-key-hash=$go_cache_key_hash" >> "$GITHUB_OUTPUT"
outputs:
go-version: '1.20'
go-version: '1.21'
should-run: ${{ env.GIT_DIFF }}
file-prefix: ${{ steps.def-vars.outputs.file-prefix }}
db-cache-key-suffix: sims-db3-${{ steps.def-vars.outputs.db-cache-key-hash }}
# In Order:
# * The leveldb repo tarball
# * The directory extracted from the leveldb tarball
db-cache-path: |
leveldb*.tar.gz
leveldb-*
go-cache-key-suffix: sims-go3-${{ steps.def-vars.outputs.go-cache-key-hash }}
# In Order:
# * Go binary directory
Expand All @@ -79,16 +69,8 @@ jobs:
echo " go-version: [${{ needs.setup.outputs.go-version }}]"
echo " should-run: [${{ needs.setup.outputs.should-run }}]"
echo " file-prefix: [${{ needs.setup.outputs.file-prefix }}]"
echo "db-cache-key-suffix: [${{ needs.setup.outputs.db-cache-key-suffix }}]"
echo " db-cache-path: [${{ needs.setup.outputs.db-cache-path }}]"
echo "go-cache-key-suffix: [${{ needs.setup.outputs.go-cache-key-suffix }}]"
echo " go-cache-path: [${{ needs.setup.outputs.go-cache-path }}]"
- uses: actions/cache@v4
name: Load db cache
id: db-cache-setup
with:
key: ${{ runner.os }}-${{ needs.setup.outputs.db-cache-key-suffix }}
path: ${{ needs.setup.outputs.db-cache-path }}
- uses: actions/cache@v4
name: Load go cache
id: go-cache-setup
Expand All @@ -101,21 +83,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev wget curl build-essential cmake gcc sqlite3
- name: Build cleveldb
if: steps.db-cache-setup.outputs.cache-hit != 'true'
run: |
export CLEVELDB_DO_BUILD='true'
export CLEVELDB_DO_INSTALL='false'
export CLEVELDB_DO_CLEANUP='false'
make cleveldb
- name: Install cleveldb
run: |
export CLEVELDB_DO_BUILD='false'
export CLEVELDB_DO_INSTALL='true'
export CLEVELDB_SUDO='true'
export CLEVELDB_DO_CLEANUP='false'
make cleveldb
echo 'WITH_CLEVELDB=true' >> "$GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: ${{ needs.setup.outputs.go-version }}
Expand Down Expand Up @@ -198,16 +165,11 @@ jobs:
# The test-sim-simple test is pretty quick and should be able to identify glaring problems.
# The test-sim-benchmark is handy to have for each db type.
test: ["simple", "benchmark"]
db-backend: ["goleveldb", "cleveldb"]
db-backend: ["goleveldb"]
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
name: Load db cache
with:
key: ${{ runner.os }}-${{ needs.setup.outputs.db-cache-key-suffix }}
path: ${{ needs.setup.outputs.db-cache-path }}
- uses: actions/cache@v4
name: Load go cache
with:
Expand All @@ -219,15 +181,6 @@ jobs:
test_logs="${{ needs.setup.outputs.file-prefix }}-${{ matrix.test }}-${{ matrix.db-backend }}-${{ matrix.os }}"
echo "Setting output: test-logs=$test_logs"
echo "test-logs=$test_logs" >> "$GITHUB_OUTPUT"
- name: Install cleveldb
if: matrix.db-backend == 'cleveldb'
run: |
export CLEVELDB_DO_BUILD='false'
export CLEVELDB_DO_INSTALL='true'
export CLEVELDB_SUDO='true'
export CLEVELDB_DO_CLEANUP='false'
make cleveldb
echo 'WITH_CLEVELDB=true' >> "$GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: ${{ needs.setup.outputs.go-version }}
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
path: ./pkgs.txt.part.03
outputs:
should-run: ${{ env.GIT_DIFF }}
go-version: '1.20'
go-version: '1.21'
file-prefix: ${{ steps.def-vars.outputs.file-prefix }}


Expand Down Expand Up @@ -109,6 +109,19 @@ jobs:
name: "${{ needs.setup-tests.outputs.file-prefix }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out

build-tests:
# TODO[1760]: Delete this build-tests action once the tests reliably pass again.
needs: setup-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
if: needs.setup-tests.outputs.should-run
with:
go-version: ${{ needs.setup-tests.outputs.go-version }}
- name: build tests
run: |
make build-tests

# This action performs a code coverage assessment but filters out generated code from proto based types
# and grpc services
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ data/
.idea/
*.swp
utils/
!cmd/dbmigrate/utils
.blockade
blockade.yaml
*.sock
Expand All @@ -22,7 +21,7 @@ vendor/
# VS Code
.history/
.vscode/
__debug_bin
__debug_bin*

# Eclipse
.project
Expand Down
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,14 @@ linters-settings:
- github.com/cosmos/ibc-apps/modules/async-icq/v6/types
- github.com/cosmos/ibc-apps/modules/async-icq/v6/keeper

- github.com/gogo/protobuf
- github.com/cosmos/gogoproto

- github.com/google/uuid

- github.com/gorilla/mux

- github.com/grpc-ecosystem/grpc-gateway

- github.com/otiai10/copy # Used by the dbmigrate only

- github.com/provenance-io/provenance

- github.com/rakyll/statik/fs
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,20 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

* nothing
### Features

* Bump cosmos-SDK to `v0.50.2` (from `v0.46.13-pio-2`) [#1772](https://github.com/provenance-io/provenance/issues/1772).
* Add store for crisis module for sdk v0.50 [#1760](https://github.com/provenance-io/provenance/issues/1760).
* Add PreBlocker support for sdk v0.50 [#1760](https://github.com/provenance-io/provenance/issues/1760).

### Improvements

* Remove unsupported database types [#1760](https://github.com/provenance-io/provenance/issues/1760).
* Update ibc and migrate params [#1760](https://github.com/provenance-io/provenance/issues/1760).
* Replace ModuleBasics with BasicModuleManager [#1760](https://github.com/provenance-io/provenance/issues/1760).
* Remove handlers from provenance modules [#1760](https://github.com/provenance-io/provenance/issues/1760).
* Updated app.go to use RegisterStreamingServices on BaseApp [#1760](https://github.com/provenance-io/provenance/issues/1760).
* Bump the SDK to `v0.50.5-pio-1` (from an earlier ephemeral version) [#1897](https://github.com/provenance-io/provenance/pull/1897).

---

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ build, in which case we can fall back on `go mod tidy`.

## Protobuf

We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in Cosmos-SDK.
We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/cosmos/protobuf) to generate code for use in Cosmos-SDK.

For determinstic behavior around Protobuf tooling, everything is containerized using Docker. Make sure to have Docker installed on your machine, or head to [Docker's website](https://docs.docker.com/get-docker/) to install it.

Expand Down
Loading
Loading