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

imp(all): Move latest changes from Evmos main (incl. SDK v50) #48

Merged
merged 68 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
7273872
bump buf-setup-action version to v1.41.0 (7a2294c7)
MalteHerrmann Sep 17, 2024
960b775
bump ibc-go to v7.8.0 (bfeba33a)
MalteHerrmann Sep 17, 2024
35104db
fix eip after protobuf params changes (5b933ddf)
MalteHerrmann Sep 17, 2024
8a44a91
add codehash on erc-20 precompiles and update mocks (88d2207a)
MalteHerrmann Sep 17, 2024
f5806fb
bump golang.org/x/crypto to v0.27.0 (9567d352)
MalteHerrmann Sep 17, 2024
042e3ea
bump golang.org/x/net to v0.29.0 (67f0b0cf)
MalteHerrmann Sep 17, 2024
c3c1d58
additional methods for custom opcodes definitions (2ffe83e9)
MalteHerrmann Sep 17, 2024
ad4f36e
adjust overflow linter warnings (0822b8fc)
MalteHerrmann Sep 17, 2024
38c06a7
fix typos in some proto files and regenerate protos (6d0cf345)
MalteHerrmann Sep 17, 2024
e367ba1
bump google grpc dep to v1.66.1 (0de07c73)
MalteHerrmann Sep 17, 2024
44bf7bd
recap the highest gas limit with account's available balance (02c2414f)
MalteHerrmann Sep 17, 2024
587a12f
bump google grpc to v1.66.2 (bc9ca7b6)
MalteHerrmann Sep 17, 2024
618469b
sdk50 - utils
MalteHerrmann Sep 17, 2024
9b3f5b7
sdk-v50 - server & indexer wip
MalteHerrmann Sep 17, 2024
16b3978
sdk-v50 - encoding, testutil, eip712
MalteHerrmann Sep 17, 2024
2ab0a76
sdk-v50 - ibc, client
MalteHerrmann Sep 17, 2024
5b46e29
sdk-v50 - protos
MalteHerrmann Sep 17, 2024
738dcde
sdk-v50 - linter config
MalteHerrmann Sep 17, 2024
94e5a31
sdk-v50 - rpc and some general renamings
MalteHerrmann Sep 18, 2024
b6a80b1
sdk-v50 - feemarket
MalteHerrmann Sep 18, 2024
fa95f80
sdk-v50 - evm
MalteHerrmann Sep 18, 2024
0464233
sdk-v50 - erc20
MalteHerrmann Sep 18, 2024
f08a586
sdk-v50 - x/ibc/transfer
MalteHerrmann Sep 18, 2024
2315b72
sdk-v50 - precompiles - bank
MalteHerrmann Sep 18, 2024
be1e2f9
sdk-v50 - precompiles - bech32
MalteHerrmann Sep 18, 2024
192178a
sdk-v50 - precompiles - common
MalteHerrmann Sep 18, 2024
b5feef7
sdk-v50 - precompiles - distribution
MalteHerrmann Sep 18, 2024
9528822
sdk-v50 - precompiles - erc20
MalteHerrmann Sep 18, 2024
2955f79
sdk-v50 - precompiles - ics20
MalteHerrmann Sep 18, 2024
ba4fdf2
sdk-v50 - precompiles - p256
MalteHerrmann Sep 18, 2024
5a09d44
sdk-v50 - precompiles - staking
MalteHerrmann Sep 18, 2024
19b60dc
sdk-v50 - precompiles - staking
MalteHerrmann Sep 18, 2024
7649fa8
sdk-v50 - ante wip fix types
MalteHerrmann Sep 19, 2024
795ae6f
sdk-v50 - ante
MalteHerrmann Sep 19, 2024
345a868
sdk-v50 - app
MalteHerrmann Sep 19, 2024
f11afe0
sdk-v50 - cmd
MalteHerrmann Sep 19, 2024
35656cb
sdk-v50 - wip fix
MalteHerrmann Sep 19, 2024
f36f4ab
move testutil constants into own subpackage
MalteHerrmann Sep 20, 2024
1d0223e
wip
MalteHerrmann Sep 20, 2024
fdc2e25
run gofumpt
MalteHerrmann Sep 20, 2024
858242e
fix node running
MalteHerrmann Sep 20, 2024
25aaf98
update test setup with mint mod
GAtom22 Sep 20, 2024
6c12135
linters
MalteHerrmann Sep 23, 2024
2b86da5
wip - remove use of defaultEVMDenom and use test constants plus other…
MalteHerrmann Sep 23, 2024
d73bd42
regenerate contracts
MalteHerrmann Sep 23, 2024
f8f29e5
some test fixes regarding default example chain params
MalteHerrmann Sep 23, 2024
8a6ae12
wip debugging for sharing 2 2
MalteHerrmann Sep 23, 2024
c3cd1a1
disable minting for integration test setup by default
MalteHerrmann Sep 23, 2024
f7c9d38
fix mainnet vs. testnet wevmos contracts used in tests
MalteHerrmann Sep 23, 2024
595014f
fix tests by implementing minting for distribution tests and expose m…
MalteHerrmann Sep 23, 2024
1485f52
remove print statements and comment out tests that are not working be…
MalteHerrmann Sep 23, 2024
2f5ad53
more test fixes, using correct account prefix and evm denom for examp…
MalteHerrmann Sep 23, 2024
08eb702
add wiring to include tracers in example app
MalteHerrmann Sep 24, 2024
574f4d9
adjust chain id in test to fail
MalteHerrmann Sep 24, 2024
1852871
gofumpt and linters
MalteHerrmann Sep 24, 2024
327ac05
port changes to CI
MalteHerrmann Sep 24, 2024
35a0d44
run shfmt
MalteHerrmann Sep 24, 2024
ff88814
address markdown linter
MalteHerrmann Sep 24, 2024
ad39121
add changelog entry
MalteHerrmann Sep 24, 2024
6955288
make script executable
MalteHerrmann Sep 24, 2024
fbacf4a
add go work files to gitleaks ignore and run go mod tidy
MalteHerrmann Sep 24, 2024
ce4684b
wip fix solidity
MalteHerrmann Sep 24, 2024
b9c6cd6
fix chain starting in solidity tests
MalteHerrmann Sep 24, 2024
c4ea4b5
wait some time for blocks in solidity tests
MalteHerrmann Sep 24, 2024
0d60901
address coderabbit comments
MalteHerrmann Sep 24, 2024
b2a4187
remove local replace for Cosmos SDK
MalteHerrmann Sep 24, 2024
a0c65ce
fix order in init-node.sh
MalteHerrmann Sep 25, 2024
1e43b90
update example chain dep
MalteHerrmann Sep 25, 2024
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
  •  
  •  
  •  
