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

fix consensus error #513

Merged
merged 2 commits into from
Sep 14, 2020
Merged

fix consensus error #513

merged 2 commits into from
Sep 14, 2020

Conversation

noot
Copy link
Contributor

@noot noot commented Sep 14, 2020

Closes: #450

Description

  • fix state transition to not use st.Csdb

instructions:

  1. update Dockerfile to be the following:
FROM golang:1.14
RUN apt-get update && apt-get install -y \
  make curl jq tmux vim
COPY . $HOME/ethermint
WORKDIR $HOME/ethermint
RUN make install
ENTRYPOINT ["/bin/bash"]
  1. docker build . -t emint

  2. ethermintd testnet --v 3 -o ./testnet --keyring-backend=test --starting-ip-address=172.17.0.2 --chain-id 17

  3. in 3 new terminals:

docker run -it --name node0 emint
docker run -it --name node1 emint
docker run -it --name node2 emint
  1. in ethermint/ terminal: (can put in a script for efficiency)
cd ./testnet/
docker cp node0/ethermintd node0:/root/.ethermintd
docker cp node0/ethermintcli node0:/root/.ethermintcli
docker exec node0 mkdir /root/.ethermintd/config/gentxs
docker cp gentxs/node0.json node0:/root/.ethermintd/config/gentxs/gentx-node0.json
docker cp node1/ethermintd node1:/root/.ethermintd
docker cp node1/ethermintcli node1:/root/.ethermintcli
docker exec node1 mkdir /root/.ethermintd/config/gentxs
docker cp gentxs/node1.json node1:/root/.ethermintd/config/gentxs/gentx-node1.json
docker cp node2/ethermintd node2:/root/.ethermintd
docker cp node2/ethermintcli node2:/root/.ethermintcli
docker exec node2 mkdir /root/.ethermintd/config/gentxs
docker cp gentxs/node2.json node2:/root/.ethermintd/config/gentxs/gentx-node2.json
  1. inside each node:
ethermintcli config keyring-backend test
ethermintd start --pruning=nothing > ethermintd.log &
ethermintcli rest-server --laddr "tcp://172.17.0.2:8545" --unlock-key node0 --chain-id 17 --trace > ethermintcli.log &

running the rpc server is optional for node1 and node2, if you do, change key to node1, or node2 respectively, and update the IP address to 172.17.0.3 or 172.17.0.4 respectively

  1. inside node0:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' -H "Content-Type: application/json" 172.17.0.2:8545

use the resulting address as the from of the next step

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params": [{"from": "0x8218156c38c4e1cd74ba2dbf9a9eb1c7adbc4f30", "to": "0xc4cc618d9d8bb05d21d9621cab9aeb984af92db7", "value": "0xA", "gasLimit": "0x5208", "gasPrice": "0xA"}],"id":1}' -H "Content-Type: application/json" 172.17.0.2:8545
  1. for all nodes tail -f ethermintd.log and see tx get included w/ no consensus failures

For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@noot noot self-assigned this Sep 14, 2020
@codecov
Copy link

codecov bot commented Sep 14, 2020

Codecov Report

Merging #513 into development will decrease coverage by 0.29%.
The diff coverage is 75.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #513      +/-   ##
===============================================
- Coverage        72.43%   72.14%   -0.30%     
===============================================
  Files               41       41              
  Lines             2714     2714              
===============================================
- Hits              1966     1958       -8     
- Misses             606      613       +7     
- Partials           142      143       +1     
Impacted Files Coverage Δ
x/evm/types/state_transition.go 91.75% <75.00%> (ø)
x/evm/types/statedb.go 87.63% <0.00%> (-2.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 701ca7c...90dc4be. Read the comment docs.

@noot noot merged commit cf9662c into development Sep 14, 2020
@noot noot deleted the noot/fix branch September 14, 2020 17:41
fedekunze added a commit that referenced this pull request Sep 25, 2020
* Merge PR #513: Add chainsafe to readme

* changelog

Co-authored-by: Marko <marbar3778@yahoo.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProposalBlock is invalid
2 participants