Skip to content

Conversation

Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Oct 8, 2025

WHAT

  • request the SIGN_SESSION_KEY product when pulling price feed data so we capture all four endpoint prices from the contracts
  • sort validators by the requested product column inside getMaxPricesForNodeProduct, extend the pricing schema forSIGN_SESSION_KEY, and prove the behaviour with a targeted unit test
  • route the PKP auth adapter through the SIGN_SESSION_KEY pricing path while leaving the custom auth adapter on LIT_ACTION

…re sorting

- request `SIGN_SESSION_KEY` prices when fetching node data so the contract returns all four product columns
- extend pricing context schema to accept `SIGN_SESSION_KEY`  and re-sort nodes per product before slicing to threshold
- route PKP auth through `SIGN_SESSION_KEY` pricing while keeping custom auth on `LIT_ACTION`
- cover the new sort logic with a unit test to prove we now pick the cheapest validators for the requested product
@Ansonhkg Ansonhkg self-assigned this Oct 8, 2025
@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 14:27
@Ansonhkg Ansonhkg added 🐞 Bug Fix Something isn't working Feature v8 | Naga labels Oct 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for the SIGN_SESSION_KEY product in the pricing system. It enables the system to capture pricing data for all four endpoint types from contracts and ensures proper node selection based on product-specific pricing.

Key changes:

  • Extended pricing schema to include SIGN_SESSION_KEY product type
  • Modified node selection logic to sort validators by the requested product column rather than defaulting to decryption pricing
  • Routed PKP auth adapter through SIGN_SESSION_KEY pricing path while maintaining custom auth adapter on LIT_ACTION

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
schema.ts Added SIGN_SESSION_KEY to the pricing context schema enum
getMaxPricesForNodeProduct.ts Enhanced node selection to sort by product-specific pricing column
getMaxPricesForNodeProduct.spec.ts Added comprehensive test validating product-specific node selection behavior
getNodesForRequest.ts Added SIGN_SESSION_KEY product ID constant and documentation
getPkpAuthContextAdapter.ts Updated PKP auth adapter to use SIGN_SESSION_KEY pricing instead of LIT_ACTION

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Anson <ansonox@gmail.com>
@Ansonhkg Ansonhkg merged commit a79e752 into naga Oct 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants