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

rpc benchmark: handle JSON RPC cursor breaking change #21099

Open
wants to merge 1 commit into
base: grafana-pull
Choose a base branch
from

Conversation

gegaowp
Copy link
Contributor

@gegaowp gegaowp commented Feb 5, 2025

Description

  • add aux info to the jsonl logs for filtering and agg
  • script to filter wallet traffic and aggregate page-iterations for methods of ["suix_getOwnedObjects", "suix_getAllCoins", "suix_getCoins"] based on both method and params except cursor and limits.

Test plan

local run of grafana_pull_logs and process_jsonl scripts locally, example output lines are like

{"timestamp":"2025-02-05T17:24:42.337975158Z","host":"wallet-rpc.mainnet.sui.io","method":"suix_getCoins","body":{"jsonrpc":"2.0","id":"124","method":"suix_getCoins","params":["0xa127c6a91cb7a79698514ccb217ff0469cdd9b89161a874b9b693c61db4fbd07","0x2::sui::SUI",null,null]},"iteration":10}
{"timestamp":"2025-02-05T17:24:01.05497156Z","host":"wallet-rpc.mainnet.sui.io","method":"suix_getCoins","body":{"jsonrpc":"2.0","id":"5","method":"suix_getCoins","params":["0x896af331b32347d82d18b5543c5da9dc7b5adebaeed484973c834f22e22aaa80","0x2::sui::SUI",null,null]},"iteration":10}

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 7:18pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Feb 5, 2025 7:18pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Feb 5, 2025 7:18pm

@gegaowp gegaowp temporarily deployed to sui-typescript-aws-kms-test-env February 5, 2025 18:45 — with GitHub Actions Inactive
@gegaowp gegaowp temporarily deployed to sui-typescript-aws-kms-test-env February 5, 2025 18:47 — with GitHub Actions Inactive
const WALLET_HOST_PREFIX: &str = "wallet";

#[derive(Debug, Serialize, Deserialize)]
struct LogEntry {
Copy link
Contributor Author

@gegaowp gegaowp Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this struct is technically duplicate with the one in pull_grafana_logs, leaving it here so that

  • no extra dependencies for simplicity
  • the dup is minimal and I do not expect many incremental changes looking forward so it not much of extra burden to carry

use tracing::{debug, info};

const METHODS_TO_AGGREGATE: [&str; 3] =
["suix_getOwnedObjects", "suix_getAllCoins", "suix_getCoins"];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed with @emmazzz that Balance is not affected, lemme know in case I missed other methods.

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

Successfully merging this pull request may close these issues.

1 participant