Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for overlay_getLogs and overlay_callConstructor #29481

Open
joshstevens19 opened this issue Apr 7, 2024 · 5 comments
Open

Add support for overlay_getLogs and overlay_callConstructor #29481

joshstevens19 opened this issue Apr 7, 2024 · 5 comments

Comments

@joshstevens19
Copy link

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: ledgerwatch/erigon#9438

Would be cool to see it here!

@fuelmessenger

This comment was marked as spam.

@s1na
Copy link
Contributor

s1na commented Apr 8, 2024

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

@holiman
Copy link
Contributor

holiman commented Apr 9, 2024

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

@crebsy
Copy link

crebsy commented Apr 10, 2024

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.

@kaber2
Copy link

kaber2 commented Apr 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants