Skip to content

perf(sdk): set-wide storage calls ask every member at once; the settle's steps logged - #1093

Merged
cryptskii merged 3 commits into
mainfrom
perf/sofi-settle-rounds
Oct 1, 2026
Merged

cryptskii merged 3 commits into
mainfrom
perf/sofi-settle-rounds

Conversation

@cryptskii

Copy link
Copy Markdown
Collaborator

The trade's settle, from the rig: the SDK's storage client asked the five storage members one after another for every object, index and cell. Now it asks them all at once. The settle's steps are logged.

Found on the rig (APK = main 0d36d20)

  • Three trades took 126–129 s, and the settle was 70–80 s of each.
  • The settle resolved in its first round, so no round was wasted. Inside that one resolution, about 1–2 s of fast cell reads alternated with 6–12 s of silence, five times over.
  • The silence was SetClient. Every object read and put, index read and append, and cell read and put asked the members in turn. The settle's objects carry SPHINCS+ signatures, so a phone paid five round trips per object.

Change

  • Concurrent set-wide calls. Every SetClient call asks all members at once and keeps their answers in member order. Nothing a member answers changes.
  • fetch_verified. It reads every member at once and keeps the first answer, in member order, whose bytes re-hash to the address.
  • Step logs. The settle logs where each stage ends: registration, precommit, exercise, each leg's vault, facts, advanced. Core logs each generation a chain establishes. Nothing reads a clock (ci/no_clock_and_no_json.sh passes); logcat's timestamps time each stage.

Rig after the change (APK = this branch, same fleet)

The same kind of trade, a chain ERA → RIGT → HOP with no setup, realized at position 13 in 53 s, against 126–129 s. The quote took 20 s.

Stage Before After
Draft → completing 14.5 s 4 s
Completing 16 s 6.3 s
Settle 70–80 s 28.7 s

Tests (release, Postgres node fleet)

  • The new test: a_set_asks_every_member_at_once. Each member sits behind a relay that holds its first connection until every member has one, so a client that asks the members in turn is never answered. An object put directly is read through the relays from all five members, and a put through them is taken by all five.
  • Mutation control: object reads in turn turn it red (1 of 5 members answered); restored byte for byte.
  • SDK node and handler suites: 76 passed, 0 failed (node e2e, sender and recipient admission, token create, faucet, realized records, sofi_flow, route_seats, storage_node_sdk, storage_io, sofi_reads).
  • Core: dsm sofi::, 237 passed, 0 failed.
  • Static checks: make lint exit 0; guard clean; conformance_evidence 805 rows.

What remains (§6.59), from the step logs

  • Owner walks from activation, 11 s. Whether a walk records a frontier for the vault owner is the owner's question (DSM A8).
  • The chain walk of the vault the trade consumed, about 19 s. Two passes over the sibling leg re-read the same cells about four times each.
  • Establishing the facts, 2.7 s.

Pins

INTENT_PINS will be repinned once from this PR's Code map.

…tle's steps are logged

On the rig a SoFi trade's settle was 70-80 s of a ~127 s trade. It resolved
in its first round; inside that one resolution, fast cell reads alternated
with 6-12 s of silence. The silence was `SetClient` asking the five members
one after another for every object read and put, index read and append, and
cell read and put. A phone paid five round trips per object, and the
settle's objects carry SPHINCS+ signatures.

- Every `SetClient` call asks all members at once and keeps their answers
  in member order; nothing a member answers changes.
- `fetch_verified` reads every member at once and keeps the first answer,
  in member order, whose bytes re-hash to the address.
- The settle logs where each stage ends, and Core logs each generation a
  chain establishes. Nothing reads a clock; the log's timestamps time it.

Test: `a_set_asks_every_member_at_once`. Each member sits behind a relay
that holds its first connection until every member has one, so a client
that asks the members in turn is never answered. Mutation: object reads in
turn, red (1 of 5 members answered).

Rig after the change: the same chain trade in 53 s (126-129 s before); the
settle in 28.7 s (70-80 s before).
…(§6.59)

The rig's settle timeline before and after, the change, its test and
mutation control, and what remains: the owner walks from activation (A8,
the owner's question), the chain walk's repeated cell reads over a sibling
leg, and establishing the facts.
126 stale rows repinned, every one code-class. Evidence at 7a6c6e7: the
96 tests of those rows, all passed. `make requirement-map-intent` on CI's
code map: 0 failing rows, 635 pinned, 0 failing pins.
@cryptskii
cryptskii marked this pull request as ready for review October 1, 2026 17:05
@cryptskii
cryptskii merged commit 076792e into main Oct 1, 2026
27 checks passed
@cryptskii
cryptskii deleted the perf/sofi-settle-rounds branch October 1, 2026 19:25
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