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

Add support for overlay_getLogs and overlay_callConstructor

Open joshstevens19 opened this issue 1 year ago • 5 comments
trafficstars

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

Would be cool to see it here!

joshstevens19 avatar Apr 07 '24 16:04 joshstevens19

:sparkles: Thanks to the community, there's an estimated bounty value of $10.90 USD for a successful merge request of this issue via contributions such as 0.975 UNI tokens. Happy coding :grinning: Details and T&Cs at joinfuel.io

fuelmessenger avatar Apr 07 '24 18:04 fuelmessenger

This feature requires an archive node. IMO we should tackle this only once we have pbss archive index in geth.

s1na avatar Apr 08 '24 20:04 s1na

PSA: @fuelmessenger is not anything we're familiar with , might be a scam, so I'll hide those posts

holiman avatar Apr 09 '24 06:04 holiman

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 🟢

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 😄

For op-geth I have this open PR, maybe some things might be reused quite easily.

crebsy avatar Apr 10 '24 18:04 crebsy

I've been considering implementing something vaguely similar, but not requiring source code of the contract in question. Basically I would like to set storage "watchpoints" that can emit custom events. The use case is to deal with contracts emitting no events or unusable events lacking vital information. Source code may or may not be available, but one of the main points is that it is supposed to work programatically, probing the relevant storage address through accesslist tracing and then adding a watchpoint without requiring manually changing the source code. Similar to your proposal, this would only work for an archive node or live blocks.

Given your proposal, I thought I'd mention my idea to see if there is some overlap, but as far as I can tell, these mechanisms would be more complementary as opposed to something that could/should be integrated with each other.

kaber2 avatar Apr 11 '24 11:04 kaber2