43 changes: 21 additions & 22 deletions .github/workflows/auto-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,42 @@ on:
permissions: read-all

jobs:
format-go-code:
format-code:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
# Checkout repository
- uses: actions/checkout@v4
with:
token: ${{ secrets.E2E_PAT }}
- run: go install mvdan.cc/gofumpt@latest
- run: make format
# Commit formatted files if necessary
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: run make format

format-python-code:
runs-on: ubuntu-latest

permissions:
contents: write
# Install shell formatter
- run: sudo apt-get install -y shfmt

steps:
- uses: actions/checkout@v4
# Set up Go
- uses: actions/setup-go@v5
with:
token: ${{ secrets.E2E_PAT }}
go-version: "1.22"
check-latest: true

# Install Go formatter
- run: go install mvdan.cc/gofumpt@latest

# Set up Python
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: "3.10"

# Install Python formatters
- run: pip install black isort
- run: make format-python

# Run the combined format command
- run: make format

# Commit formatted files if necessary
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: run make format-python
commit_message: run make format
2 changes: 1 addition & 1 deletion .github/workflows/bsr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-setup-action@v1.41.0
# Push evmOS protos to the Buf Schema Registry
- uses: bufbuild/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-setup-action@v1.41.0
- uses: bufbuild/buf-lint-action@v1
with:
input: "proto"
Expand All @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-setup-action@v1.41.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
VALIDATE_OPENAPI: false
VALIDATE_JSCPD: false
VALIDATE_GO: false
VALIDATE_GO_MODULES: false
MalteHerrmann marked this conversation as resolved.
Show resolved Hide resolved
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
DEFAULT_BRANCH: "main"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ yarn.lock

# OpenZeppelin contracts
contracts/@openzeppelin/*

# Build files
example_chain/build/
5 changes: 4 additions & 1 deletion .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ description = "global allow lists"
paths = [
'''gitleaks.toml''',
'''(.*?)(jpg|gif|pdf|png|svg)$''',
'''(go.mod|go.sum)$''',
'''(go.mod|go.sum|go.work|go.work.sum)$''',
]
stopwords = [
'''secp256k1''',
'''evmospub1addwnpepqgcxazmq6wgt2j4rdfumsfwla0zfk8e5sws3p3zg5dkm9007hmfysxas0u2''',
'''0x8FA78CEB7F04118Ec6d06AaC37Ca854691d8e963''',
'''0x205CF44075E77A3543abC690437F3b2819bc450a''',
'''evmos10d07y265gmmuvt4z0w9aw880jnsr700jcrztvm''',
]

[[rules]]
Expand Down
5 changes: 5 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# --disable=W".
disable=raw-checker-failed,
bad-inline-option,
broad-exception-caught,
consider-using-f-string,
MalteHerrmann marked this conversation as resolved.
Show resolved Hide resolved
locally-disabled,
file-ignored,
suppressed-message,
Expand All @@ -25,6 +27,7 @@ disable=raw-checker-failed,
too-few-public-methods,
too-many-public-methods,
too-many-arguments,
too-many-instance-attributes,
too-many-lines,
too-many-locals,
too-many-branches,
Expand All @@ -36,3 +39,5 @@ disable=raw-checker-failed,
import-error,
use-dict-literal,
fixme

max-line-length=120
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This changelog was created using the `clu` binary

### Improvements

- (all) [#48](https://github.com/evmos/os/pull/48) Move latest changes from evmOS main (f943af3b incl. SDK v50).
- (all) [#43](https://github.com/evmos/os/pull/43) Update with latest evmOS main changes (2b7a8e2).
- (tests) [#41](https://github.com/evmos/os/pull/41) Add Solidity and Ledger tests.
- (all) [#37](https://github.com/evmos/os/pull/37) Add EVM, feemarket and precompiles from evmOS.
Expand Down
33 changes: 22 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export GO111MODULE = on
# Default target executed when no arguments are given to make.
default_target: all

.PHONY: default_target
.PHONY: build, default_target

###############################################################################
### Tools & Dependencies ###
Expand Down Expand Up @@ -78,26 +78,31 @@ benchmark:
### Linting ###
###############################################################################

lint:
lint: lint-go lint-python lint-contracts

lint-go:
gofumpt -l .
golangci-lint run --out-format=tab

lint-python:
find . -name "*.py" -type f -not -path "*/node_modules/*" | xargs pylint
flake8

lint-contracts:
solhint contracts/**/*.sol

lint-fix:
golangci-lint run --fix --out-format=tab --issues-exit-code=0

lint-fix-contracts:
@cd contracts && \
npm i && \
npm run lint-fix
solhint --fix contracts/**/*.sol

.PHONY: lint lint-fix
.PHONY: lint lint-fix lint-contracts lint-go lint-python

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.pb.gw.go' | xargs gofumpt -w -l

.PHONY: format
format: format-go format-python format-shell

format-go:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' -not -name '*.pb.gw.go' -not -name '*.pulsar.go' | xargs gofumpt -w -l

format-python: format-isort format-black

Expand All @@ -107,11 +112,16 @@ format-black:
format-isort:
find . -name '*.py' -type f -not -path "*/node_modules/*" | xargs isort

format-shell:
shfmt -l -w .

.PHONY: format format-go format-python format-black format-isort format-go

###############################################################################
### Protobuf ###
###############################################################################

protoVer=0.11.6
protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --user 0 $(protoImageName)

Expand All @@ -128,6 +138,7 @@ proto-all: proto-format proto-lint proto-gen
proto-gen:
@echo "generating implementations from Protobuf files"
@$(protoImage) sh ./scripts/generate_protos.sh
@$(protoImage) sh ./scripts/generate_protos_pulsar.sh

proto-format:
@echo "formatting Protobuf files"
Expand Down
2 changes: 1 addition & 1 deletion ante/cosmos/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewAuthzLimiterDecorator(disabledMsgTypes ...string) AuthzLimiterDecorator

func (ald AuthzLimiterDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
if err := ald.checkDisabledMsgs(tx.GetMsgs(), false, 1); err != nil {
return ctx, errorsmod.Wrap(errortypes.ErrUnauthorized, err.Error())
return ctx, errorsmod.Wrapf(errortypes.ErrUnauthorized, "%s", err.Error())
}
return next(ctx, tx, simulate)
}
Expand Down
Loading
Loading