Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
fedekunze committed Apr 17, 2021
1 parent 20f9a72 commit 5a3d514
Show file tree
Hide file tree
Showing 173 changed files with 19,340 additions and 13,574 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ Standard: Cpp11
TabWidth: 8
UseTab: Never
...

48 changes: 24 additions & 24 deletions .github/workflows/release-sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/development'"
# if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/development'"

install-runsim:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-sims')"
steps:
- name: install runsim
run: |
export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
- uses: actions/cache@v2.1.3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
# install-runsim:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'skip-sims')"
# steps:
# - name: install runsim
# run: |
# export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
# - uses: actions/cache@v2.1.3
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary

test-sim-multi-seed-long:
runs-on: ubuntu-latest
needs: install-runsim
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.3
with:
path: ~/go/bin
key: ${{ runner.os }}-go-runsim-binary
- name: test-sim-multi-seed-long
run: |
make test-sim-multi-seed-long
# test-sim-multi-seed-long:
# runs-on: ubuntu-latest
# needs: install-runsim
# steps:
# - uses: actions/checkout@v2
# - uses: actions/cache@v2.1.3
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# - name: test-sim-multi-seed-long
# run: |
# make test-sim-multi-seed-long
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -56,6 +59,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -92,6 +98,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -128,6 +137,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -164,6 +176,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -199,6 +214,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ coverage.txt
*.out
sim_log_file
importer/tmp
yarn.lock

