-
Notifications
You must be signed in to change notification settings - Fork 864
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
Logs Index RPC API #262
Logs Index RPC API #262
Conversation
Add a RPC API to create the logs index. Example usage: ``` curl -H "Content-Type: application/json" \ -X POST \ --data '{"jsonrpc":"2.0","method":"admin_indexTransactionLogs", "params":["0x0", "0x10000"], "id":1}' \ <node RPC port> ``` Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Some more examples
Start indexing from 0 to chain head
request is ignored if indexing is already occurring
|
The changes look good (although spotless is currently complaining) ...but I notice tthe absence of tests, is the logic tested elsewhere (already covered / follow up PR)? |
That's why it's a draft PR. ;) |
* have CLI and RPC share one name - GenerateLogBloomCache * JSON-RPC tests * Use EthScheduler instead of our own Executor Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Tests for the cache generation and querying were in the initial checkin last week. This focuses on the RPC exposure of the GenerateLogBloomCache and refactors the CLI, so the new test validates we get what we want out of the RPC call into the other systems. |
} | ||
} | ||
} catch (final InterruptedException e) { | ||
// ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; might a DEBUG
or TRACE
level log message be useful in this InterruptedException
case, given it is around indexing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only place it would be seen is when attempting to acquire the lock, and we wouldn't re-try if we got interrupted waiting for the lock, we would fail just like a timeout occured. So I don't see logging as adding any value.
Add a RPC API to create the logs bloom cache. Example usage: ``` curl -H "Content-Type: application/json" \ -X POST \ --data '{"jsonrpc":"2.0","method":"admin_generateLogBloomCache", "params":["0x0", "0x10000"], "id":1}' \ <node RPC port> ``` Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Add a RPC API to create the logs bloom cache. Example usage: ``` curl -H "Content-Type: application/json" \ -X POST \ --data '{"jsonrpc":"2.0","method":"admin_generateLogBloomCache", "params":["0x0", "0x10000"], "id":1}' \ <node RPC port> ``` Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com> Signed-off-by: edwardmack <ed@edwardmack.com>
* Add GraphQL Schema Add support for generating the GraphQL Schema, which is the common schema form used for GraphQL libraries. * Update schema.graphqls Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Update schema.graphqls Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Update schema.graphqls Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Update schema.graphqls Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Update schema.graphqls Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com> * Enhance validate script Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com> * add missing package Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com> Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
Add a RPC API to create the logs index.
Example usage:
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
PR description
Fixed Issue(s)