go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Geth RPC service consistency against other client implementations #2

Open JosephK95 opened this issue 3 years ago • 1 comments

(Continued from #25495) I apologize for many reports at a time and will appreciate for any kinds of comments.

System information

Geth version: 1.10.21-stable OS & Version: Ubuntu 20.04.4 LTS Node.js / web3.js versions: v16.15.0 / v1.7.3

Q1. Gas estimation: Low gas limit

  • (Geth) returns the estimated gas value
  • (Node B) returns an error: "gas limit below intrinsic gas"

Q2. Gas estimation: High gas limit

  • (Geth) returns the estimated gas value
  • (Node A) returns an error: "gas required exceeds allowance (0)"

Q3. Gas estimation: Invalid type

  • (Geth) returns the estimated gas value
  • (Node B) returns an error: "Invalid params"

Q4. Gas estimation: Invalid nonce

  • (Geth) returns the estimated gas value
  • (Node B) returns an error: "wrong transaction nonce"

Q5. Gas estimation: Insufficient funds

  • (Geth) returns the estimated gas value
  • (Node A) returns an error: "insufficient funds for transfer"

Q6. Call: Invalid type

  • (Geth) returns the execution result value
  • (Node B) returns an error: "Invalid params"

Q7. Call: Invalid nonce

  • (Geth) returns the execution result value
  • (Node B) returns an error: "VM execution error"

Steps to reproduce the behaviour

  1. Please download all the .tar.gz files below. https://drive.google.com/file/d/1FGUpnQ4WvftxBi7qUp63G3SuhKc-Q1_z/view?usp=sharing https://drive.google.com/file/d/1KKuie5iNWIqAdgjcqOSWryCgIpyqwblq/view?usp=sharing test_cases.tar.gz
  2. Untar the downloaded .tar.gz files. They contain valid chain data and test cases that are semi-automatically generated by our project techniques.
  3. Check out DATA_DIR and TC_FILE for your Q{n} from the description below.
  4. Execute Geth binary with the following flags: geth --datadir DATA_DIR --http --http.api eth --networkid 15 --nodiscover --syncmode full --gcmode archive
  5. Execute the test case file: node TC_FILE
  • Q1. data-geth-1 / TC_1659704161.js
  • Q2. data-geth-2 / TC_1659708954.js
  • Q3. data-geth-1 / TC_1659703783.js
  • Q4. data-geth-2 / TC_1659708246.js
  • Q5. data-geth-2 / TC_1659709165.js
  • Q6. data-geth-2 / TC_1659708555.js
  • Q7. data-geth-1 / TC_1659703525.js

JosephK95 avatar Aug 09 '22 05:08 JosephK95

We have test cases for RPC endpoints here: https://github.com/ethereum/execution-apis/tree/main/tests Your tests should be added there.

@lightclient

fjl avatar Aug 09 '22 12:08 fjl

Closing the issue as moved to the link above.

JosephK95 avatar Aug 20 '22 04:08 JosephK95