Skip to content

CI harness: reduced confidential-balance cheatcodes tree on 4971d40d (internal, not a submission) - #6

Open
michael-moffett wants to merge 1 commit into
mainfrom
local-only/755-reduced-on-4971d40d
Open

CI harness: reduced confidential-balance cheatcodes tree on 4971d40d (internal, not a submission)#6
michael-moffett wants to merge 1 commit into
mainfrom
local-only/755-reduced-on-4971d40d

Conversation

@michael-moffett

Copy link
Copy Markdown
Member

Internal CI harness. Not a submission.

This pull request exists only to run this repository's own workflows
(rust.yml, sdk_node.yml, benchmark.yml) against the reduced
confidential-balance-cheatcodes tree, inside CaliperForge's fork.

  • base: caliperforge:main, fast-forwarded to upstream 4971d40d4b4e19bda12b30b4bb40d2ac164d4d73
  • head: caliperforge:local-only/755-reduced-on-4971d40d
  • diff as built locally: 10 files changed, 1297 insertions(+), 9 deletions(-)

It is not a submission to solana-foundation/surfpool or to any other party,
and it is not intended to be reviewed. It will be left open as run evidence.

…rface

Rebuilt on 4971d40. Ten files: the two cheatcode RPC methods, their
request/response types, the generated SDK-node kit bindings for them, and
the integration tests that cover them.
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds confidential Token-2022 testing cheatcodes that derive keys from signatures and decrypt available and pending balances.

  • Adds surfnet_deriveConfidentialKeys and surfnet_getConfidentialBalance RPC methods.
  • Adds confidential key decoding, derivation, balance decryption, and pending-balance recombination.
  • Exposes matching Rust and Node SDK request/response types and method declarations.
  • Adds unit and integration coverage for key derivation, invalid inputs, deposits, pending balances, and applying pending balances.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defects identified.

The new RPC methods are consistently registered, filtered, serialized, exposed through the Node SDK, and covered by focused key-derivation and confidential-balance tests.

Important Files Changed

Filename Overview
crates/core/src/rpc/surfnet_cheatcodes.rs Registers and implements the two confidential-balance RPC methods with account ownership, key-presence, and decryption error handling.
crates/core/src/types.rs Implements signature parsing, confidential key derivation, authenticated available-balance decryption, and checked pending-balance recombination.
crates/types/src/types.rs Adds serialized confidential request and response contracts and extends the canonical cheatcode method manifest.
crates/sdk-node/surfpool-sdk/kit/types/api.ts Adds typed Node SDK methods whose bigint and nullable response fields are handled by the existing generic transport.
crates/core/src/tests/integration.rs Exercises confidential deposit and apply-pending flows across supported storage configurations while documenting the intentionally uncovered transfer path.

Sequence Diagram

sequenceDiagram
    participant Client
    participant RPC as Surfnet RPC
    participant Crypto as Confidential helpers
    participant SVM
    Client->>RPC: deriveConfidentialKeys(signatures)
    RPC->>Crypto: derive keys from signatures
    Crypto-->>Client: ElGamal public/secret keys and AES key
    Client->>RPC: getConfidentialBalance(account, keys)
    RPC->>SVM: load Token-2022 account
    SVM-->>RPC: account data and slot
    RPC->>Crypto: decrypt available and pending balances
    Crypto-->>Client: balances and pending credit counter
Loading

Reviews (1): Last reviewed commit: "Reduce confidential-balance cheatcodes c..." | Re-trigger Greptile

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