Coder Social home page Coder Social logo

evmos / ethermint Goto Github PK

View Code? Open in Web Editor NEW
1.8K 350.0 524.0 36.36 MB

Ethermint is a Cosmos SDK library for running scalable and interoperable EVM chains

Home Page: https://docs.evmos.org/

License: GNU Lesser General Public License v3.0

Dockerfile 0.06% Makefile 0.79% Go 78.00% Shell 1.65% Solidity 7.17% JavaScript 5.33% Batchfile 0.12% Nix 0.65% Jsonnet 0.17% Python 6.04% TypeScript 0.02%
go blockchain evm ethereum cosmos-sdk golang

ethermint's Introduction

Ethermint

banner

Warning

Evmos, the team behind Ethermint, has fully shifted its focus to Evmos, where we continue to build interoperability solutions for the future! As a result, this repository is no longer maintained for that reason and all relevant code has been migrated.

NOTE: If you are interested in using this software email us at [email protected] with copy to [email protected]

About

Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of Tendermint Core consensus engine.

Careers

See our open positions on Evmos Careers.

Community

The following chat channels and forums are a great spot to ask questions about Ethermint:

ethermint's People

Contributors

0a1c avatar adisaran64 avatar adu-web3 avatar alexanderbez avatar alexeyakhunov avatar araskachoi avatar austinabell avatar crypto-facs avatar danburck avatar dependabot-preview[bot] avatar dependabot[bot] avatar facs95 avatar fedekunze avatar gatom22 avatar j-thompson12 avatar jackzampolin avatar jayt106 avatar kamid avatar leejw51crypto avatar loredanacirstea avatar malteherrmann avatar mmsqe avatar noot avatar prajjwol avatar ramacarlucho avatar snyk-bot avatar summerpro avatar thomas-nguy avatar vvaradinov avatar yihuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethermint's Issues

Document Gas consumption

Document how gas is consumed on the EVM and the steps performed to ignore the SDK gas consumption in order to use the one defined by the opcode's jumptable

Support legacy ethereum transactions

Currently, the MsgEthereumTx only supports AccessList transaction types. Ideally, we should support legacy signing in case someone doesn't want to enable the Berlin fork on the chain Config.

Actionable items:

  • On msg.AsEthereumData, check if AccessList == nil and return a LegacyTx transaction data. If the msg contains a non-nil access list, create an AccessListTx
  • Test message signing with Homestead, EIP155 and Frontier signers (see msg_test.go for ref)

cannot connect via ibc

after setting up cro devnet and ethermint devnet

i tried to open channel

hermes create channel $MYIBC0 $MYIBC1 --port-a transfer --port-b transfer 

and encounter this error

May 28 16:48:02.649 ERROR ibc_relayer::foreign_client: [testnet-central-0 ->
 ethermint-2:07-tendermint-0]  failed CreateClient: error raised while creating
 client: failed sending message to dst chain (ethermint-2) with err: GRPC error: 
GRPC error: failed to decode Protobuf message: BaseAccount.pub_key: unexpected end group tag

Error: error raised while creating client: Create client failed (ClientCreate("failed \sending message to dst chain (ethermint-2) with err: GRPC error: GRPC error:
 failed to decode Protobuf message: BaseAccount.pub_key: unexpected end 
group tag"))

metamask show wrong balance

System info: [Include Ethermint commit, operating system name, and other relevant details]

Steps to reproduce:

  1. start a local devnet with ethermint
  2. import the account private key into metamask
  3. check the eth balance

Expected behavior: the balance should be as same as configured in genesis

Actual behavior: 1000000000000000000000aphoton in genesis is displayed as 2536520ETH in metamask

Additional info:
Result of ethermintd q bank balances:

balances:
- amount: "1000000000000000000000"
  denom: aphoton
pagination:
  next_key: null
  total: "0"

Result of web3 api:

{"jsonrpc":"2.0","id":1,"result":"0x3635c9adc5dea00000"}

The rpc result is correct, is it possible an issue in metamask, int overflow?

Build fails after Cosmos SDK 0.42.5 upgrade

System info: [Include Ethermint commit, operating system name, and other relevant details]
MacOS

Steps to reproduce:

  1. make build

return output

Makefile:365: warning: overriding commands for target `proto-format'
Makefile:356: warning: ignoring old commands for target `proto-format'
go build -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=ethermint -X github.com/cosmos/cosmos-sdk/version.AppName=ethermintd -X github.com/cosmos/cosmos-sdk/version.Version=0.4.1-39-g47bc313 -X github.com/cosmos/cosmos-sdk/version.Commit=47bc31323597c02b4f5a81d781b5a80a6248d12c -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger"' -o build/ethermintd ./cmd/ethermintd
go: downloading google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea
# github.com/keybase/go-keychain
cgo-gcc-prolog:203:11: warning: 'SecTrustedApplicationCreateFromPath' is deprecated: first deprecated in macOS 10.15 - No longer supported [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework/Headers/SecTrustedApplication.h:59:10: note: 'SecTrustedApplicationCreateFromPath' has been explicitly marked deprecated here
# github.com/cosmos/ethermint/client
client/keys.go:104:23: cannot use cmd (type *cobra.Command) as type "github.com/cosmos/cosmos-sdk/client".Context in argument to keys.RunAddCmd
client/keys.go:104:23: cannot use args (type []string) as type *cobra.Command in argument to keys.RunAddCmd
client/keys.go:104:23: cannot use kr (type "github.com/cosmos/cosmos-sdk/crypto/keyring".Keyring) as type []string in argument to keys.RunAddCmd
make: *** [build] Error 2

Expected behavior: [What you expected to happen]

Success
Actual behavior: [What actually happened]

Error
Additional info: [Include gist of relevant config, logs, etc.]

Remove TxReceipt from store

The transaction receipt type can be removed from the store as the ethereum Receipt type can be reproduced from the :

  • transaction (tx data)
  • msg response (gas used, sender, etc)
  • block data (hash, tx index, cumulative gas used, etc)

`importRawKey` api timed out

System info: [ethermint(69f8837), macosx, python3.8]

Steps to reproduce:

  1. start local devnet with ethermint
  2. Use python web3 library to test
>>> web3.geth.personal.importRawKey('5D665FBD2FB40CB8E9849263B04457BA46D5F948972D0FE4C1F19B6B0F243574', '1')
Traceback (most recent call last):
   ...
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='localhost', port=1317): Read timed out. (read timeout=10)

RPC method "SendRawTransaction" does not work

System info:

MacOS

Steps to reproduce:

This is quite critical bug, but I am unable to find the root cause.

Basically the RPC endpoint "eth_SendRawtransaction" seems to function correctly, the handler receives the ethereum tx, create a cosmos type tx and broadcast it succesfully til

	asyncCtx := e.clientCtx.WithBroadcastMode(flags.BroadcastAsync)

No error is returned.

However the transaction is never processed by the node. By adding a checkpoint or adding logs in the evm/MsgEthereumTx handler we notice that the transaction never reach.

Is it some networking issue?

Another way to test is to use truffle to upload a contract.
The code will be stuck waiting to receive the transaction receipt checking every block

Expected behavior:

Transaction is received and processed by the node

Actual behavior:

Broadcasted transaction never received

Additional info: [Include gist of relevant config, logs, etc.]

sometime the node display the message

E[2021-06-02|16:07:08.226] Failed to read request                       module=rpc-server protocol=websocket remote=127.0.0.1:57180 err="websocket: close 1006 (abnormal closure): unexpected EOF"
I[2021-06-02|16:07:08.226] Stopping wsConnection service                module=rpc-server protocol=websocket remote=127.0.0.1:57180 impl=wsConnection
E[2021-06-02|16:07:08.226] error while stopping connection              module=rpc-server protocol=websocket error="already stopped"
E[2021-06-02|16:07:08.347] Failed to read request                       module=rpc-server protocol=websocket remote=127.0.0.1:57181 err="websocket: close 1006 (abnormal closure): unexpected EOF"
I[2021-06-02|16:07:08.347] Stopping wsConnection service                module=rpc-server protocol=websocket remote=127.0.0.1:57181 impl=wsConnection
E[2021-06-02|16:07:08.347] error while stopping connection              module=rpc-server protocol=websocket error="already stopped"

maybe it is related

Linked to this issue

#52

Replace Block Height to Block Hash map

The HeaderHash getter and setter mapping from the store can be replaced by the staking module Keeper's HistoricalInfo that contains the header and the validator set.

Actionable Items:

  • Add staking keeper
  • Create StakingKeeper interface on the interfaces.go file, defining the expected functions:
GetHistoricalInfo(ctx sdk.Context, height int64) (types.HistoricalInfo, bool)
  • Remove the header hash store functions, keys, etc

E2E testing

Define a list of end-to-end testing environment and suites that start a localnet and deploy a set of contracts using different approaches:

  • JSON-RPC #88
  • Geth ABI
  • Hardhat
  • Ethersjs
  • Truffle

Makefile issue

when i run make , cannot proceeed

make
Installing stringer...
Installing go-bindata...
no required module provides package github.com/kevinburke/go-bindata/go-bindata; to add it:
	go get github.com/kevinburke/go-bindata/go-bindata
make: *** [Makefile:196: contract-tools] 오류 1

os: ubuntu 21
go: go version go1.16.4 linux/amd64

make build working fine
make test ,too

Fail to deploy contract using truffle

System info:
MacOs

Steps to reproduce:

I am trying to run the solidity test manually by deploying the contract using

truffle deploy --network ethermint

however it returns me the following error

Error: Returned error: method handler crashed
    at Object.ErrorResponse (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3-core-helpers/lib/errors.js:28:1)
    at /usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3/node_modules/web3-core-requestmanager/lib/index.js:303:1
    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/provider/wrapper.js:107:1
    at XMLHttpRequest.request.onreadystatechange (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/web3/node_modules/web3-providers-http/lib/index.js:98:1)
    at XMLHttpRequestEventTarget.dispatchEvent (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:1)
    at XMLHttpRequest.exports.modules.996763.XMLHttpRequest._setReadyState (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:208:1)
    at XMLHttpRequest.exports.modules.996763.XMLHttpRequest._onHttpResponseEnd (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:318:1)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/xhr2-cookies/dist/xml-http-request.js:289:47)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Expected behavior:

Contract succesfully deployed

Actual behavior:

Errors see above

Additional info:

Some logs from the node

DEBU[0468] eth_accounts                                  fn=Accounts module=json-rpc src="ethereum/rpc/eth_api.go:172"
DEBU[0468] eth_accounts                                  fn=Accounts module=json-rpc src="ethereum/rpc/eth_api.go:172"
DEBU[0468] eth_getBlockByNumber number -1 full false     fn=GetBlockByNumber module=json-rpc src="ethereum/rpc/eth_api.go:657"
I[2021-05-31|18:34:19.405] ABCIQuery                                    module=rpc path=/ethermint.evm.v1alpha1.Query/TxReceiptsByBlockHeight data= result="height:90 "
I[2021-05-31|18:34:19.405] ABCIQuery                                    module=rpc path=/ethermint.evm.v1alpha1.Query/BlockBloom data= result="code:22 log:\"rpc error: code = NotFound desc = block bloom not found: key not found\" height:90 codespace:\"sdk\" "
DEBU[0468] failed to query BlockBloom at height 90       error="rpc error: code = NotFound desc = rpc error: code = NotFound desc = block bloom not found: key not found" fn=EthBlockFromTendermint module=evm-backend src="ethereum/rpc/backend.go:176"

Allow from field to be empty

System info:

MacOs

Steps to reproduce:

Some tools such as metamask or truffle does not set the field 'from' when sending a transaction. Instead it expects the value to be extracted from the signature.

( snippet from geth to extract sender address from signature
https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction_signing.go#L131 )

However some antler handler such as the EthAccountVerificationDecorator expect the MsgEthereumTx field 'from' to be not empty or it will returns an error.

I suggest either to modify the logic in the AnteHandler to extract the sender address from the signature if it is not in the message or always set the field from in the cosmos tx with the signature if it is not present in the eth tx.

What do you think?

linked to issue

#79

Hardhat : fails to deploy contract

System info:

MacOs

Steps to reproduce:

I am trying simple contract deploiement using hardhat, connecting the ethermint network (localhost:8545)

It gives me the following results >

➜  etherminttest git:(master) ✗ npx hardhat run --network ethermint scripts/deploy.js
ProviderError: invalid from address: address 'eth10jmp6sgh4cc6zt3e8gw05wavvejgr5pw2unfju' is not a valid ethereum hex address: invalid address
    at HttpProvider.request (/Users/thomasnguy/Documents/solidity/etherminttest/node_modules/hardhat/src/internal/core/providers/http.ts:46:19)
    at HDWalletProvider.request (/Users/thomasnguy/Documents/solidity/etherminttest/node_modules/hardhat/src/internal/core/providers/accounts.ts:142:34)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at EthersProviderWrapper.send (/Users/thomasnguy/Documents/solidity/etherminttest/node_modules/@nomiclabs/hardhat-ethers/src/internal/ethers-provider-wrapper.ts:13:20)


I will update the ticket after further investigation. Let me know if it is a known issue (I can also work on a fix)

Expected behavior: [What you expected to happen]

Contract succesfully deployed

Actual behavior: [What actually happened]

Error (see logs)

Additional info: [Include gist of relevant config, logs, etc.]

Some stacktrace from the node

DEBU[0013] eth_chainId                                   fn=ChainId module=json-rpc src="ethereum/rpc/eth_api.go:107"
DEBU[0013] eth_chainId                                   fn=ChainId module=json-rpc src="ethereum/rpc/eth_api.go:107"
DEBU[0013] eth_chainId                                   fn=ChainId module=json-rpc src="ethereum/rpc/eth_api.go:107"
DEBU[0013] eth_estimateGas                               fn=EstimateGas module=json-rpc src="ethereum/rpc/eth_api.go:608"
I[2021-05-27|20:38:24.553] ABCIQuery                                    module=rpc path=/cosmos.auth.v1beta1.Query/Account data=0A2A65746831306A6D7036736768346363367A743365386777303577617676656A677235707732756E666A75 result="value:\"\\n\\323\\001\\n$/ethermint.types.v1alpha1.EthAccount\\022\\252\\001\\n\\205\\001\\n*eth10jmp6sgh4cc6zt3e8gw05wavvejgr5pw2unfju\\022U\\n./ethermint.crypto.v1alpha1.ethsecp256k1.PubKey\\022#\\n!\\003\\222\\356\\300\\374\\350\\301\\245\\243Y\\335\\362\\325\\307\\244fs\\213\\303\\3748\\267\\004m\\201\\270\\024\\323\\230\\021\\325\\257\\335 \\001\\022 \\305\\322F\\001\\206\\367#<\\222~}\\262\\334\\307\\003\\300\\345\\000\\266S\\312\\202';{\\372\\330\\004]\\205\\244p\" height:2 "

Update AccessList to use transient store

On Ethereum, the accessList map is reset when the Prepare function is called prior to executing every transaction. We are not currently clearing/deleting any element of this map and we should implement it in a way that is compatible with the SDK:

store key -> value: prefixByte | address | slot hash -> 0x1

RPC method "getBlockByNumber" fails with handler crashed

System info:

Macos

Steps to reproduce:

call

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1", false],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Expected behavior:

Return

{"jsonrpc":"2.0","id":1,"result":{"difficulty":null,"extraData":"0x0","gasLimit":"0xffffffff","gasUsed":null,"hash":"0xabac6416f737a0eb54f47495b60246d405d138a6a64946458cf6cbeae0d48465","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","nonce":null,"number":"0x1","parentHash":"0x","sha3Uncles":null,"size":"0x9b","stateRoot":"0x","timestamp":"0x5f5bd3e5","totalDifficulty":null,"transactions":[],"transactionsRoot":"0x","uncles":[]}}

Actual behavior: [What actually happened]

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"method handler crashed"}}

Additional info: [Include gist of relevant config, logs, etc.]

node log

I[2021-06-07|18:24:10.443] ABCIQuery                                    module=rpc path=/ethermint.evm.v1alpha1.Query/BlockBloom data= result="code:22 log:\"rpc error: code = NotFound desc = block bloom not found: key not found\" height:1 codespace:\"sdk\" "
DEBU[0139] failed to query BlockBloom at height 1        error="rpc error: code = NotFound desc = rpc error: code = NotFound desc = block bloom not found: key not found" fn=EthBlockFromTendermint module=evm-backend src="ethereum/rpc/backend.go:178"

EVM profiling

Goal: identify bottlenecks and performance improvements

Action items:

Profile evm module

Document findings

SDK applications expose a profiling address by default that can be used with the pprof library

This can be changed on the config.toml file

  • Default address: localhost:6060
  • Enable by default and set that address into staport's config.yml at the root folder of the repo

Cosmos Ethermint stale issues

A lot of issues were closed by the stale bot on the cosmos/ethermint repo that might still be valid.

Action items:

  • Create new issues with the same title on our repo
  • Link them to the original issue on the description

Metamask: RLP Decode Fails

System info:
Macos
Steps to reproduce:

Not sure if I am something wrong, but if I try to send an amount using metamask, the transaction fails.

