feat(scenarios): add Tessera state preparation - #11
92Infinitus92 wants to merge 9 commits into
Conversation
|
26dd7ea to
8539d42
Compare
|
No actionable findings in the reviewed diff. The previously reported RPC-target issue is fixed at Tests could not run because Rustup attempted to write outside the permitted workspace. |
8539d42 to
c6449f5
Compare
|
c6449f5 to
d18d14f
Compare
|
No actionable issues found in the PR changes. Focused tests could not run because Rustup attempted to write under the read-only |
|
No concrete bugs found in the specified PR range. One testing improvement: add a local RPC test for Tests could not run: the pinned toolchain required a write outside the sandbox, and the installed toolchain’s offline dependency cache lacked |
Static review only; live tests were not run. |
9af2fc5 to
61a9091
Compare
Tessera is a proprietary market maker with no IDL, so its market accounts are written through the raw byte layout the BisonFi work introduced. Eight templates cover price, depth, curve, halt, staleness and freshness. The market catalog lists all 26 live markets with their mints, decimals and freshness limit, so the UI constrains the choice and a model can resolve one through search_constant_options. One builder exists, for the only thing a template cannot express: turning a human price into the pair of reciprocal atomic ratios, which needs both mints' decimals.
Replace the static market catalog with on-chain discovery and add exact depth preparation with live swap coverage. Accept decimal u64/i64 overrides through the IDL encoder for lossless Studio editing.
The live fetch retry loop discarded each intermediate error and panicked with only the last one. Collect every attempt and include them in the panic so a persistent failure is diagnosable.
e44b84b to
51e2952
Compare
The Tessera, HumidiFi and GoonFi parameter structs deserialized their fields as snake_case, so a client sending surfnetPort the way the pump, get_template and search_constant_options tools expect it was ignored and the read fell back to port 8899. Scenario tools now share one convention.
Stacked on #8 — Tessera is the same mechanism class as BisonFi (PMM, no IDL) and reuses the raw-layout engine it introduced.
create_tessera_fair_value_scenario, on the generic scenario path. No protocol HTTP endpoints.monitoring.yamlis documentation only: the program-upgrade fingerprint and the catalog refresh procedure.The PR appears safe to merge.
Summary
The PR adds declarative Tessera state preparation, including raw-layout templates, market discovery, fair-value and depth builders, MCP tooling, and live protocol tests.
u8writes for ladder-wide flags.Diagram
sequenceDiagram participant Client as MCP Client participant MCP as Surfpool MCP participant RPC as Selected Surfnet RPC participant Builder as Tessera Builder participant Studio as Scenario Studio Client->>MCP: Tessera tool call (surfnetPort) MCP->>RPC: Read market and mint accounts RPC-->>MCP: Current account state MCP->>Builder: Validate and build overrides Builder-->>MCP: Scenario MCP->>Studio: Stage scenario Studio-->>Client: Editor URLReviews (13) · Last reviewed commit: "docs(tessera): say that the freshness ov..."