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

feat: upgrade protos to be compatible with core 2.5 #35

Merged
merged 8 commits into from
Sep 20, 2023
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
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ node_modules
.vscode/
.idea/

tmp
tmp

jax/
28 changes: 19 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
[submodule "cosmos-sdk"]
path = cosmos-sdk
url = https://github.com/terra-money/cosmos-sdk.git
branch = release/v0.46.11-terra.rc.5
branch = release/v0.47.x
[submodule "ibc-go"]
path = ibc-go
url = https://github.com/cosmos/ibc-go.git
branch = release/v6.1.x
branch = release/v7.3.x
[submodule "alliance"]
path = alliance
url = https://github.com/terra-money/alliance.git
branch = release/v0.1.x
branch = release/v0.3.x
[submodule "terra"]
path = terra
url = https://github.com/terra-money/core
branch = upgrade/cosmos46
branch = release/v2.5
[submodule "wasmd"]
path = wasmd
url = https://github.com/notional-labs/wasmd
branch = release/v0.30.0-sdk-v0.46.x
[submodule "jax"]
path = jax
url = https://github.com/terra-money/jax
url = https://github.com/cosmwasm/wasmd
branch = releases/v0.40.x
[submodule "protobuf"]
path = protobuf
url = https://github.com/regen-network/protobuf
[submodule "ibc-apps"]
path = ibc-apps
url = https://github.com/cosmos/ibc-apps
[submodule "grpc-gateway"]
path = grpc-gateway
url = https://github.com/grpc-ecosystem/grpc-gateway
branch = v1
[submodule "pob"]
path = pob
url = https://github.com/skip-mev/pob
2 changes: 1 addition & 1 deletion alliance
Submodule alliance updated 87 files
+3 −3 .github/workflows/lint.yml
+1 −1 .github/workflows/tests.yml
+13 −0 LICENSE
+9 −17 Makefile
+68 −52 README.md
+46 −0 SECURITY.md
+148 −117 app/app.go
+3 −3 app/app_test.go
+3 −3 app/export.go
+86 −32 app/simulation_test.go
+61 −77 app/test_helpers.go
+5 −5 cmd/allianced/cmd/cmd_test.go
+8 −7 cmd/allianced/cmd/genaccounts_test.go
+14 −11 cmd/allianced/cmd/root.go
+12 −9 cmd/allianced/cmd/testnet.go
+0 −21 config.yml
+2 −3 custom/bank/keeper/keeper.go
+11 −4 custom/bank/module.go
+383 −59 docs/proto/proto-docs.md
+84 −75 go.mod
+207 −422 go.sum
+12 −0 proto/README.md
+1 −1 proto/alliance/alliance/alliance.proto
+1 −17 proto/alliance/alliance/delegations.proto
+7 −0 proto/alliance/alliance/events.proto
+4 −3 proto/alliance/alliance/genesis.proto
+1 −1 proto/alliance/alliance/gov.proto
+0 −0 proto/alliance/alliance/params.proto
+74 −3 proto/alliance/alliance/query.proto
+59 −0 proto/alliance/alliance/redelegations.proto
+171 −0 proto/alliance/alliance/tx.proto
+25 −0 proto/alliance/alliance/unbonding.proto
+0 −76 proto/alliance/tx.proto
+2 −0 proto/buf.yaml
+9 −9 testutil/network/network.go
+2 −2 x/alliance/abci.go
+156 −0 x/alliance/bindings/query_plugin.go
+205 −0 x/alliance/bindings/tests/query_plugin_test.go
+23 −0 x/alliance/bindings/types/request.go
+35 −0 x/alliance/bindings/types/response.go
+6 −6 x/alliance/client/cli/gov.go
+11 −5 x/alliance/keeper/asset.go
+6 −44 x/alliance/keeper/delegation.go
+4 −6 x/alliance/keeper/genesis.go
+100 −7 x/alliance/keeper/grpc_query.go
+9 −1 x/alliance/keeper/hooks.go
+14 −9 x/alliance/keeper/keeper.go
+93 −2 x/alliance/keeper/msg_server.go
+32 −7 x/alliance/keeper/params.go
+22 −58 x/alliance/keeper/proposal.go
+13 −3 x/alliance/keeper/reward.go
+1 −2 x/alliance/keeper/slash.go
+18 −17 x/alliance/keeper/tests/asset_test.go
+28 −10 x/alliance/keeper/tests/delegation_test.go
+1 −1 x/alliance/keeper/tests/genesis_test.go
+3 −3 x/alliance/keeper/tests/grpc_query_test.go
+1 −1 x/alliance/keeper/tests/keeper_test.go
+64 −0 x/alliance/keeper/tests/proposal_test.go
+103 −27 x/alliance/keeper/tests/reward_test.go
+10 −11 x/alliance/keeper/tests/slash_test.go
+171 −0 x/alliance/keeper/unbonding.go
+6 −0 x/alliance/keeper/validator.go
+17 −0 x/alliance/migrations/v5/migration.go
+13 −19 x/alliance/module.go
+0 −1 x/alliance/tests/benchmark/benchmark_genesis.json
+4 −10 x/alliance/tests/benchmark/benchmark_test.go
+2 −2 x/alliance/tests/benchmark/test_helper.go
+31 −18 x/alliance/tests/e2e/delegate_undelegate_test.go
+2 −2 x/alliance/tests/e2e/test_helper.go
+2 −2 x/alliance/tests/simulation/genesis.go
+9 −9 x/alliance/tests/simulation/operations.go
+0 −26 x/alliance/tests/simulation/params.go
+61 −61 x/alliance/types/alliance.pb.go
+46 −519 x/alliance/types/delegations.pb.go
+6 −3 x/alliance/types/errors.go
+232 −49 x/alliance/types/events.pb.go
+58 −58 x/alliance/types/genesis.pb.go
+45 −45 x/alliance/types/gov.pb.go
+64 −14 x/alliance/types/keys.go
+179 −0 x/alliance/types/msg.go
+13 −0 x/alliance/types/params.go
+42 −42 x/alliance/types/params.pb.go
+2,248 −603 x/alliance/types/query.pb.go
+446 −1 x/alliance/types/query.pb.gw.go
+994 −0 x/alliance/types/redelegations.pb.go
+2,347 −365 x/alliance/types/tx.pb.go
+467 −0 x/alliance/types/unbonding.pb.go
7 changes: 7 additions & 0 deletions cosmos-proto/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# NOTE: Order is important; the last matching pattern takes the
# most precedence.

