Repository navigation
[WNS-15 follow-up] fix: cover two-candidate dispute slashing - #83
huangminghuang wants to merge 28 commits into
Conversation
Change-Id: I4e754b569c729378751a182f29eb1093387c9f80
…tform Change-Id: I8a1498a59d3f6d41b164ee7bc89ff8ab16def7c9
…ndidate-slashing-flow-platform Change-Id: I86ef108e0842924d5f3bae6133c39caf04acc846
Change-Id: Ia1741dcf76e25ca3a7ec6351fa3128fd8755a710
Change-Id: I4d999441a80dc1bfbe8d42eb34a07fa831150495
Change-Id: Ia3d11b250a3c69fcbfdf91ad177a409d9cbc0b6a
…ndidate-slashing-flow-platform # Conflicts: # packages/cluster-tool/package.json # packages/flow-batch-operator-slashing/package.json
…ndidate-slashing-flow-platform # Conflicts: # jest.config.ts # package.json # packages/cluster-tool-shared/package.json # packages/cluster-tool/package.json # packages/cluster-tool/src/flow/index.ts # packages/cluster-tool/src/orchestration/steps/contracts/sysio/OpregContractSteps.ts # packages/cluster-tool/tests/orchestration/steps/contracts/sysio/OpregContractSteps.test.ts # packages/debugging-client-shared/package.json # packages/debugging-client-tool-tui/package.json # packages/debugging-client-tool/package.json # packages/debugging-server/package.json # packages/flow-batch-operator-slashing/package.json # packages/flow-batch-operator-termination/package.json # packages/flow-emissions-soak/package.json # packages/flow-node-owner-nft/package.json # packages/flow-operator-collateral-deposit/package.json # packages/flow-producer-registration/package.json # packages/flow-reserve-lifecycle/package.json # packages/flow-swap-from-wire/package.json # packages/flow-swap-non-native-tokens/package.json # packages/flow-swap-private-reserves/package.json # packages/flow-swap-to-wire/package.json # packages/flow-swap-variance-revert/package.json # packages/flow-swap-with-underwriting/package.json # packages/flow-underwriter-slashing/package.json # packages/flow-yield-distribution/package.json # packages/test-app-server/package.json # tsconfig.json
| @@ -0,0 +1,11 @@ | |||
| import "source-map-support/register" | |||
|
|
|||
| import { BatchOperatorTerminalTieScenario, FlowCLI } from "@wireio/cluster-tool" | |||
There was a problem hiding this comment.
No scenario should be in the cluster-tool package
There was a problem hiding this comment.
Addressed in 1ef40742. The terminal-tie entry point now instantiates the concrete scenario owned by its flow package; cluster-tool no longer exports or owns that scenario.
There was a problem hiding this comment.
No scenario should be in the cluster-tool package
There was a problem hiding this comment.
Addressed in 1ef40742. BatchOperatorTerminalTieScenario was moved out of cluster-tool and is now owned by flow-batch-operator-terminal-tie; it imports the shared dispute base from the private @wireio/batch-operator-dispute-scenario support package.
There was a problem hiding this comment.
No scenario should be in the cluster-tool package
There was a problem hiding this comment.
Addressed in 1ef40742. BatchOperatorSlashingScenario was moved out of cluster-tool and is now owned by flow-batch-operator-slashing; it imports the shared dispute base from the private @wireio/batch-operator-dispute-scenario support package.
There was a problem hiding this comment.
No scenario should be in the cluster-tool package
There was a problem hiding this comment.
Addressed in 1ef40742. The dispute-specific constants were moved out of cluster-tool into the private @wireio/batch-operator-dispute-scenario support package and are no longer part of the cluster-tool surface.
| type OutpostInboundTips | ||
| } from "../InboundTipReader.js" | ||
| import { SlashingScenarioConstants as Constants } from "../SlashingScenarioConstants.js" | ||
| import { BatchOperatorDisputeConstants as Constants } from "../batchOperatorDisputeConstants.js" |
There was a problem hiding this comment.
No scenario should be in the cluster-tool package
There was a problem hiding this comment.
Addressed in 1ef40742. The dispute-specific scenario steps were moved out of cluster-tool into the private @wireio/batch-operator-dispute-scenario support package; cluster-tool retains only the generic typed contract-step primitives they use.
There was a problem hiding this comment.
No scenario should be in the cluster-tool package
There was a problem hiding this comment.
Addressed in 1ef40742. BatchOperatorDisputeScenario now lives in the private @wireio/batch-operator-dispute-scenario support package rather than cluster-tool. The current head keeps concrete scenarios in their flow packages and only generic flow utilities in cluster-tool.
…ndidate-slashing-flow-platform
…ndidate-slashing-flow-platform
There was a problem hiding this comment.
@huangminghuang you need to review these with your human eyes & claude OMC before asking for a reviewer; you have again violated package naming approach with batch-operator-dispute-scenario @heifner
|
This PR isn't needed for WIRE-362. The fix is Wire-Network/wire-sysio#581 (merged 2026-08-28), and
The new flow's dispute operators run no daemon, and the flow pushes every The one combination no single contract test covers is 3 configured seats, one terminated, then a 1–1 tie. It reduces to the 2-member case because the dispute check counts only ACTIVE members. If we want it pinned, it's one more case in Against that, this PR is +2,101/−663 lines across 43 files: a new private package, a restructure of the slashing flow, and another cluster bootstrap in every e2e run. |
Summary
flow-batch-operator-terminal-tie, which keeps three configured operator seats, terminates one scheduled operator, and proves that the two remaining eligible operators open and resolve a two-candidate dispute with one non-canonical slash.flow-batch-operator-slashingas the three-operator, three-candidate regression that produces two slashes.@wireio/batch-operator-dispute-sharedsupport package while each flow owns its concrete scenario; no scenario lives incluster-tooland no flow depends on another flow.chalg::votedispute,msgch::deliver, andopreg::processbatchplanning/runners, while retaining the generic envelope codec, inbound-tip reader, and single-flight cache incluster-tool.eth_address, constrains scenario participants to the provisioned operator roster, and rejects invalid or duplicate topology inputs during planning.master, including the repository-wide Immer11.2.8resolution, and documents the private dispute-support package boundary in the package inventory.Why
The dispute candidate threshold must come from the live eligible operator set, not the configured epoch group size. This flow keeps
operators_per_epochat three, administratively terminates one scheduled operator, and verifies that the resulting two live deliverers form the candidate set that opens the dispute.The two dispute flows share substantial orchestration but remain independent executables. A private support package provides that shared behavior without putting flow scenarios in the generic cluster library, creating flow-to-flow coupling, or executing a flow as an import side effect. The package is named
batch-operator-dispute-sharedto make that support-only boundary explicit; the rename did not alter its runtime source or tests.Validation
@wireio/batch-operator-dispute-sharedand both concrete flow unit suites passed: 21/21 tests.@wireio/cluster-tool-sharedpassed 22 suites / 249 tests, and@wireio/cluster-toolpassed 169 suites / 2,348 tests.git diff --checkpassed against mergedmasterd28e094dfa73b9fcad7b0dd1f65e4353ebb411cb.syndication-plugin-underwriting; only the standardflow-swap-epoch-stressexclusion was omitted. The verified stack used Toolsd4c26fa719b396291a522b2a901d2f0f95e5a68d, Sysio97731f20f26ab0c781cd8d77b884ac8f8f9efe8d, Ethereum0b5184cec04cb8268c5d95331cfc1fb922173eac, Solana73f69330a7eff416aa139e423c3124aee2b094e5, and coordinator3899d2cbd9c4655402874aa6e638bc3c01609187. The subsequent Tools commit only renames the private support package and its references; the moved runtime source and tests are byte-identical.