-
Notifications
You must be signed in to change notification settings - Fork 133
test: block-stm app #879
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
Open
cloudgray
wants to merge
60
commits into
cosmos:main
Choose a base branch
from
cloudgray:test/block-stm-app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+8,855
−1,182
Open
test: block-stm app #879
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
8d787a2
evmd refactor (base evm app)
vladjdk f54cf93
temporarily remove tests
vladjdk a53611a
update
vladjdk 70486f9
Merge branch 'main' into cloudgray/evmd-refactor
cloudgray 279449c
refactor: add mint module to basic app
cloudgray db537ef
refactor(evmd): modify basic keeper getters
cloudgray eed864f
refactor: modify testing app interfaces
cloudgray 93adab3
test: inject evmd to slashing precompile test
cloudgray 1e59de6
test: inject evmd to distr precompile test
cloudgray c791c54
test: fix distr precompile test setup
cloudgray f9f7bf4
test: fix address codec
cloudgray 4b5dd3c
test: fix distr precompile test setup
cloudgray 86f2f4c
chore: remove unnecessary app wrapping for distribution precompile
cloudgray 2e0a109
refactor: inject new evmd to bank precompile tests
cloudgray 44cf2d4
chore: fix comment
cloudgray 2efedee
WIP: fix precisebank test
cloudgray 9663503
Merge branch 'main' into cloudgray/evmd-refactor
cloudgray 15b2ff3
WIP: fix precisebank test
cloudgray 7a41a3c
chore(app): disable block-stm
cloudgray e946656
fix(ante): fix incorrect denom usage in ante handler
cloudgray 3229dad
WIP: fix ibc tests
cloudgray 3a14106
WIP: fix ibc app for test
cloudgray 16c134c
WIP: fix ibc app for test
cloudgray 5d29ef2
fix ibc app for tes
cloudgray 63b23c6
WIP: fix ibc app for ics20 precompile test
cloudgray 1a2ef83
test: fix coin decimals as 18 for ibc tests
cloudgray 42a67a2
test: add ibc tests
cloudgray dfbec16
chore(app): remove temp method
cloudgray b812165
WIP: add ics20 recursive precompile calls test
cloudgray d20bb0d
fix ibc test setup
cloudgray c3a47bd
chore(app): implement GetConsensusParamsKeeper method
cloudgray a666f04
refactor test file locations
cloudgray 67240e2
chore: refactor test app config
cloudgray 7965dab
remove test case with wevmos contract
cloudgray c8582d8
fix x/vm test
cloudgray 9e50c09
fix precisebank test
cloudgray ca50502
add erc20 precompile test
cloudgray 8ff28ac
fix staking precompile test
cloudgray 7b43a84
rollback incorrect fix of vm test
cloudgray 7414f1c
fix ante handler test
cloudgray 94304ef
chore: refactor test app for ibc test
cloudgray 1d7ab4d
chore: fix solidity test
cloudgray e92d454
WIP: cleanup code
cloudgray cd99a34
test: add ics20 precompile test
cloudgray d31e2db
chore: fix codeql warning
cloudgray 0a49661
test: fix test helper
cloudgray 2e46a33
WIP: cleanup code
cloudgray 57abb55
chore: cleanup
cloudgray caf1632
Merge branch 'main' into cloudgray/evmd-refactor
cloudgray 8038cab
chore: update CHANGELOG.md
cloudgray 758fbc1
chore: add comments
cloudgray 369d3ca
chore: cleanup
cloudgray 504147f
chore: remove map iteration from app.go
cloudgray ef740dd
chore: remove map iteration from app.go
cloudgray f8587d2
Merge branch 'main' into cloudgray/evmd-refactor
aljo242 292b026
chore: refactor app.go
cloudgray 56c6208
Merge branch 'main' into cloudgray/evmd-refactor
cloudgray 7908605
test: add block-stm app test
cloudgray d92afb5
chore: update CHANGELOG.md
cloudgray 364eede
test: fix x/precisebank test
cloudgray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| scripts/node-data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| FROM golang:1.25-alpine AS builder | ||
|
|
||
| RUN apk add --no-cache curl build-base git bash file linux-headers eudev-dev | ||
|
|
||
| WORKDIR /src | ||
|
|
||
| COPY go.mod go.sum ./ | ||
| RUN go mod download | ||
|
|
||
| COPY . . | ||
| RUN LEDGER_ENABLED=false make build | ||
|
|
||
| FROM alpine:3.21 | ||
| COPY --from=builder /src/build/evmd /bin/evmd | ||
| ENTRYPOINT ["evmd"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| BRANCH := $(shell git rev-parse --abbrev-ref HEAD) | ||
| COMMIT := $(shell git log -1 --format='%H') | ||
| APPNAME := evm | ||
| BUILDDIR ?= $(CURDIR)/build | ||
| DOCKER := $(shell which docker) | ||
|
|
||
| # don't override user values | ||
| ifeq (,$(VERSION)) | ||
| VERSION := $(shell git describe --exact-match 2>/dev/null) | ||
| # if VERSION is empty, then populate it with branch's name and raw commit hash | ||
| ifeq (,$(VERSION)) | ||
| VERSION := $(BRANCH)-$(COMMIT) | ||
| endif | ||
| endif | ||
|
|
||
| help: ## List Commands | ||
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
|
||
| .PHONY: help | ||
|
|
||
| check-all: ## Convenience to make sure everything is all good | ||
| # @$(MAKE) proto-all # Uncomment if we add custom modules | ||
| @$(MAKE) build | ||
| @$(MAKE) test-unit | ||
| @$(MAKE) lint | ||
| @$(MAKE) e2e-contracts | ||
| @$(MAKE) test-e2e | ||
|
|
||
| .PHONY: all | ||
|
|
||
| ################################################################################ | ||
| ## Build ## | ||
| ################################################################################ | ||
|
|
||
| # forces Go to use its pure Go implementation of the DNS resolver | ||
| build_tags = netgo | ||
| build_tags += $(BUILD_TAGS) | ||
| build_tags := $(strip $(build_tags)) | ||
|
|
||
| whitespace := | ||
| empty = $(whitespace) $(whitespace) | ||
| comma := , | ||
| build_tags_comma_sep := $(subst $(empty),$(comma),$(build_tags)) | ||
|
|
||
| # process linker flags | ||
|
|
||
| # TODO: Figure out if '-s -w' is still needed | ||
| # flags '-s -w' resolves an issue with xcode 16 and signing of go binaries | ||
| # ref: https://github.com/golang/go/issues/63997 | ||
| ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=$(APPNAME) \ | ||
| -X github.com/cosmos/cosmos-sdk/version.AppName=$(APPNAME) \ | ||
| -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ | ||
| -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ | ||
| -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ | ||
| -s -w | ||
|
|
||
| ifeq ($(LINK_STATICALLY),true) | ||
| ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static" | ||
| endif | ||
| ldflags += $(LDFLAGS) | ||
| ldflags := $(strip $(ldflags)) | ||
|
|
||
| BUILD_FLAGS := -tags "$(build_tags_comma_sep)" -ldflags '$(ldflags)' -trimpath | ||
|
|
||
| clean: ## Clean build artifacts | ||
| rm -rf $(BUILDDIR)/ artifacts/ | ||
|
|
||
| build: go.sum ## Build chain binary | ||
| @echo "Building chain binary" | ||
| go build -mod=readonly $(BUILD_FLAGS) -o $(BUILDDIR)/evmd ./cmd/evmd | ||
|
|
||
|
|
||
|
|
||
| .PHONY: build clean | ||
|
|
||
| ################################################################################ | ||
| ## Test ## | ||
| ################################################################################ | ||
|
|
||
| test-unit: ## Run unit tests | ||
| @echo Running unit tests... | ||
| @go test -mod=readonly -v -timeout 30m ./... | ||
|
|
||
| test-race: ## Run unit tests with race condition reporting | ||
| @echo Running unit tests with race condition reporting... | ||
| @go test -mod=readonly -v -race -timeout 30m ./... | ||
|
|
||
| test-e2e: ## Run e2e tests | ||
| @echo Running e2e tests... | ||
| @cd e2e && go test -parallel 8 -mod=readonly -v -count=1 -timeout 30m . | ||
|
|
||
| .PHONY: test-unit test-race | ||
|
|
||
| ################################################################################ | ||
| ## Install ## | ||
| ################################################################################ | ||
|
|
||
| install: ## Install dependencies | ||
| @echo "--> ensure dependencies have not been modified" | ||
| @go mod verify | ||
| @echo "--> installing $(APPNAME)d" | ||
| @go install $(BUILD_FLAGS) -mod=readonly ./cmd/$(APPNAME)d | ||
|
|
||
| .PHONY: install | ||
|
|
||
| ################################################################################ | ||
| ## Protobuf ## | ||
| ################################################################################ | ||
|
|
||
| protoVer=0.17.1 | ||
| 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 ## Generate Protobuf files | ||
|
|
||
| proto-gen: ## Generate Protobuf files | ||
| @echo "Generating Protobuf files" | ||
| @$(protoImage) sh ./scripts/protocgen.sh | ||
| @go mod tidy | ||
|
|
||
| proto-format: ## Format Protobuf files | ||
| @echo "Formatting Protobuf files" | ||
| @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; | ||
|
|
||
| proto-lint: ## Lint Protobuf files | ||
| @$(protoImage) buf lint --error-format=json | ||
|
|
||
| .PHONY: proto-all proto-gen proto-format proto-lint | ||
|
|
||
| ################################################################################ | ||
| ## Linting ## | ||
| ################################################################################ | ||
|
|
||
| golangci_lint_cmd=golangci-lint | ||
|
|
||
| lint: ## Run linter | ||
| @echo "--> Running linter" | ||
| @$(golangci_lint_cmd) run ./... --timeout 15m -c .golangci.yml | ||
| @cd e2e && $(golangci_lint_cmd) run ./... --timeout 15m -c ../.golangci.yml | ||
|
|
||
| lint-fix: ## Run linter and fix issues | ||
| @echo "--> Running linter and fixing issues" | ||
| @$(golangci_lint_cmd) run ./... --fix --timeout 15m -c .golangci.yml | ||
| @cd e2e && $(golangci_lint_cmd) run ./... --fix --timeout 15m -c ../.golangci.yml | ||
|
|
||
| .PHONY: lint lint-fix | ||
|
|
||
| ################################################################################ | ||
| ## E2E Contract Artifacts ## | ||
| ################################################################################ | ||
|
|
||
| SOLC_IMAGE ?= ethereum/solc:0.8.28 | ||
| E2E_CONTRACTS_DIR ?= e2e/contracts | ||
|
|
||
| e2e-contracts: ## Regenerate e2e embedded contract artifacts (ABI/BIN) | ||
| @echo "--> Regenerating e2e contract artifacts with $(SOLC_IMAGE)" | ||
| @docker run --rm -v $(CURDIR)/$(E2E_CONTRACTS_DIR):/contracts $(SOLC_IMAGE) --abi --bin -o /contracts --overwrite /contracts/Counter.sol /contracts/Reverter.sol | ||
|
|
||
| .PHONY: e2e-contracts |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add this back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aljo242
I branched this PR off of PR #825, and the removal of the
-raceflag was a change introduced in PR #825.We may need confirmation from @vladjdk, the author of PR #825.
@vladjdk
Was this change intentional?
As far as I know, enabling the
-raceoption allows data race detection, but it also increases the build size as well as execution time and memory usage.