-
Notifications
You must be signed in to change notification settings - Fork 88
feat(artillery): add PKP sign test and state management for E2E testing #846
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
Merged
Ansonhkg
merged 11 commits into
feat/naga-dev-29-05-2025-v2
from
feature/node-4619-naga-artillery-init-script
Jul 30, 2025
Merged
feat(artillery): add PKP sign test and state management for E2E testing #846
Ansonhkg
merged 11 commits into
feat/naga-dev-29-05-2025-v2
from
feature/node-4619-naga-artillery-init-script
Jul 30, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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.
… and lit-auth-artillery
Ansonhkg
commented
Jul 29, 2025
Collaborator
Author
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.
…che disabled", when it should only disable cache when explicitly set to false.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHAT
DEBUG_HTTPso it will console log the HTTP response detailsInit script
Master account balance check
Open this in a separate terminal during the Artillery test to live-monitor Lit ledger balance updates.
Artillery test commands
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
Result:
https://app.artillery.io/share/sh_1ea0f0f1ae088199a535105f3b1b83b44cab94d1b5e487838885e71bb33f6104