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

Integrate 47 #80

Draft
wants to merge 84 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
587c421
omnibus lints, moving to specific items next
faddat Mar 20, 2023
af695a5
errors showing in delegation_test.go and validator_test.go
faddat Mar 20, 2023
2259841
add golangci-lint github action
faddat Mar 20, 2023
4a8ee01
var-naming
faddat Mar 20, 2023
b45a867
error checks
faddat Mar 20, 2023
29aa894
add builder and test runner
faddat Mar 20, 2023
b3ee817
check all unchecked errors except stdlib
faddat Mar 20, 2023
9776764
unused parameters
faddat Mar 20, 2023
c09075b
additional error handling
faddat Mar 20, 2023
1ce4cf4
address remaining lints
faddat Mar 20, 2023
4fd27ab
comment problem file
faddat Mar 20, 2023
1df954a
update delegation test.go
faddat Mar 20, 2023
0b6dfd2
fix tests
faddat Mar 20, 2023
5de17fc
complete
faddat Mar 20, 2023
4e0f3c4
replace tendermint and tm-db. make proto-gen
faddat Mar 20, 2023
154214c
remove randomized params
faddat Mar 20, 2023
18811cf
remove things related to routing
faddat Mar 20, 2023
4232a29
remapping packages
faddat Mar 20, 2023
2980833
mod and sum tidied
faddat Mar 20, 2023
821e501
remove slashing querier
faddat Mar 20, 2023
f1402c3
remove distribution querier
faddat Mar 20, 2023
4e4c254
remove params files for randomized sim tests
faddat Mar 20, 2023
47a4f4c
remove a slashing randomize sim test
faddat Mar 20, 2023
ef2c0dc
remove querier tests
faddat Mar 20, 2023
d62d4ec
solve import masking
faddat Mar 20, 2023
b3c6c47
remove slashing querier test
faddat Mar 20, 2023
b63d46f
use tmproto instead of abci for consensus parameters
faddat Mar 20, 2023
68474cb
lints + fixes
pysel Mar 20, 2023
6055435
simapp and appExport
pysel Mar 20, 2023
f201620
more
pysel Mar 20, 2023
410fcf2
wip
pysel Mar 20, 2023
50101f3
simulation
pysel Mar 20, 2023
8f13aae
fix loggers
pysel Mar 20, 2023
9bb510f
go mod
pysel Mar 20, 2023
2312793
go mod + go sum
pysel Mar 20, 2023
442c0cf
fix app.go error
phamminh0811 Mar 21, 2023
55c267e
fix staking bondstatus error
phamminh0811 Mar 21, 2023
a52ba67
change iavl to 0.20.0 to handle conflicts between dbs
phamminh0811 Mar 21, 2023
3906040
fix simapp params error
phamminh0811 Mar 21, 2023
1792665
fix some test related to sdkstaking and stakingtypes
phamminh0811 Mar 23, 2023
e5fcceb
fix some test related to sdkstaking and stakingtypes, update proto
phamminh0811 Mar 28, 2023
e21bc26
fix lint
phamminh0811 Mar 28, 2023
bb4f84d
strictly lint
faddat Mar 28, 2023
7516902
separate build and test ci jobs
faddat Mar 28, 2023
405ca7c
remove test from build
faddat Mar 28, 2023
a166264
disambiguate naming in ci jobs
faddat Mar 28, 2023
8f66608
add release branches to ci
faddat Mar 28, 2023
30b4e1d
fixed delegation rewards query
sampocs Apr 3, 2023
287f007
added warning in staking proto
sampocs Apr 3, 2023
bf2f7cb
TotalExemptShares -> TotalValidatorBondShares, TotalTokenizedShares -…
sampocs Apr 3, 2023
84b20b2
delegation.exempt -> delegation.validator_bond
sampocs Apr 3, 2023
bf35139
exemption factor -> validator bond factor
sampocs Apr 3, 2023
ee27abf
removed all other occurences of exempt
sampocs Apr 3, 2023
786199e
Create .github/workflows/go.yml
faddat Apr 9, 2023
9682393
Update go.yml
faddat Apr 9, 2023
3366b76
Update go.yml
faddat Apr 9, 2023
65b2975
fix lint
faddat Apr 9, 2023
b5336af
Merge remote-tracking branch 'faddat/faddat-patch-1' into integrate-47
faddat Apr 9, 2023
0f1a027
update errors because they weren't found upstream
faddat Apr 9, 2023
22542f3
add baseapp set chain ID in test
sontrinh16 Apr 9, 2023
42fc0a8
fix test
sontrinh16 Apr 9, 2023
e8a7170
update migration test
sontrinh16 Apr 9, 2023
8b4f5fb
Merge pull request #72 from notional-labs/integrate-47
faddat Apr 9, 2023
1de1487
Merge remote-tracking branch 'origin/master' into merge-main-to-47
faddat May 6, 2023
49bf568
additional proto build changes
faddat May 6, 2023
de70985
lock buf versions
faddat May 6, 2023
0a65bef
remove the third party folder fully, rebuild protos
faddat May 6, 2023
b0ef01e
simplify the repo by removing third party fully
faddat May 6, 2023
795447c
add the fully qualified paths for the protos
faddat May 6, 2023
5d61a39
Merge pull request #75 from iqlusioninc/remove-third-party-only-47
faddat May 6, 2023
a0823b5
merge integrate-47
sontrinh16 May 7, 2023
ff5ed1c
change err code
sontrinh16 May 7, 2023
c312e93
use cosmossdk.io/errors
sontrinh16 May 7, 2023
8a39536
Merge pull request #76 from notional-labs/hot-fix
faddat May 8, 2023
e0221a3
add dependabot
faddat May 22, 2023
5772a71
use latest gin
faddat May 22, 2023
fc68c7a
cleanup go.mod
faddat May 22, 2023
b8d54d4
update test to matrix test
faddat May 22, 2023
f9ce716
use only go v1.20.x
faddat May 22, 2023
e666be9
build protos with proto builder v13
faddat May 22, 2023
eba1d7e
test updating sdk...
faddat May 22, 2023
b729fe9
fixing test setup
sontrinh16 May 23, 2023
27efbfd
Merge pull request #85 from notional-labs/son/fixing
faddat May 23, 2023
671826b
Update test.yml
faddat May 23, 2023
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Build