The logs from the node give me :

ERRO[0017] transaction RLP decode failed                 error="rlp: input string too long for uint64, decoding into (types.MsgEthereumTx)(*types.TxData).GasLimit" module=json-rpc
  1. Start the node
  2. Setup metamask with a valid account with initial amount. I setup gas limit with 21000 (min amount) and gas fee to 50
  3. Send 1 photon to another address

Expected behavior:

Transaction Success

Actual behavior: [What actually happened]

Error decoding the transaction

`eth_coinbase` address does not correspond to an account

System info: [Include Ethermint commit, operating system name, and other relevant details]

Steps to reproduce:

Currently, what coinbase api returns is the consensus address, there's no correspond bank account for it, and I believe it's not the "address that staking rewards will be send to" as mentioned in comment. We should do a conversion(GetValidatorByConsAddr) and return the validator address to avoid confusion.
But we don't have direct access to the keeper in eth rpc layer, we need to add a convert api in cosmos-sdk first.

make build failed with rename method Child

# github.com/cosmos/ethermint/crypto/hd
crypto/hd/algorithm.go:79:18: key.Child undefined (type *hdkeychain.ExtendedKey has no field or method Child)
make: *** [build] Error 2

vesting tx cli is included twice in client command

System info: [Include Ethermint commit, operating system name, and other relevant details]

