Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
stargate: fix conflicts (#650)
Browse files Browse the repository at this point in the history
* deps: update to cosmos-sdk v0.39.2-rc3 (#608)

* update to cosmos-sdk v0.39.2

* fix HD path test

* changelog (#609)

* build: require go 1.15+ (#610)

* evm: state transitions enabled params (#603)

* changelog

* evm: state transitions enabled params

* changelog entry

* changelog

* deps: bump cosmos-sdk version to v0.39.2 (#615)

* deps: bump cosmos-sdk version to v0.39.2

* changelog

* rpc: fix deadlock (#614)

* update tools configs (#611)

* update tools configs

* minor updates

* add jq (#616)

* build(deps): bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0 (#622)

Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](go-yaml/yaml@v2.3.0...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* app: fix export genesis (#619)

* v0.3.1 changes

* fix export genesis

* changelog

* evm: fix genesis format mismatch (#623)

* evm: fix genesis format mismatch

* genesis tests

* fix test

* changelog

* nolint

* force build-ethermint and cleanup stdout (#628)

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* join network doc (#606)

* join network doc

* include faucet instructions

* add rpc instructions

* edit persistent peers

* update to latest testnet

* evm: implement vm.GetHashFn (#620)

* evm: implement vm.GetHashFn

* check nil case

* test

* handle 3 cases

* use switch statement

* stateDB tests

* abci changes

* fix LGTM issue

* final tests

* changelog

* remove epoch

* update test

* clean test

* rm epoch

* open Istanbul and MuirGlacier from ChainConfig (#645)

* open Istanbul and MuirGlacier

* fix ut

* fix ut

* evm: extra eips param (#643)

* evm: extra eips param

* changelog

* rpc: protocol version (#575)

* evm: protocol version

* changelog

* version

* fix

* support latest version only

* evm: module specification (#538)

* evm: module specification

* params and events

* readme and messages

* minor updates

* concepts

* genesis state concept

* begin and end block

* update parameters and genesis

* state objects

* state table

* use permalink

* init and export genesis

* update abci

* extra eips param

* review comments

* precision

* link to photon doc

* build(deps): bump gaurav-nelson/github-action-markdown-link-check (#649)

Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.8 to 1.0.9.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](gaurav-nelson/github-action-markdown-link-check@1.0.8...7481451)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* stargate: fix conflicts

* more fixes

* proto changes

* more tendermint changes

* test fixes

* atlas: evm module (#651)

* atlas: evm module

* typos

* update toml

* update description

* Update x/evm/atlas/atlas-v0.3.1.md

* Update x/evm/atlas/atlas-v0.3.1.md

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>

* build(deps): bump actions/setup-node from v2.1.2 to v2.1.3 (#653)

Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.2 to v2.1.3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v2.1.2...27082ce)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump github.com/ethereum/go-ethereum from 1.9.24 to 1.9.25 (#654)

* build(deps): bump github.com/ethereum/go-ethereum from 1.9.24 to 1.9.25

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.9.24 to 1.9.25.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](ethereum/go-ethereum@v1.9.24...v1.9.25)

Signed-off-by: dependabot[bot] <support@github.com>

* fixes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>

* build(deps): bump gaurav-nelson/github-action-markdown-link-check (#652)

Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.9 to 1.0.10.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](gaurav-nelson/github-action-markdown-link-check@1.0.9...72d871b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* update peers (#656)

* update peers

* update chainid in cmd

* build(deps): bump gaurav-nelson/github-action-markdown-link-check (#659)

Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.10 to 1.0.11.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](gaurav-nelson/github-action-markdown-link-check@1.0.10...2a60e0f)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump ini from 1.3.5 to 1.3.8 in /docs (#658)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](npm/ini@v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Daniel Choi <choidanielw@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre <974741468@qq.com>
Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
  • Loading branch information
6 people authored Dec 14, 2020
1 parent 4ee7eea commit ede2dbc
Show file tree
Hide file tree
Showing 68 changed files with 1,922 additions and 543 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v2.1.3
with:
node-version: '12.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@development
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.8
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.11
with:
folder-path: "docs"
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ linters:
- unused
- unparam
- misspell
# TODO: address these lint issues
# - wsl
# - nolintlint

issues:
exclude-rules:
Expand Down Expand Up @@ -63,3 +66,8 @@ linters-settings:
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
allow-leading-space: true
require-explanation: false
require-specific: false
10 changes: 10 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pull_request_rules:
- name: automerge to master with label automerge and branch protection passing
conditions:
- "#approved-reviews-by>1"
- base=development
- label=automerge
actions:
merge:
method: squash
strict: true
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,33 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

### Improvements

* (deps) [\#654](https://github.com/cosmos/ethermint/pull/654) Bump go-ethereum version to [v1.9.25](https://github.com/ethereum/go-ethereum/releases/tag/v1.9.25)
* (evm) [\#627](https://github.com/cosmos/ethermint/issues/627) Add extra EIPs parameter to apply custom EVM jump tables.

### Bug Fixes

* (evm) [\#621](https://github.com/cosmos/ethermint/issues/621) EVM `GenesisAccount` fields now share the same format as the auth module `Account`.
* (evm) [\#618](https://github.com/cosmos/ethermint/issues/618) Add missing EVM `Context` `GetHash` field that retrieves a the header hash from a given block height.
* (app) [\#617](https://github.com/cosmos/ethermint/issues/617) Fix genesis export functionality.
* (rpc) [\#574](https://github.com/cosmos/ethermint/issues/574) Fix outdated version from `eth_protocolVersion`.

## [v0.3.1] - 2020-11-24

### Improvements

* (deps) [\#615](https://github.com/cosmos/ethermint/pull/615) Bump Cosmos SDK version to [v0.39.2](https://github.com/cosmos/cosmos-sdk/tag/v0.39.2)
* (deps) [\#610](https://github.com/cosmos/ethermint/pull/610) Update Go dependency to 1.15+.
* (evm) [#603](https://github.com/cosmos/ethermint/pull/603) Add state transition params that enable or disable the EVM `Call` and `Create` operations.
* (deps) [\#602](https://github.com/cosmos/ethermint/pull/602) Bump tendermint version to [v0.33.9](https://github.com/tendermint/tendermint/releases/tag/v0.33.9)

### Bug Fixes

* (rpc) [\#613](https://github.com/cosmos/ethermint/issues/613) Fix potential deadlock caused if the keyring `List` returned an error.

## [v0.3.0] - 2020-11-16

### API Breaking

* (crypto) [\#559](https://github.com/cosmos/ethermint/pull/559) Refactored crypto package in preparation for the SDK's Stargate release:
Expand All @@ -48,7 +75,6 @@ corresponding Ethereum API namespace:
* `rpc/namespaces/personal`: `personal` namespace. Exposes the `PrivateAccountAPI`.
* `rpc/namespaces/net`: `net` namespace. Exposes the `PublicNetAPI`.
* `rpc/namespaces/web3`: `web3` namespace. Exposes the `PublicWeb3API`.

* (evm) [\#588](https://github.com/cosmos/ethermint/pull/588) The EVM transaction CLI has been removed in favor of the JSON-RPC.

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN make build
FROM alpine

# Install ca-certificates
RUN apk add --update ca-certificates
RUN apk add --update ca-certificates jq
WORKDIR /root

# Copy over binaries from the build-env
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ all: tools verify install
###############################################################################

build: go.sum

ifeq ($(OS), Windows_NT)
go build $(BUILD_FLAGS) -o build/$(ETHERMINT_BINARY).exe ./cmd/$(ETHERMINT_BINARY)
else
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interoperable with Ethereum. It's build using the the [Cosmos SDK](https://githu

> **WARNING:** Ethermint is under VERY ACTIVE DEVELOPMENT and should be treated as pre-alpha software. This means it is not meant to be run in production, its APIs are subject to change without warning and should not be relied upon, and it should not be used to hold any value. We will remove this warning when we have a release that is stable, secure, and properly tested.
**Note**: Requires [Go 1.14+](https://golang.org/dl/)
**Note**: Requires [Go 1.15+](https://golang.org/dl/)

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion app/ethermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func NewEthermintApp(
params.NewAppModule(app.ParamsKeeper),
transferModule,
// Ethermint app modules
evm.NewAppModule(app.EvmKeeper, app.AccountKeeper),
evm.NewAppModule(app.EvmKeeper, app.AccountKeeper, app.BankKeeper),
// faucet.NewAppModule(app.FaucetKeeper),
)

Expand Down
2 changes: 1 addition & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (app *EthermintApp) ExportAppStateAndValidators(
forZeroHeight bool, jailAllowedAddrs []string,
) (servertypes.ExportedApp, error) {

// as if they could withdraw from the start of the next block
// Creates context with current height and checks txs for ctx to be usable by start of next block
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})

// We export at last height + 1, because that's the height at which
Expand Down
5 changes: 3 additions & 2 deletions cmd/ethermintd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,15 @@ func createAppAndExport(
encCfg := app.MakeEncodingConfig() // Ideally, we would reuse the one created by NewRootCmd.
encCfg.Marshaler = codec.NewProtoCodec(encCfg.InterfaceRegistry)
var ethermintApp *app.EthermintApp

if height != -1 {
ethermintApp = app.NewEthermintApp(logger, db, traceStore, false, map[int64]bool{}, "", uint(1), encCfg, appOpts)
ethermintApp = app.NewEthermintApp(logger, db, traceStore, false, map[int64]bool{}, "", 0, encCfg, appOpts)

if err := ethermintApp.LoadHeight(height); err != nil {
return servertypes.ExportedApp{}, err
}
} else {
ethermintApp = app.NewEthermintApp(logger, db, traceStore, true, map[int64]bool{}, "", uint(1), encCfg, appOpts)
ethermintApp = app.NewEthermintApp(logger, db, traceStore, true, map[int64]bool{}, "", 0, encCfg, appOpts)
}

return ethermintApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs)
Expand Down
18 changes: 12 additions & 6 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ coverage:
threshold: 1% # allow this much decrease on project
app:
target: 70%
flags: app
flags:
- app
modules:
target: 50%
flags: modules
target: 70%
flags:
- modules
core:
target: 50%
flags: core
clients:
flags: clients
flags:
- core
client:
flags:
- client
changes: false

comment:
Expand Down Expand Up @@ -57,4 +61,6 @@ ignore:
- "x/faucet"
- "**/*.pb.go"
- "types/*.pb.go"
- "tests/*"
- "x/**/*.pb.go"
- "scripts/"
40 changes: 20 additions & 20 deletions crypto/ethsecp256k1/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions docs/guides/join_network.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!--
order: 5
-->


# Joining Chainsafe's Public Testnet

This document outlines the steps to join the public testnet hosted by [Chainsafe](https://chainsafe.io).

## Steps:
1. Install the Ethermint binaries (ethermintd & ethermint cli):
```
git clone https://github.com/cosmos/ethermint
cd ethermint
make install
```

2. Create an Ethermint account:
```
ethermintcli keys add <keyname>
```

3. Copy genesis file:
Follow this [link](https://gist.github.com/araskachoi/43f86f3edff23729b817e8b0bb86295a) and copy it over to the directory ~/.ethermintd/config/genesis.json

4. Add peers:
Edit the file located in ~/.ethermintd/config/config.toml and edit line 350 (persistent_peers) to the following;
```
"7678d52de4a724e468e503a7743664d12a78b5b0@18.204.206.179:26656,c62fadc76b7fa1ab25669b64fdc00c8d8d422bd0@3.86.104.251:26656,5fa7d4550b57298b059d1dd8af01829482e7d097@54.210.246.165:26656"
```

5. Validate genesis and start the Ethermint network:
```
ethermintd validate-genesis
```
```
ethermintd start --pruning=nothing --rpc.unsafe --log_level "main:info,state:info,mempool:info" --trace
```
(we recommend running the command in the background for convenience)

6. Start the RPC server:
```
ethermintcli rest-server --laddr "tcp://localhost:8545" --unlock-key $KEY --chain-id etherminttestnet-777 --trace
```
where `$KEY` is the key name that was used in step 2.
(we recommend running the command in the background for convenience)

7. Request funds from the faucet:
You will need to know the Ethereum hex address, and it can be found with the following command:

```
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' -H "Content-Type: application/json" http://localhost:8545
```
Using the output of the above command, you will then send the command with your valid Ethereum address:
```
curl --header "Content-Type: application/json" --request POST --data '{"address":"0xYourEthereumHexAddress"}' 3.95.21.91:3000
```

## Public Testnet Node RPC Endpoints

Node0: `54.210.246.165:8545`
Node1: `3.86.104.251:8545`
Node2: `18.204.206.179:8545`

example:
```
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' -H "Content-Type: application/json" 54.210.246.165:8545
```
6 changes: 3 additions & 3 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4409,9 +4409,9 @@ inherits@2.0.3:
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=

ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
version "1.3.8"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==

internal-ip@^4.3.0:
version "4.3.0"
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cosmos/ethermint

go 1.14
go 1.15

require (
github.com/aristanetworks/goarista v0.0.0-20201012165903-2cb20defcd66 // indirect
Expand All @@ -10,7 +10,7 @@ require (
github.com/cespare/cp v1.1.1 // indirect
github.com/cosmos/cosmos-sdk v0.40.0-rc3.0.20201207213327-da6b7f775596
github.com/deckarep/golang-set v1.7.1 // indirect
github.com/ethereum/go-ethereum v1.9.24
github.com/ethereum/go-ethereum v1.9.25
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect
github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.4.3
Expand All @@ -34,7 +34,7 @@ require (
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6
google.golang.org/grpc v1.33.2
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v2 v2.4.0
)

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4
Loading

0 comments on commit ede2dbc

Please sign in to comment.