Skip to content

OPS-197: import prelaunch bootstrap JSON during cluster creation - #89

Closed
huangminghuang wants to merge 16 commits into
masterfrom
support/ops-197-pr-47-review
Closed

OPS-197: import prelaunch bootstrap JSON during cluster creation#89
huangminghuang wants to merge 16 commits into
masterfrom
support/ops-197-pr-47-review

Conversation

@huangminghuang

@huangminghuang huangminghuang commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Replacement context

Supersedes #47. Review on that PR identified that scenario-specific bootstrap generation had leaked into the generic FlowScenario / FlowCLI abstraction. This replacement preserves the original discussion while presenting a clean, current-master review surface: the generic cluster bootstrap accepts neutral distribution-claim capability inputs, while emissions-specific synthetic and controlled-credit generation stays in flow-emissions-soak.

Summary

  • add optional Ethereum and Solana prelaunch bootstrap JSON inputs to cluster creation, resolve and persist their absolute paths as provenance, and keep older cluster configs loadable
  • validate and convert supplied indexer dumps before phase execution, including native addresses, consumed integer fields, net staker yield, decimal conversion and dust, per-address totals, and Antelope asset limits
  • build one generic cluster-owned bootstrap plan: configured data suppresses fallback only for the same chain, additive credits always merge, duplicate addresses are summed, rows are deterministically sorted and batched, and row IDs remain globally deterministic
  • initialize sysio.dclaim, execute one importseed step per batch, and call importdone exactly once when credits exist; ordinary no-input creation leaves the import window open, while an explicitly supplied zero-credit file fails early
  • add one-attempt, file-backed action submission and restart-safe reconciliation using owner-only payload journals, payload hashes, exact chain-state checks, block identity/LIB proof, and opaque pagination cursors
  • keep FlowScenario generic; flow-emissions-soak contributes deterministic per-chain fallback data and controlled additive credits through ClusterBuildOptions, then derives prefunding and claim expectations from the finalized merged result
  • add flow-with-bootstrap-data, committed Ethereum/Solana fixtures, exact on-chain verification, and literal -- argument forwarding through the canonical flow runner; include runner-script tests in the root test commands
  • align the branch-added flow with current master dependencies: @wireio/opp-typescript-models ^1.0.48 and @wireio/sdk-core ^1.0.88

Architecture

  • FlowScenario.ts changes only its documentation; its API and behavior remain generic
  • bootstrap preparation and execution live in neutral cluster orchestration and are driven by ClusterBuildOptions
  • scenario-specific corpus generation and assertions remain inside their flow packages

Safety and restart behavior

  • Zod validates persisted config, generic bootstrap inputs/outputs, Step inputs, and pending-journal records; malformed configured rows retain chain/file/row/field context
  • configured and merged credits enforce canonical addresses, positive amounts, safe batch sizes, and the Antelope asset maximum before phase composition
  • importseed uses a Step-owned single subprocess attempt; ambiguous outcomes are accepted only after exact state is observed and its block number and block id survive to irreversibility
  • each batch owns a compact owner-only pending journal bound to the exact payload SHA-256 and deterministic row range; exclusive creation prevents concurrent double submission
  • a pre-launch journal is deliberately unbounded and fail-closed after a crash; only a returned CLI error receives a conservative chain-time expiry, after which a retry reruns the complete counter/state preflight
  • paginated reconciliation treats next_key as an opaque cursor, checks the complete bounded ID window, and never puts bulk credit payloads in CLI arguments, Step metadata, or reports

Validation

  • exact head: a8644155
  • hygiene, dependency consistency, and workflow validation gates: passed
  • cluster-tool and complete repository builds: passed
  • complete cluster-tool Jest project: 139 suites / 1,460 tests passed
  • complete repository Jest run: 230 suites / 2,036 tests passed
  • git diff --check origin/master...HEAD: passed
  • independent correctness, architecture, and compliance reviews: clean for complete diff SHA-256 5e87523577b12bc5050f16c67570e5e0fd5121b3b8f1a8a539dbb2ba870e709f
  • current-head repository CI: passed
  • previous-head remote full-platform run: 13/15 flows passed, including flow-with-bootstrap-data; flow-swap-non-native-tokens and flow-swap-private-reserves timed out
  • exact-current-head full local and remote platform validation remains pending; the earlier local attempt was blocked by stale canonical wire-sysio artifacts

Jira: OPS-197

Change-Id: I3893e9cc8026ad7cdf574fc6cdf8e917cd7e6ef5
Change-Id: I31acf510362ea8e24c09d6ae531acaad7f87c73c
Change-Id: Id060bb94b2703b1b9c2a4fc1d55f273248131617
Change-Id: I562ff1ab5777e373655758263729de9a144957bd
Change-Id: Ic88cd60d2cd842517c7d0a36b6504554a57ddcf6
Change-Id: Ic58f8611e8e4af1cfdf563934985cfcb30165753
Change-Id: Ifc6b594277d707b1e3067e05c8831ff95f91462c
Change-Id: Ib340584720c1c03be7207b6e107f62d6d80f9a01
Change-Id: I446a2d569e18d02f645c48d592e318fde9b27c81
Change-Id: I5415090828148a0fee6eaad921238646c4fbb706
Change-Id: I5f2e4eef9a29be28bf9d5ebf4e5e448e4ba35957
Change-Id: Ibed3e061d6aa4fbe236a857e3805c3ee1a5b1008
Change-Id: I6bdaf0be993d85156c1d06cadc63368a3eb4588a
Change-Id: I537085f3acaeddb112b8de16dfef162354db0cec
Change-Id: I8f51e53461e6154c50e177654562ccd464575108
Change-Id: Ibde1864e59aa08bfe0cd6bc40511e1afb544d3b6
@huangminghuang
huangminghuang requested a review from heifner August 31, 2026 15:43
@huangminghuang
huangminghuang marked this pull request as ready for review August 31, 2026 17:23
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