Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Jul 28, 2025

WHAT

  • Artillery init script to perform necessary chain interactions prior running artillery script
  • Added a new env var DEBUG_HTTP so it will console log the HTTP response details

Init script

NETWORK=naga-staging bun run artillery:init

Master account balance check

Open this in a separate terminal during the Artillery test to live-monitor Lit ledger balance updates.

NETWORK=naga-staging bun run artillery:balance-status

Artillery test commands

PKP Sign

NETWORK=naga-staging bun run artillery:pkp-sign

Result (Ledger ran out of fund): https://app.artillery.io/share/sh_c9eb6c064de617945c0a55e15bd30e1f00dca7701fe4ff950fcc82ac481c90d9
Result 2 (Topped-up 10,000 Test tokens, maybe excessive but works): https://app.artillery.io/share/sh_2b23f4ea4eb839c327249c84261cf816b1aacdf478d1f9a1444ceb62984972bd
Result 3 (Hit node usage is above 100%):
https://app.artillery.io/share/sh_2a8700f224e68b18724ce140638a38f0e93cfd1d28ed5839f2952a281ae3f9c2

Sign Session Key

NETWORK=naga-staging bun run artillery:sign-session-key

Result:
https://app.artillery.io/share/sh_1ea0f0f1ae088199a535105f3b1b83b44cab94d1b5e487838885e71bb33f6104

Ansonhkg added 10 commits July 28, 2025 22:30
- Introduced new artillery configurations for PKP sign testing.
- Implemented state management in StateManager to handle account data.
- Created init script to initialise necessary resources and manage account funding.
- Added pkpSign processor to execute signing operations during tests.
- Updated package.json to include new artillery commands.
…performance

- Extended the duration and increased the arrival rate and maximum virtual users for the PKP sign test.
- Introduced a ramp-up and ramp-down phase to better simulate real-world usage patterns.
- Introduced a Zod schema to validate the structure of PKP sign results, ensuring proper format for signature, verifying key, signed data, recovery ID, public key, and signature type.
- Updated the pkpSign processor to validate results before logging, enhancing reliability and error handling in E2E tests.
- Introduced AccountManager for handling master account operations, including fetching account details and managing payment balances.
- Added NetworkManager to streamline network module initialization and public client creation.
- Updated init script to utilize new managers for improved clarity and maintainability.
- Refactored pkpSign processor to support master account authentication and context creation.
- Adjusted package.json to simplify artillery initialization command.
- Introduced a cache parameter in the auth manager and related functions to control caching behavior for delegation auth signatures.
- Updated the GetPkpAuthContextSchema to include an optional cache object.
- Enhanced tryGetCachedDelegationAuthSig to generate a new signature if caching is disabled, improving flexibility in auth signature management.
…ripts

- Added new artillery commands for balance status and sign session key tests, improving testing capabilities.
- Updated the PKP sign configuration to use a multi-endpoint processor for better flexibility.
- Introduced a new balance status script to monitor account balances during tests.
- Refactored existing scripts to include debug logging for HTTP responses, aiding in troubleshooting.
Copy link
Collaborator Author

@Ansonhkg Ansonhkg left a comment

Choose a reason for hiding this comment

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

looks like i broke something here now i'm unable to run e2e tests. Fixing...


fixed here bd8240e

…che disabled", when it should only disable cache when explicitly set to false.
@Ansonhkg Ansonhkg merged commit 633f30c into feat/naga-dev-29-05-2025-v2 Jul 30, 2025
1 of 4 checks passed
@Ansonhkg Ansonhkg deleted the feature/node-4619-naga-artillery-init-script branch July 30, 2025 11:35
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.

2 participants