# Primary repo maintainers
* @cosmos/sdk-core-dev
15 changes: 15 additions & 0 deletions cosmos-proto/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- automerge
- dependencies
24 changes: 24 additions & 0 deletions cosmos-proto/.github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Go

on:
push:
branches: [ main ]
pull_request:

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
22 changes: 22 additions & 0 deletions cosmos-proto/.github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
contents: read

jobs:
main:
permissions:
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54 changes: 54 additions & 0 deletions cosmos-proto/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# OS
.DS_Store
*.swp
*.swo
*.swl
*.swm
*.swn
*.pyc

# private files
private[.-]*
private

# Build
vendor
build
docs/_build
docs/tutorial
docs/node_modules
docs/modules
dist
tools-stamp
buf-stamp
artifacts

# Data - ideally these don't exist
baseapp/data/*
client/lcd/keys/*
mytestnet

# Testing
coverage.txt
profile.out
sim_log_file

# Vagrant
.vagrant/
*.box
*.log
vagrant

# IDE
.idea
*.iml
.dir-locals.el
.vscode

# Graphviz
dependency-graph.png

# Latex
*.aux
*.out
*.synctex.gz
21 changes: 21 additions & 0 deletions cosmos-proto/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:1.18-alpine

ENV GOLANG_PROTOBUF_VERSION=1.28.1

ARG PROTOC_VERSION="3.20.0"
# add dependency
RUN apk add g++ make curl protoc git
# sanity check to verify its correctly installed
RUN protoc --version
# install
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION}
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

WORKDIR /build
COPY . ./

RUN go build -o protoc-gen-go-pulsar ./cmd/protoc-gen-go-pulsar

WORKDIR /codegen

RUN mv /build/protoc-gen-go-pulsar /usr/bin/protoc-gen-go-pulsar
Loading