on:
push:
branches:
- master
- release/**
pull_request:

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

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"

- name: Build
run: make build
46 changes: 46 additions & 0 deletions .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- release/v*
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# https://github.com/mvdan/github-actions-golang
# Runs tests on mac, windows, and linux, for go v1.19 and v1.20

on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- run: go test ./...
64 changes: 62 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,72 @@ clean:

distclean: clean
rm -rf vendor/
###############################################################################
### Protobuf ###
###############################################################################

proto-all: proto-tools proto-gen
protoVer=0.13.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-all: proto-format proto-lint proto-gen

proto-gen:
@echo "Generating Protobuf files"
$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh
@$(protoImage) sh ./scripts/protocgen.sh

proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@$(protoImage) sh ./scripts/protoc-swagger-gen.sh
$(MAKE) update-swagger-docs

proto-format:
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;

proto-lint:
@$(protoImage) buf lint --error-format=json

proto-check-breaking:
@$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main

CMT_URL = https://raw.githubusercontent.com/cometbft/cometbft/v0.37.0/proto/tendermint

TM_CRYPTO_TYPES = proto/tendermint/crypto
TM_ABCI_TYPES = proto/tendermint/abci
TM_TYPES = proto/tendermint/types
TM_VERSION = proto/tendermint/version
TM_LIBS = proto/tendermint/libs/bits
TM_P2P = proto/tendermint/p2p

proto-update-deps:
@echo "Updating Protobuf dependencies"

@mkdir -p $(TM_ABCI_TYPES)
@curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto

@mkdir -p $(TM_VERSION)
@curl -sSL $(TM_URL)/version/types.proto > $(TM_VERSION)/types.proto

@mkdir -p $(TM_TYPES)
@curl -sSL $(TM_URL)/types/types.proto > $(TM_TYPES)/types.proto
@curl -sSL $(TM_URL)/types/evidence.proto > $(TM_TYPES)/evidence.proto
@curl -sSL $(TM_URL)/types/params.proto > $(TM_TYPES)/params.proto
@curl -sSL $(TM_URL)/types/validator.proto > $(TM_TYPES)/validator.proto
@curl -sSL $(TM_URL)/types/block.proto > $(TM_TYPES)/block.proto

@mkdir -p $(TM_CRYPTO_TYPES)
@curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto
@curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto

@mkdir -p $(TM_LIBS)
@curl -sSL $(TM_URL)/libs/bits/types.proto > $(TM_LIBS)/types.proto

@mkdir -p $(TM_P2P)
@curl -sSL $(TM_URL)/p2p/types.proto > $(TM_P2P)/types.proto

$(DOCKER) run --rm -v $(CURDIR)/proto:/workspace --workdir /workspace $(protoImageName) buf mod update

.PHONY: proto-all proto-gen proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps

########################################
### Testing
Expand Down
Loading