# Vagrant
.vagrant/
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features
* (api) [\#821](https://github.com/cosmos/ethermint/pull/821) Individually enable the api modules. Will be implemented in the latest version of ethermint with the upcoming stargate upgrade.

### Features
* (api) [\#825](https://github.com/cosmos/ethermint/pull/825) Individually enable the api modules. Will be implemented in the latest version of ethermint with the upcoming stargate upgrade.

## [v0.4.0] - 2020-12-15

### API Breaking
Expand Down Expand Up @@ -227,6 +230,11 @@ corresponding Ethereum API namespace:

### Bug Fixes

* (evm) [\#767](https://github.com/cosmos/ethermint/issues/767) Fix error of timeout when using Truffle to deploy contract.
* (evm) [\#751](https://github.com/cosmos/ethermint/issues/751) Fix misused method to calculate block hash in evm related function.
* (evm) [\#721](https://github.com/cosmos/ethermint/issues/721) Fix mismatch block hash in rpc response when use eth.getBlock.
* (evm) [\#730](https://github.com/cosmos/ethermint/issues/730) Fix 'EIP2028' not open when Istanbul version has been enabled.
* (app) [\#749](https://github.com/cosmos/ethermint/issues/749) Fix panic in `AnteHandler` when gas price larger than 100000
* (rpc) [\#305](https://github.com/cosmos/ethermint/issues/305) Update `eth_getTransactionCount` to check for account existence before getting sequence and return 0 as the nonce if it doesn't exist.
* (`x/evm`) [\#319](https://github.com/cosmos/ethermint/pull/319) Fix `SetBlockHash` that was setting the incorrect height during `BeginBlock`.
* (`x/evm`) [\#176](https://github.com/cosmos/ethermint/issues/176) Updated Web3 transaction hash from using RLP hash. Now all transaction hashes exposed are amino hashes:
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ WORKDIR /root

# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/ethermintd /usr/bin/ethermintd
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/ethermintcli /usr/bin/ethermintcli

# Run ethermintd by default
CMD ["ethermintd"]
76 changes: 42 additions & 34 deletions Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ COMMIT := $(shell git log -1 --format='%H')
PACKAGES=$(shell go list ./... | grep -Ev 'vendor|importer|rpc/tester')
DOCKER_TAG = unstable
DOCKER_IMAGE = cosmos/ethermint
ETHERMINT_DAEMON_BINARY = ethermintd
ETHERMINT_CLI_BINARY = ethermintcli
DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf
ETHERMINT_BINARY = ethermintd
ETHERMINT_DIR = ethermint
GO_MOD=GO111MODULE=on
BUILDDIR ?= $(CURDIR)/build
SIMAPP = ./app
Expand All @@ -34,7 +35,7 @@ ifeq ($(OS),Windows_NT)
DETECTED_OS := windows
else
UNAME_S = $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
ifeq ($(UNAME_S),Darwin)
DETECTED_OS := mac
else
DETECTED_OS := linux
Expand Down Expand Up @@ -106,8 +107,7 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))
# process linker flags

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=ethermint \
-X github.com/cosmos/cosmos-sdk/version.ServerName=$(ETHERMINT_DAEMON_BINARY) \
-X github.com/cosmos/cosmos-sdk/version.ClientName=$(ETHERMINT_CLI_BINARY) \
-X github.com/cosmos/cosmos-sdk/version.AppName=$(ETHERMINT_BINARY) \
-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)"
Expand All @@ -129,26 +129,22 @@ all: tools verify install
build: go.sum

ifeq ($(OS), Windows_NT)
go build -mod=readonly $(BUILD_FLAGS) -o build/$(ETHERMINT_DAEMON_BINARY).exe ./cmd/$(ETHERMINT_DAEMON_BINARY)
go build -mod=readonly $(BUILD_FLAGS) -o build/$(ETHERMINT_CLI_BINARY).exe ./cmd/$(ETHERMINT_CLI_BINARY)
go build $(BUILD_FLAGS) -o build/$(ETHERMINT_BINARY).exe ./cmd/$(ETHERMINT_BINARY)
else
go build -mod=readonly $(BUILD_FLAGS) -o build/$(ETHERMINT_DAEMON_BINARY) ./cmd/$(ETHERMINT_DAEMON_BINARY)
go build -mod=readonly $(BUILD_FLAGS) -o build/$(ETHERMINT_CLI_BINARY) ./cmd/$(ETHERMINT_CLI_BINARY)
go build $(BUILD_FLAGS) -o build/$(ETHERMINT_BINARY) ./cmd/$(ETHERMINT_BINARY)
endif

build-ethermint: go.sum
mkdir -p $(BUILDDIR)
go build -mod=readonly $(BUILD_FLAGS) -o $(BUILDDIR) ./cmd/$(ETHERMINT_DAEMON_BINARY)
go build -mod=readonly $(BUILD_FLAGS) -o $(BUILDDIR) ./cmd/$(ETHERMINT_CLI_BINARY)
go build $(BUILD_FLAGS) -o $(BUILDDIR) ./cmd/$(ETHERMINT_BINARY)

build-ethermint-linux: go.sum
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 $(MAKE) build-ethermint

.PHONY: build build-ethermint build-ethermint-linux

install:
${GO_MOD} go install $(BUILD_FLAGS) ./cmd/$(ETHERMINT_DAEMON_BINARY)
${GO_MOD} go install $(BUILD_FLAGS) ./cmd/$(ETHERMINT_CLI_BINARY)
${GO_MOD} go install $(BUILD_FLAGS) ./cmd/$(ETHERMINT_BINARY)

clean:
@rm -rf ./build ./vendor
Expand All @@ -165,8 +161,7 @@ docker-build:
docker create --name ethermint -t -i cosmos/ethermint:latest ethermint
# move the binaries to the ./build directory
mkdir -p ./build/
docker cp ethermint:/usr/bin/ethermintd ./build/ ; \
docker cp ethermint:/usr/bin/ethermintcli ./build/
docker cp ethermint:/usr/bin/ethermintd ./build/

docker-localnet:
docker build -f ./networks/local/ethermintnode/Dockerfile . -t ethermintd/node
Expand All @@ -186,40 +181,47 @@ RUNSIM = $(TOOLS_DESTDIR)/runsim
runsim: $(RUNSIM)
$(RUNSIM):
@echo "Installing runsim..."
@(cd /tmp && ${GO_MOD} go get github.com/cosmos/tools/cmd/runsim@v1.0.0)
@(cd /tmp && ${GO_MOD} go get github.com/cosmos/tools/cmd/runsim@master)

contract-tools:
ifeq (, $(shell which stringer))
@echo "Installing stringer..."
@go install golang.org/x/tools/cmd/stringer
@go get golang.org/x/tools/cmd/stringer
else
@echo "stringer already installed; skipping..."
endif

ifeq (, $(shell which go-bindata))
@echo "Installing go-bindata..."
@go install github.com/kevinburke/go-bindata/go-bindata
@go get github.com/kevinburke/go-bindata/go-bindata
else
@echo "go-bindata already installed; skipping..."
endif

ifeq (, $(shell which gencodec))
@echo "Installing gencodec..."
@go install github.com/fjl/gencodec
@go get github.com/fjl/gencodec
else
@echo "gencodec already installed; skipping..."
endif

ifeq (, $(shell which protoc-gen-go))
@echo "Installing protoc-gen-go..."
@go install github.com/golang/protobuf/protoc-gen-go
@go get github.com/fjl/gencodec github.com/golang/protobuf/protoc-gen-go
else
@echo "protoc-gen-go already installed; skipping..."
endif

ifeq (, $(shell which protoc))
@echo "Please istalling protobuf according to your OS"
@echo "macOS: brew install protobuf"
@echo "linux: apt-get install -f -y protobuf-compiler"
else
@echo "protoc already installed; skipping..."
endif

ifeq (, $(shell which solcjs))
@echo "Installing solcjs..."
@apt-get install -f -y protobuf-compiler
@npm install -g solc@0.5.11
else
@echo "solcjs already installed; skipping..."
Expand All @@ -234,7 +236,7 @@ else
endif

tools: tools-stamp
tools-stamp: contract-tools docs-tools runsim
tools-stamp: contract-tools docs-tools proto-tools runsim
# Create dummy file to satisfy dependency and avoid
# rebuilding when this Makefile target is hit twice
# in a row.
Expand All @@ -250,7 +252,7 @@ docs-tools-stamp: docs-tools
# in a row.
touch $@

.PHONY: runsim tools tools-stamp tools-clean docs-tools-stamp
.PHONY: runsim tools contract-tools docs-tools proto-tools tools-stamp tools-clean docs-tools-stamp

###############################################################################
### Tests & Simulation ###
Expand All @@ -270,10 +272,10 @@ test-import:
rm -rf importer/tmp

test-rpc:
./scripts/integration-test-all.sh -t "rpc" -q 1 -z 1 -s 2 -m "rpc"
./scripts/integration-test-all.sh -t "rpc" -q 1 -z 1 -s 2 -m "rpc" -r "true"

test-rpc-pending:
./scripts/integration-test-all.sh -t "pending" -q 1 -z 1 -s 2 -m "pending"
./scripts/integration-test-all.sh -t "pending" -q 1 -z 1 -s 2 -m "pending" -r "true"

test-contract:
@type "npm" 2> /dev/null || (echo 'Npm does not exist. Please install node.js and npm."' && exit 1)
Expand All @@ -288,22 +290,22 @@ test-sim-nondeterminism:

test-sim-custom-genesis-fast:
@echo "Running custom genesis simulation..."
@echo "By default, ${HOME}/.$(ETHERMINT_DAEMON_BINARY)/config/genesis.json will be used."
@go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation -Genesis=${HOME}/.$(ETHERMINT_DAEMON_BINARY)/config/genesis.json \
@echo "By default, ${HOME}/.$(ETHERMINT_DIR)/config/genesis.json will be used."
@go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation -Genesis=${HOME}/.$(ETHERMINT_DIR)/config/genesis.json \
-Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h

test-sim-import-export: runsim
@echo "Running application import/export simulation. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppImportExport
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail -Genesis=${HOME}/.$(ETHERMINT_DIR)/config/genesis.json 50 5 TestAppImportExport

test-sim-after-import: runsim
@echo "Running application simulation-after-import. This may take several minutes..."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppSimulationAfterImport
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -Genesis=${HOME}/.$(ETHERMINT_DIR)/config/genesis.json -ExitOnFail 50 5 TestAppSimulationAfterImport

test-sim-custom-genesis-multi-seed: runsim
@echo "Running multi-seed custom genesis simulation..."
@echo "By default, ${HOME}/.$(ETHERMINT_DAEMON_BINARY)/config/genesis.json will be used."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail -Genesis=${HOME}/.$(ETHERMINT_DAEMON_BINARY)/config/genesis.json 400 5 TestFullAppSimulation
@echo "By default, ${HOME}/.$(ETHERMINT_DIR)/config/genesis.json will be used."
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail -Genesis=${HOME}/.$(ETHERMINT_DIR)/config/genesis.json 400 5 TestFullAppSimulation

test-sim-multi-seed-long: runsim
@echo "Running multi-seed application simulation. This may take awhile!"
Expand Down Expand Up @@ -359,13 +361,19 @@ proto-format:
proto-swagger-gen:
@./scripts/protoc-swagger-gen.sh

proto-format:
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;

proto-swagger-gen:
@./scripts/protoc-swagger-gen.sh

proto-lint:
@$(DOCKER_BUF) check lint --error-format=json

proto-check-breaking:
@$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=development

TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0-rc6/proto/tendermint
TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.1/proto/tendermint
GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos
COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/master
COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master
Expand Down Expand Up @@ -437,13 +445,13 @@ ifeq ($(OS),Windows_NT)
mkdir build &
@$(MAKE) docker-localnet

IF not exist "build/node0/$(ETHERMINT_DAEMON_BINARY)/config/genesis.json" docker run --rm -v $(CURDIR)/build\ethermint\Z ethermintd/node "ethermintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"
IF not exist "build/node0/$(ETHERMINT_BINARY)/config/genesis.json" docker run --rm -v $(CURDIR)/build\ethermint\Z ethermintd/node "ethermintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"
docker-compose up -d
else
mkdir -p ./build/
@$(MAKE) docker-localnet

if ! [ -f build/node0/$(ETHERMINT_DAEMON_BINARY)/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/ethermint:Z ethermintd/node "ethermintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"; fi
if ! [ -f build/node0/$(ETHERMINT_BINARY)/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/ethermint:Z ethermintd/node "ethermintd testnet --v 4 -o /ethermint --starting-ip-address 192.168.10.2 --keyring-backend=test"; fi
docker-compose up -d
endif

Expand Down
Loading

0 comments on commit 5a3d514

Please sign in to comment.