feat: create batch-operator/underwriter accounts via the node owner (roa::newuser)#37
feat: create batch-operator/underwriter accounts via the node owner (roa::newuser)#37heifner wants to merge 5 commits into
Conversation
Re-verified every value and action against ClusterBuildDefaults + Constants (and wire-sysio master for contract-side claims); the doc had drifted: - epoch_duration_sec 360 -> 90; epoch_retention_envelope_log_count 128 -> 10 - uwrit setconfig rewritten to the current 4-field ABI (fee_bps 30, min_fromwire_amount, fromwire_revert_fee_bps; fee_split_* fields removed) - stablecoin token rows register precision 6; reserves carry source_token_precision with the /1000 stablecoin chain seed - dropped actions that no longer exist: sysio::init, the authex/sysio-active authority rewrites, and the cross-contract @sysio.code active delegations (the nine OPP owner grants are the only authority rewrites) - producers are keyed by their node's generated K1, operators by their own generated K1 (DEV_K1 remains genesis + sysio active + wireno only); no addpolicy during bootstrap - stages renumbered to follow ClusterBuildDefaults.compose execution order (config before node owner; outposts -> registry -> uwrit; links before regoperator); PREACTIVATE explained via the genesis intrinsic whitelist - port scheme rewritten (10500-11999 band, bios 10788/10776, dynamic pairs for producer/operator nodes); underwriter daemons load 5 plugins; 100-SOL batch-operator airdrop; giftram rejects (not skips) non-finite targets - flagged target design at Stage 12: operator accounts to be created by a node owner (pending harness/flow update) Change-Id: If2482c66e5d2f3720a6da523ed5cc25a1309b5af
…roa::newuser) Operator accounts are now node-owner-created, mirroring the production sponsorship path: provisioning invokes sysio.roa::newuser as the bootstrap node owner (wireno) with the operator's deterministic LABEL as the sponsor nonce, and adopts the chain-generated wireno.<suffix> account name from the sponsors table (re-entrant; tolerates the never-written-KV-table read on a fresh chain). - OperatorAccount gains `label` (the deterministic handle = newuser nonce; producers keep label == account); ClusterKeyStore keys operators by label and sorts operatorsByType for parallel-provisioning determinism - WireOperatorProvisioningTool: planSponsoredAccountCreation replaces the sysio-newaccount step for OPP operators; regoperator moves to a run-time planRegistration (the generated account is unknown at plan time); authex links carry the resolved chain account - Full label rename sweep (no half-renames): Constants.batchOperatorLabel/ underwriterLabel, NodeConfig.batchOperatorLabel/underwriterLabel, ClusterState + PidSources, operatorLabel params on the ETH/SOL collateral + funding tools, WireUnderwriterTool.underwriterLabels, OperatorDaemonTool (also fixes a label/account divergence between its idempotency check and the daemon NodeConfig name) - config.ini no longer renders batch-operator-account/underwriter-account: the generated account rides the daemon CLI args resolved from the key store at start - All 8 operator-referencing flows resolve chain accounts from the key store at run time (opreg rows, epochstate group membership, dispute candidates, crank auth actors) - docs/production-bootstrap.md Stage 12 updated to the newuser path Verified: flow-operator-collateral-deposit end-to-end (operators provisioned as wireno.aasrg/dyukh/jjmui/v1ilz + depositor wireno.zngjk; bonds, ACTIVE flip, withdraw, WITHDRAW_REMIT all green), cluster-tool unit suites + all other package suites green, lint clean. Change-Id: I91af84f790d2786853cc600197d43784f750a49d
jglanz
left a comment
There was a problem hiding this comment.
This is a massive change affecting enumerable flows and requires real discussion before hand
…-sysio #529 pins batch_op_groups) wire-sysio #529 (SEC-28) makes sysio.epoch::setconfig reject any batch_op_groups change once the rotation schedule is materialized. The flow's one-group-of-three reshape (bootstrap 3 groups -> 1) now trips the guard — first hit on the gate's first post-merge master run. Bootstrap with BootstrapBatchOperatorCount = 1 so the derived epoch config materializes exactly the DisputeBatchOperatorGroupCount (= 1) group from the start; the reshape then only raises operators_per_epoch / the active minimum, which the guard (an equality check on the group count) permits. Verified: flow-batch-operator-slashing green end-to-end locally against wire-sysio master contracts (dispute opened, canonical vote, non-canonical deliverers slashed, 146 report steps ok). Change-Id: I4787e3cd5861c1d37e3f21981ec91629045db6c5
|
Gate run 29871325332 ( The one failure — Fixed in 8f00ead: the flow bootstraps with Side observation while diagnosing (pre-existing, not addressed here): |
|
Gate re-run 29876862714 with 8f00ead: all 13 flows green ✅ — including batch-operator-slashing (340s) against post-#529 wire-sysio master. Ready for review. |
Per review on #35: the literal dev key strings (K1 public/WIF, BLS public/PoP) are replaced with the deterministic derivation — K1.regenerate(SHA256("nathan")) / BLS.regenerate(SHA256("wire")) — so no key material is spelled out in the doc. Change-Id: I14f5b861e951a3113bfed1e3730f3a07e804e2dd
…o-code Change-Id: I20b0db12531e84549115fba4fef4628409b287e1
Summary
Batch-operator and underwriter accounts are now created by the node owner instead of directly by
sysio, mirroring the production sponsorship path: provisioning callssysio.roa::newuseraswirenowith the operator's deterministic label (batchop.a,uwrit.a, a flow'sdepositor) as the sponsor nonce, and adopts the chain-generatedwireno.<suffix>account name from thesponsorstable. Producers are unchanged (their accounts staydefproducer*, keyed by their node's K1).Design
OperatorAccountgainslabel— the deterministic handle the harness keys everything by (ClusterKeyStoreis label-keyed; node↔operator association, daemon node names/dirs, flow constants are all labels).accountis the chain-generated name, written back by the sponsored-creation step and resolved from the key store at RUN time everywhere it matters (regoperator data, authex links, daemon--batch-operator-account/--underwriter-accountargs, opreg-row andbatch_op_groupscomparisons, dispute candidates, crank auth actors).WireOperatorProvisioningTool:planSponsoredAccountCreation(onenewuserwrite as[wireno@active]; re-entrant — adopts an existing sponsor row; tolerates the never-written-KV-table read on a fresh chain) andplanRegistration(regoperator with the run-time-resolved account, replacing the plan-timeOperatorSteps.planRegisterusage).Constants.batchOperatorLabel/underwriterLabel,NodeConfig.batchOperatorLabel/underwriterLabel,ClusterState+PidSources,operatorLabelparams on the ETH/SOL collateral + funding tools,WireUnderwriterTool.underwriterLabels,OperatorDaemonTool(which also had a latent label/account divergence between its idempotency check and the daemon'sNodeConfigname — fixed).config.inino longer renders the operator-account lines — the generated account rides the daemon CLI args resolved from the key store at start.docs/production-bootstrap.mdStage 12 documents the new path (stacked on docs: sync production-bootstrap.md with the current master bootstrap #35).Verification
flow-operator-collateral-depositend-to-end green — operators provisioned aswireno.aasrg/wireno.dyukh/wireno.jjmui(batch) +wireno.v1ilz(underwriter) +wireno.zngjk(flow depositor); authex links,regoperator, daemon relay, epochs advancing 4/4 OPP directions, ETH bond → depot credit → SOL bond → ACTIVE → withdraw →flushwtdw→WITHDRAW_REMIT→ outpost escrow decrement, all steps SUCCESS.ClusterKeyStore; all touched suites green, all other package suites green (the pre-existing host-baseline jest failures were confirmed identical on a stashed clean checkout).Notes
docs/production-bootstrap-refresh) — the doc commit here is the same SHA; this PR collapses to one commit once docs: sync production-bootstrap.md with the current master bootstrap #35 merges.BRANCH_WIRE_TOOLS_TS=feat/node-owner-operator-accountsfollows this PR.