Skip to content

Architecture

LN Advisor uses one collection path in the browser and two execution paths for recommendations: Local and Verified Runtime (TEE).

Main stages

  1. collect node data through LNC
  2. normalize it into a stable internal state
  3. apply the privacy transform used for scoring
  4. score the reduced payload
  5. attach provenance or verification material when that execution path supports it

Internal contracts

Raw snapshot

The raw snapshot is the closest internal object to the original node reads.

normalized-node-state-v1

This is the stable internal contract used after collection. It includes:

  • node identity
  • collection metadata
  • normalized channels
  • peer aggregates
  • potential peers
  • totals

privacy-node-state-v1

This is the privacy-transformed state used for scoring. It supports full_internal, feature_only, and banded.

recommendation-set-v1

This is the scoring output contract. It can contain:

  • feeRecommendations
  • forwardOpportunityRanking
  • channelOpeningRecommendations

source-provenance-receipt-v1

This binds the major pipeline stages together with hashes and execution context.

source-collection-receipt-v1

This is the planned source-proof artifact for verified source mode. It binds the exact RPC set and the major collection-stage hashes before scoring.

pinned-model-manifest-v1

This records the expected scoring contract and model identity.

Verified runtime path

The verified client uses:

  • /health
  • /info
  • /attestation
  • /api/recommend
  • /api/verify

That path returns the recommendation plus the data needed to verify the runtime and the result binding.

Design rule

The collection path is shared. The difference between Local and Verified Runtime (TEE) is the execution environment after the reduced payload leaves the browser.

The next source-proof step adds a signed or attested collection receipt before the recommendation request is scored.