paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.59k stars 945 forks source link

Add support for overlay_getLogs and overlay_callConstructor #7503

Open joshstevens19 opened 3 months ago

joshstevens19 commented 3 months ago

Describe the feature

We just seen erigon just merge a PR to allow you with a single RPC request to modify the contract injecting your own events and get the new logs back.. more information on the feature: https://github.com/ledgerwatch/erigon/pull/9438

This is making people who switched from erigon to reth going back purely for how strong this feature is.

Would be cool to see it here!

Additional context

No response

sambacha commented 3 months ago

sorry first this needs to be done https://github.com/paradigmxyz/reth/issues/6752

get back in line 👿

andy-thomason commented 3 months ago

Forgive me if I'm mistaken, but can this be done already with the Geth state override set in eth_call which is also supported by Reth?

https://github.com/paradigmxyz/reth/blob/main/crates/rpc/rpc/src/eth/api/call.rs

gakonst commented 3 months ago

Yes that works on a block by block basis, but doesn't have a backfill option for re-execution of N blocks in 1 RPC call w/ overridden bytecode to get new logs out!

crebsy commented 3 months ago

hey, glad to see this issue here!

Here are some integration tests for a few contracts deployed on ethereum mainnet: https://github.com/ledgerwatch/erigon/blob/devel/cmd/rpcdaemon/postman/Overlay_Testing.json Anyone who plans implementing the two new rpc methods, can run those tests against an archive node with postman until they're all :green_circle:

There's also a minimal README for overlays: https://github.com/ledgerwatch/erigon/blob/devel/turbo/jsonrpc/overlay/README.md but the tests are probably more fun to play with :smile:

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 21 days with no activity.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 21 days with no activity.