-
Notifications
You must be signed in to change notification settings - Fork 6
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 Ethereum "Events" #2
Comments
Thanks @davux ! Any way for you to submit a PR? |
I've never done any Ruby programming but I can definitely try, or I could help you with information on how Ethereum events work. |
Any information you can share is golden :-) |
So events is what gets emitted in a function in a smart contract. For example a function Some arguments of an event can be marked as "indexed", which means they can be filtered on. For example, An event being emitted results in the writing of a log to the transaction. There are various JSON-RPC methods (see other link in the issue) to access those. Indexed arguments are stored as topics, while non-indexed arguments are stored as simple data. You can search/filter logs by topic. Since logs are so well optimised to be searched on, you don't even have to read every transaction and filter the logs yourself – instead, the JSON-RPC API provides a few methods to watch specific topics directly. I'm not sure how that would translate to the logstash filter's logic: a "log" granularity maybe? At any rate, the input would need an additional HTH, let me know if you need me to clarify anything specifically. |
Thanks @davux for this extensive explanation. Time permitting, I will get into this in early summer. |
Hi @consulthys @davux, Have you either of you made any progress with implementing support for subscribing to Ethereum events? I would like to help with this and would be happy to discuss with you the preferred approach before starting. Below are some starter questions:
|
No news on my side, unfortunately. About your questions:
|
Hi ! How are you ? I am trying to do what you are talking about here ! You can find the repo here : Are you still working on this (= ? Thank you |
Hi @QuentinCazelles, that's great! Did you push your code related to smart contract events yet? I can only see "block" and "transaction" as supported granularities but nothing about smart-contract-level events. |
Hello @davux , it seems I pushed it several days ago but I had not pushed the new readme ! My bad ! The modification is very light for now. I managed to make my code work by switching digest-sha3 (which is in C) to keccak-pure-ruby. I use https://github.com/EthWorks/ethereum.rb (the ethereum.rb dependency using digest-sha3 is eth gem) |
Hi everyone If you're still interested take a look at my plugin's repo. It still have a trouble with digest-sha3/keccak-pure-ruby gem but it is working with a conf like
Thanks for your feedback |
Awesome stuff!
A very neat addition would be subscribing to specific events using the event-watching functions exposed by the JSON-RPC interface.
This way, you could litterally watch for specific events out of a given contract, it would be perfect.
The text was updated successfully, but these errors were encountered: