hedera-json-rpc-relay icon indicating copy to clipboard operation
hedera-json-rpc-relay copied to clipboard

Implement `debug_getModifiedAccountsByNumber`

Open georgi-l95 opened this issue 2 years ago • 1 comments

Problem

As a developer I'd like to be able to call debug_getModifiedAccountsByNumber(startNum, endNum)

Returns all accounts that have changed between the two blocks specified. A change is defined as a difference in nonce, balance, code hash, or storage hash. With one parameter, returns the list of accounts modified in the specified block.

Solution

Possible solution: Get all transactions between the specified blocks and get modified accounts from there.

Alternatives

No response

georgi-l95 avatar Jul 10 '23 07:07 georgi-l95

Implementation would be similar to debug_getModifiedAccountsByHash So after discussion with the team, we think it would be expensive to have this endpoint. In ethereum accounts are both EOA and contrancts, which means we need to check for changes of accounts and also contract state changes. This would require using the /balances endpoint and the /contracts/{contractIdorEvmaddress}/results and making multiple requests. I will remove this from the design doc for now

konstantinabl avatar Sep 13 '23 12:09 konstantinabl