Plugin: derive operator daemon enablement from the configured account - #578
Conversation
batch_operator_plugin and underwriter_plugin each carried an enable flag alongside the account name, so running either daemon took three settings: the plugin listed under `plugin =`, the enable flag, and the account. Setting the account but forgetting the flag left the node booting clean, logging one info line, and doing nothing — indistinguishable from a healthy node until the elected group missed an epoch. Both flags are removed. Enablement now derives from the account being configured, the way producer_plugin keys off producer-name. Keying off the account rather than the plugin being listed matters for batch_operator_plugin because external_debugging_plugin declares it as a dependency; plugin presence alone would silently promote a debug node to a batch operator. The skip-startup log lines name the missing option instead of saying "disabled", and both option-surface tests assert the removed spellings stay gone. The batch README's option table was stale independently of this change — it documented a batch-outpost-poll-ms option that does not exist and defaults that no longer match the code — and is corrected here.
huangminghuang
left a comment
There was a problem hiding this comment.
Blocking compatibility issue: this PR removes --batch-enabled and --underwriter-enabled, but the canonical cluster tool still emits both for every operator daemon in packages/cluster-tool/src/tools/wire/OperatorDaemonTool.ts (batchOperatorArgs and underwriterArgs). Because nodeop rejects unknown options, cluster-tool-managed batch operators and underwriters will fail to start after this merges. Please land the matching cluster-tool change (and its test updates) before or alongside this PR, or retain backward compatibility until then.
|
Confirmed, and the matching cluster-tool change is up: Wire-Network/wire-tools-ts#77. It drops It also covers a second wave of the same problem, since the whole set has to land together: #579 moves each outpost's remote contract addresses onto its Order is forced by
I did not add a backward-compatibility window. Accepting-and-ignoring a removed flag would leave |
huangminghuang
left a comment
There was a problem hiding this comment.
Approved. The cluster-tool compatibility change is landing with this PR.
|
@jglanz — on why the daemons need a WIRE account and not just the signature provider. Short answer: a key is a credential, the account is the identity, and signing is only a small part of what the account is used for. The provider ( Here is every place each daemon actually uses it. Batch operator
Underwriter
The short of itSigning is one row in each table. Everything else is either identity written INTO on-chain data — The collateral path is the clearest case that a key would not help: available balance is three separate account-keyed reads across two contracts, and the result decides whether the underwriter can cover a request at all. There is also a practical reason not to make the key the identity: keys rotate, and the account is what holds the bond, the group slot and the slashing history. If identity were the key, a key rotation would make you a different operator. Where the instinct is rightConfiguring an account and a key that must agree, with nothing checking they agree, is a poor deployment story — today a mismatch starts cleanly and then fails every delivery on chain forever. The underwriter already guards this ( |
Running a batch operator or an underwriter took three settings that all had to agree: the plugin listed under
plugin =, an enable flag, and the account name. The flag is redundant with the other two and fails badly when it disagrees with them — an operator who sets the account but not the flag gets a node that boots clean, logs one info line, and relays nothing, which looks healthy to a supervisor until the elected group misses an epoch.batch-enabledandunderwriter-enabledare removed. Each daemon now runs when its account is configured, matching how producer_plugin keys off producer-name. For batch_operator_plugin the account rather than plugin presence is the trigger because external_debugging_plugin declares the plugin as a dependency, and keying off presence would silently promote a debug node to an operator.BREAKING: appbase rejects unknown options in config.ini and on the command line, so a node still setting either flag will refuse to start. The cluster-tool passes both and needs the matching change.
Also corrects the batch_operator README's option table, which documented a
batch-outpost-poll-msoption that does not exist and defaults that no longer match the code.Cross-repo
Lands as a set — nodeop rejects unknown options, so cluster-managed operators stay down until the cluster-tool change lands too.
sysio.chains(same operator plugins)SysioContractTypes(needed by Opp: source outpost identity from sysio.chains instead of operator config #579's contract change)Merge order: this and #579, then the sdk-core publish, then wire-tools-ts#77.