-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(iota-json-rpc-api): Restore explorer metric endpoints #1845
feat(iota-json-rpc-api): Restore explorer metric endpoints #1845
Conversation
c9793a2
to
37f5a1b
Compare
37f5a1b
to
72c78ca
Compare
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.
Good job @samuel-rufi! Left a few comments and suggestions of non-critical nature nevertheless.
One more thing @samuel-rufi: I suggest changing the target branch into a new In this context please also regenerate the |
Co-authored-by: Konstantinos Demartinos <[email protected]>
crates/iota-indexer/src/processors/objects_snapshot_processor.rs
Outdated
Show resolved
Hide resolved
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.
lgtm 🌸
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.
I think the scopes of processors
and handlers
overlap after all, creating confusion on what should be where. Handlers process data, as well as processors in a way.
We should care of making this less ambiguous. Therefore I think it would be plausible to consolidate everything into a single module (handlers
or processors
), remove any suffixes/prefixes handlers
or processors
and classify between metrics
in a nested module (what is now in the processors
module except for the ObjectSnapshotProcessor
) and the rest.
Nevertheless, this is a refactoring task that should not be part of the testnet milestone. Will create an issue accordingly.
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.
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.
lgtm 🚀
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.
lgtm
7dc520a
into
update-rpc-indexer-metrics
|
@marc2332 the endpoint works in batches - it waits for enough checkpoints to calculate the metrics. The threshold default value is currently set as curl -s localhost:9005 --header 'Content-Type: application/json' --data '{ "jsonrpc": "2.0", "id": 1, "method": "iotax_getAllEpochAddressMetrics", "params": [] }' | json_pp
{
"id" : 1,
"jsonrpc" : "2.0",
"result" : [
{
"checkpoint" : 126,
"cumulativeActiveAddresses" : 1,
"cumulativeAddresses" : 412,
"dailyActiveAddresses" : 1,
"epoch" : 0,
"timestampMs" : 1724673353380
}
]
} |
* feat(iota-json-rpc-api): Add explorer endpoints back * feat(iota-json-rpc-api): Add metric processors back * refactor(iota-indexer): fix schema usages * refactor(iota-indexer): redo `ExtendedApi` methods * refactor(iota-indexer): Introduce analytical-worker in docker-compose * refactor(iota-benchmark, iota-core): Fix format * refactor: Adjust docker-compose params and ports * refactor: Add missing documentation * refactor: Explicit export Co-authored-by: Konstantinos Demartinos <[email protected]> * refactor: Move processors * refactor: Regenerate OpenRPC spec * refactor: Add license * refactor: Fix import * refactor: Remove outdated comment * refactor: Add comments to clarify `address` vs `active_address` meaning --------- Co-authored-by: Konstantinos Demartinos <[email protected]>
* feat(iota-json-rpc-api): Restore explorer metric endpoints (#1845) * feat(iota-json-rpc-api): Add explorer endpoints back * feat(iota-json-rpc-api): Add metric processors back * refactor(iota-indexer): fix schema usages * refactor(iota-indexer): redo `ExtendedApi` methods * refactor(iota-indexer): Introduce analytical-worker in docker-compose * refactor(iota-benchmark, iota-core): Fix format * refactor: Adjust docker-compose params and ports * refactor: Add missing documentation * refactor: Explicit export Co-authored-by: Konstantinos Demartinos <[email protected]> * refactor: Move processors * refactor: Regenerate OpenRPC spec * refactor: Add license * refactor: Fix import * refactor: Remove outdated comment * refactor: Add comments to clarify `address` vs `active_address` meaning --------- Co-authored-by: Konstantinos Demartinos <[email protected]> * fix: Remove unimplemented ExtendedApi::query_objects * fix: fmt * feat(tooling-sdk): Sync TS-SDK APIs (#2250) * fix(tooling-sdk): Run generate scripts * fix(tooling-sdk): Update manual types * fix(tooling-sdk): Regenerate types again (after rebase) * fix(tooling-sdk): Regenerate types again (after base branch fixes) * fix(tooling-explorer): Remove usage of removed type (name service) and mock the client methods for now * fix(tooling-sdk): Ignore unused arguments in client without ts-ignore * fix(tooling-sdk): Fix build issues triggered by type changes * fix(tooling-sdk): Support newly added methods in client.ts * fix(tooling-sdk): Run codegen in graphql-transport * fix(tooling-sdk): Add graphql compatibility tests for new methods (skip them as they don't pass atm) * fix(tooling-sdk): Remove nameservice related methods from graphql-transport * fix(tooling-sdk): Add changeset for sdk & graphql-transport packages * fix(tooling-sdk): Make dprint like the changeset format * fix(tooling-sdk): Make dprint like the changeset format * feat: fmt --------- Co-authored-by: Konstantinos Demartinos <[email protected]> Co-authored-by: Mario <[email protected]>
* feat(iota-json-rpc-api): Restore explorer metric endpoints (#1845) * feat(iota-json-rpc-api): Add explorer endpoints back * feat(iota-json-rpc-api): Add metric processors back * refactor(iota-indexer): fix schema usages * refactor(iota-indexer): redo `ExtendedApi` methods * refactor(iota-indexer): Introduce analytical-worker in docker-compose * refactor(iota-benchmark, iota-core): Fix format * refactor: Adjust docker-compose params and ports * refactor: Add missing documentation * refactor: Explicit export Co-authored-by: Konstantinos Demartinos <[email protected]> * refactor: Move processors * refactor: Regenerate OpenRPC spec * refactor: Add license * refactor: Fix import * refactor: Remove outdated comment * refactor: Add comments to clarify `address` vs `active_address` meaning --------- Co-authored-by: Konstantinos Demartinos <[email protected]> * fix: Remove unimplemented ExtendedApi::query_objects * fix: fmt * feat(tooling-sdk): Sync TS-SDK APIs (#2250) * fix(tooling-sdk): Run generate scripts * fix(tooling-sdk): Update manual types * fix(tooling-sdk): Regenerate types again (after rebase) * fix(tooling-sdk): Regenerate types again (after base branch fixes) * fix(tooling-explorer): Remove usage of removed type (name service) and mock the client methods for now * fix(tooling-sdk): Ignore unused arguments in client without ts-ignore * fix(tooling-sdk): Fix build issues triggered by type changes * fix(tooling-sdk): Support newly added methods in client.ts * fix(tooling-sdk): Run codegen in graphql-transport * fix(tooling-sdk): Add graphql compatibility tests for new methods (skip them as they don't pass atm) * fix(tooling-sdk): Remove nameservice related methods from graphql-transport * fix(tooling-sdk): Add changeset for sdk & graphql-transport packages * fix(tooling-sdk): Make dprint like the changeset format * fix(tooling-sdk): Make dprint like the changeset format * feat: fmt --------- Co-authored-by: Konstantinos Demartinos <[email protected]> Co-authored-by: Mario <[email protected]>
Description of change
Restores the explorer metric endpoints.
Links to any relevant issues
Fixes #1619
Dependencies
How the change has been tested
docker-compose
setup and tested the RPC endpoints withcurl
.Try it yourself:
cd docker/pg-services-local docker compose build docker compose up -d
Type of change