Skip to content

Commit ac4e9f6

Browse files
cloudgrayaljo242vladjdk
authored
fix(rpc): align jsonrpc apis with geth v1.16.3 (#599)
* deps(tests/jsonrpc): bump geth client version to v1.16.3 * WIP: enhance(rpc): eth apis * fix(rpc): fix handling PendingBlockNumber * fix(rpc):fix NewRPCTransaction method * refactor(rpc): refactor eth apis * WIP: fix(rpc): test code * WIP: record working history * WIP: test(rpc) fix test code * WIP: test(rpc) fix test code * WIP: test(rpc) fix test code * WIP: test(rpc) fix test code: TestGetBlockByHash * WIP: test(rpc) fix test code - TestGetBlockTransactionCountByHash - TestGetBlockTransactionCountByNumber - TestGetEthBlockFromComet * WIP: test(rpc) fix test code - TestHeaderByNumber * WIP: test(rpc) fix test code - TestHeaderByHash * WIP: test(rpc) fix test code - TestEthBlockByNumber * WIP: test(rpc) fix test code - TestGetTransactionReceipt * WIP: test(rpc) fix test code - GetPrice * test(rpc): fix tx_pool apis * chore: remove LLM helper files * chore: remove LLM helper files * chore: add defense code to util function * chore(rpc): refine code * chore(systemtests): modify error msg * chore(rpc): add comment * chore: fix lint * chore(rpc): refine code * chore(rpc): modify comment * chore(rpc): modify comment * chore: update CHANGELOG.md * chore: fix lint * chore: add markdown-link ignore patterns --------- Co-authored-by: Alex | Interchain Labs <[email protected]> Co-authored-by: Vlad J <[email protected]>
1 parent cb42123 commit ac4e9f6

File tree

32 files changed

+1605
-1262
lines changed

32 files changed

+1605
-1262
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
- [\#442](https://github.com/cosmos/evm/pull/442) Prevent nil pointer by checking error in gov precompile FromResponse.
110110
- [\#387](https://github.com/cosmos/evm/pull/387) (Experimental) EVM-compatible appside mempool
111111
- [\#476](https://github.com/cosmos/evm/pull/476) Add revert error e2e tests for contract and precompile calls
112+
- [\#599](https://github.com/cosmos/evm/pull/599) Align jsonrpc apis with geth v1.16.3
112113

113114
### FEATURES
114115

mlc_config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
"ignorePatterns": [
66
{
77
"pattern": "^https://twitter.com/.*"
8+
},
9+
{
10+
"pattern": "^http://localhost.*"
11+
},
12+
{
13+
"pattern": "^https://localhost.*"
14+
},
15+
{
16+
"pattern": "^http://127\\.0\\.0\\.1.*"
17+
},
18+
{
19+
"pattern": "^https://127\\.0\\.0\\.1.*"
820
}
921
]
1022
}

rpc/backend/backend.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ type EVMBackend interface {
6464

6565
// Blocks Info
6666
BlockNumber() (hexutil.Uint64, error)
67+
GetHeaderByNumber(blockNum rpctypes.BlockNumber) (map[string]interface{}, error)
68+
GetHeaderByHash(hash common.Hash) (map[string]interface{}, error)
6769
GetBlockByNumber(blockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)
6870
GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)
6971
GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
@@ -73,7 +75,7 @@ type EVMBackend interface {
7375
BlockNumberFromComet(blockNrOrHash rpctypes.BlockNumberOrHash) (rpctypes.BlockNumber, error)
7476
BlockNumberFromCometByHash(blockHash common.Hash) (*big.Int, error)
7577
EthMsgsFromCometBlock(block *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults) []*evmtypes.MsgEthereumTx
76-
BlockBloom(blockRes *tmrpctypes.ResultBlockResults) (ethtypes.Bloom, error)
78+
BlockBloomFromCometBlock(blockRes *tmrpctypes.ResultBlockResults) (ethtypes.Bloom, error)
7779
HeaderByNumber(blockNum rpctypes.BlockNumber) (*ethtypes.Header, error)
7880
HeaderByHash(blockHash common.Hash) (*ethtypes.Header, error)
7981
RPCBlockFromCometBlock(resBlock *tmrpctypes.ResultBlock, blockRes *tmrpctypes.ResultBlockResults, fullTx bool) (map[string]interface{}, error)

0 commit comments

Comments
 (0)