Steps to reproduce:

$ ./build/ethermintd tx
 Transactions subcommands

Usage:
  ethermintd tx [flags]
  ethermintd tx [command]

Available Commands:

  ...
  vesting             Vesting transaction subcommands
  vesting             Vesting transaction subcommands

Problem: init.sh consensus failure

when i run

  1. make
  2. init.sh

program does not continue

os: mac, linux

E[2021-05-27|10:51:36.687] CONSENSUS FAILURE!!!                         module=consensus err="runtime error: invalid memory address or nil pointer dereference" stack="goroutine 140 
[running]:\nruntime/debug.Stack(0x14002ee8bc8, 0x101deb2c0, 0x102ef1350)\n\t/usr/local/go/src/runtime/debug/stack.go:24 
+0x88\ngithub.com/tendermint/tendermint/consensus.(*State).receiveRoutine.func2(0x140010d0a80, 0x10208c888)\n\t/Users/leejw51/go/pkg/mod/github.com/tendermint/[email protected]/consensus/state.go:726 +0x50\npanic(0x101deb2c0, 0x102ef1350)\n\t/usr/local/go/src/runtime/panic.go:965
 +0x14c\ngithub.com/cosmos/cosmos-sdk/types.Context.TransientStore(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\n\t/Users/leejw51/go/pkg/mod/github.com/cosmos/[email protected]/types/context.go:234 
+0x44\ngithub.com/cosmos/ethermint/x/evm/keeper.Keeper.GetBlockBloomTransient(0x102124028, 0x14000eb26a0, 0x1020ec860, 0x14000fb8f00, 0x1020ec8b0, 0x14000fb8f20, 0x102124028, 0x14000eb26a0, 
0x1400059a858, 0x1020ec860, ...)\n\

blockGasMeter never set

System info:
MacOs

Steps to reproduce:

In the EthGasConsumeDecorator antle handler, we are checking that the user has enough gas to pay the transaction.

We are setting the transaction gas meter to infinite

	infCtx := ctx.WithGasMeter(sdk.NewInfiniteGasMeter())

But the block gas meter is not defined.

At this following line https://github.com/tharsis/ethermint/blob/main/app/ante/eth.go#L301
The program panic because of nil pointer exception (blockGasMeter return nil)

It is not clear how we should set the block gas limit.
What is the difference between transaction gas meter and block gas meter? Maybe some documentation would help

Expected behavior:

Anter handler does not fails or manage the error gracefully

Actual behavior: [What actually happened]

Nil pointer exception

Additional info: [Include gist of relevant config, logs, etc.]

`eth_getStorageAt` fails with `"parse error"`

System info:
MacOs

Steps to reproduce:

// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getStorageAt","params":["0x0f54f47bf9b8e317b214ccd6a7c3e38b893cd7f0", "0"  "latest"],"id":1}' -H "Content-Type: application/json" http://localhost:8545

Expected behavior:

// Result
{"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"}

Actual behavior:

{"jsonrpc":"2.0","id":null,"error":{"code":-32700,"message":"parse error"}}

Additional info: [Include gist of relevant config, logs, etc.]

No log, probably the rpc handler is incorrect

Implement stacktrace for errors

Proposal: Add support for palantir/stacktrace

Current behavior: Currently our errors are not being propagated via a stacktrace

Desired behavior: We want to see the origin of an error

Use case: Debug test errors and CI errors

  • x/evm/keeper
  • app/ante

`starport serve`: address already in use

starport serve -r is throwing an error with the current config:

listen on 0.0.0.0:1317: listen tcp 0.0.0.0:1317: bind: address already in use

Should we change evm-rpc.address to something other than 1317, so it doesn't conflict with Cosmos SDK API? Like so in config.yml:

init:
  home: "$HOME/.ethermintd"
  app:
    evm-rpc:
      address: "0.0.0.0:1316"
      ws-address: "0.0.0.0:1318"

JSON-RPC test framework

There are existing tests on tests/rpcthat need to be updated and fixed

Currently uses a script but we should come up with something more robust

  • Check which endpoints are currently failing and create tickets to fix them
  • Update documentation currently located on docs/basics/json_rpc.md
  • https://github.com/testcontainers/testcontainers-go for Docker tests (?)
  • There's also localnet setup using Docker compose that we could use

Tx signature not set

System info:

MacOs

Steps to reproduce:

Current transaction always fails on the
authante.NewValidateBasicDecorator()

because the signature is always empty.

Should we set the signature in the builder
builder.SetSignature(xx) when building transaction ? (in doCall, Call, SendRawTransaction and SendTransaction)

Expected behavior: [What you expected to happen]

Basic check pass

Actual behavior: [What actually happened]

Return error "invalid signature"

Additional info: [Include gist of relevant config, logs, etc.]

`eth_gasPrice` returns a constant zero

Proposal: Implement eth_gasPrice rpc api

Current behavior: returns zero

Desired behavior: Better to return the minimal-gas-prices configured in current node.

Use case: To keep compatible with existing web3 ecosystem

unit test failure

when run make test

    pubsub_test.go:65:
        	Error Trace:	pubsub_test.go:65
        	            				asm_amd64.s:1371
        	Error:      	Not equal:
        	            	expected: int(1)
        	            	actual  : coretypes.ResultEvent(coretypes.ResultEvent{Query:"", Data:types.TMEventData(nil), Events:map[string][]string(nil)})
        	Test:       	TestSubscribe
2021/05/20 12:12:50 lol: { <nil> map[]}
2021/05/20 12:12:50 kek: { <nil> map[]}
    pubsub_test.go:58:
        	Error Trace:	pubsub_test.go:58
        	            				asm_amd64.s:1371
        	Error:      	Not equal:
        	            	expected: int(1)
        	            	actual  : coretypes.ResultEvent(coretypes.ResultEvent{Query:"", Data:types.TMEventData(nil), Events:map[string][]string(nil)})
        	Test:       	TestSubscribe
    pubsub_test.go:51:
        	Error Trace:	pubsub_test.go:51
        	            				asm_amd64.s:1371
        	Error:      	Not equal:
        	            	expected: int(1)
        	            	actual  : coretypes.ResultEvent(coretypes.ResultEvent{Query:"", Data:types.TMEventData(nil), Events:map[string][]string(nil)})
        	Test:       	TestSubscribe
--- FAIL: TestSubscribe (2.00s)

os: ubuntu 21
go: go1.16.4 linux/amd64

Fix script

System info:
MacOs

Steps to reproduce:

Make test-rpc or try running any script that launch a node. Most scripts are outdated and use tag that does not exists anymore.

Expected behavior:

Node can run properly

Actual behavior:

Cli error

Additional info: [Include gist of relevant config, logs, etc.]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.