Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR fix #179 and #457 by implement EIP-1898.
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which part of the codebase this PR will touch base on,
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) thatTest
eth_call
test: function ownerCount() => 0x0db02622
request:
{ "jsonrpc": "2.0", "id": null, "error": { "code": -32700, "message": "parse error" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "recovery failed" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000001" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000001" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000001" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000001" }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000001" }eth_estimateGas
test: function ownerCount() => 0x0db02622
request:
{ "jsonrpc": "2.0", "id": null, "error": { "code": -32700, "message": "parse error" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "recovery failed" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x5208" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x5208" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x5208" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x5208" }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x5208" }eth_getAccountInfo
request:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32602, "message": "missing value for required argument 1" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": { "address": "0x0000000000000000000000000000000000000088", "balance": "0x1fc3842bd1f071c00000", "codeHash": "0x43e5b04f4015a9345835af4980fea519f1a1f499cbfddd624696cca4dcd43657", "codeSize": 14452, "nonce": 0, "storageHash": "0x69fc7cb82b5837876debf26719e7057afa53678154477a9a8376f371caef86b8" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": { "address": "0x0000000000000000000000000000000000000088", "balance": "0x1fc3842bd1f071c00000", "codeHash": "0x43e5b04f4015a9345835af4980fea519f1a1f499cbfddd624696cca4dcd43657", "codeSize": 14452, "nonce": 0, "storageHash": "0x69fc7cb82b5837876debf26719e7057afa53678154477a9a8376f371caef86b8" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": { "address": "0x0000000000000000000000000000000000000088", "balance": "0x1fc3842bd1f071c00000", "codeHash": "0x43e5b04f4015a9345835af4980fea519f1a1f499cbfddd624696cca4dcd43657", "codeSize": 14452, "nonce": 0, "storageHash": "0x69fc7cb82b5837876debf26719e7057afa53678154477a9a8376f371caef86b8" } }request:
{ "jsonrpc": "2.0", "id": 8001, "result": { "address": "0x0000000000000000000000000000000000000088", "balance": "0x1fc3842bd1f071c00000", "codeHash": "0x43e5b04f4015a9345835af4980fea519f1a1f499cbfddd624696cca4dcd43657", "codeSize": 14452, "nonce": 0, "storageHash": "0x69fc7cb82b5837876debf26719e7057afa53678154477a9a8376f371caef86b8" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": { "address": "0x0000000000000000000000000000000000000088", "balance": "0x1fc3842bd1f071c00000", "codeHash": "0x43e5b04f4015a9345835af4980fea519f1a1f499cbfddd624696cca4dcd43657", "codeSize": 14452, "nonce": 0, "storageHash": "0x69fc7cb82b5837876debf26719e7057afa53678154477a9a8376f371caef86b8" } }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": { "address": "0x0000000000000000000000000000000000000088", "balance": "0x1fc3842bd1f071c00000", "codeHash": "0x43e5b04f4015a9345835af4980fea519f1a1f499cbfddd624696cca4dcd43657", "codeSize": 14452, "nonce": 0, "storageHash": "0x69fc7cb82b5837876debf26719e7057afa53678154477a9a8376f371caef86b8" } }eth_getBalance
ADDRESS="${MY_ADDRESS}"
ADDRESS="${XDCValidator}"
request:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32602, "message": "missing value for required argument 1" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x1fc3842bd1f071c00000" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x1fc3842bd1f071c00000" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x1fc3842bd1f071c00000" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x1fc3842bd1f071c00000" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x1fc3842bd1f071c00000" }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x1fc3842bd1f071c00000" }eth_getCode
request:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32602, "message": "missing value for required argument 1" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }eth_getStorageAt
request:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32602, "message": "missing value for required argument 2" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000003" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000003" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000003" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000003" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000003" }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0000000000000000000000000000000000000000000000000000000000000003" }eth_getTransactionCount
request:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32602, "message": "missing value for required argument 1" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0" }request:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0" }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "PoS V1 does not support confirmed block lookup" } }request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x0" }nonexistent block number
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for number not found" } }nonexistent hash
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "error": { "code": -32000, "message": "header for hash not found" } }test blockHash of block number 1:
request:
response:
{ "jsonrpc": "2.0", "id": 8001, "result": "0x......" }