[Low] sys.minter.keys accepts a public key where an account address is required (silent mint lockout)
Report
Summary
isMinter (core/mint.go:12) compares the minting block's Account against the entries of sys.minter.keys verbatim (strings.EqualFold). The documentation (docs/api.md:764) states that sys.minter.keys holds account addresses, matched against the block's account — unlike sys.timekeepers / sys.oracle / sys.dao_keyset, which hold verifying keys matched against signatures. But the field is named keys, the statechain config validation calls each entry minter key[i], and every sibling keyset holds raw verifying keys — so an operator following the naming will configure the minter's public key instead of its derived address. Config validation only checks that each entry is 64 hex characters, so a public-key entry is silently accepted; every later mint then fails with "not an authorized minter", including mints from the legitimate minter, with no error at config time. A public key and an account address are both 64 hex characters, so the two spellings cannot be told apart by inspection.
Impact
A single operator mistake at config time silently disables all XUSD minting: the legitimate minter's mint blocks are rejected ("not an authorized minter") and there is no error, warning, or health signal at config load to reveal the misconfiguration. XUSD is the only mintable asset and the only way new XUSD enters the system, so a misconfigured sys.minter blocks the mint supply path entirely until the config is corrected.
Severity is Low, not higher: this is a latent misconfiguration trap, and the live network is configured correctly — the testnet-0005 minter account is 8bc63438d2e9e59ef229865abb73520955da9f3c43b41ff50298884f78ab970d, and its opening mint block (hash 14c2b2584172..., 100 XUSD) is FINALIZED, with 12 finalized mint/send blocks on that account. There is no live impact; the defect only bites the next operator who configures a minter by following the field name.
Root cause (repo github.com/xeprotocol/xe, commit 89a542ea51d38375299aee54c6c99102e9bfa666, "release: testnet-0005 quorum withhold fix")
core/mint.go:12 — isMinter matches the entry verbatim, with no fallback to the derived address:
func (l *Ledger) isMinter(account string) bool {
...
for _, k := range cfg.Keys {
if strings.EqualFold(k, account) {
return true
}
}
return false
}
And the rejection is produced in validateAndAddMint (core/mint.go):
if !l.isMinter(b.Account) {
return fmt.Errorf("mint: account %s is not an authorized minter", shortAddr(b.Account))
}
Three things combine to create the trap:
- The config field is
MinterConfig.Keys(core/mint.go,Keys []stringjson:"keys"``) — the name says "keys", and every other keyset in the same config family (sys.oracle,sys.timekeepers,sys.dao_keyset) holds verifying keys. - Statechain config validation (
statechain/kvstore.go:126-132) only checks the shape of each entry — 64 hex characters, unique — while calling itminter key[i]:
return fmt.Errorf("minter key[%d] invalid length: got %d, want 64 hex chars", i, len(k))
return fmt.Errorf("minter key[%d] invalid hex: %w", i, err)
return fmt.Errorf("minter key[%d] is a duplicate", i)
- The one place that states the real semantics is a single sentence in
docs/api.md:764: "sys.minter.keysholds account addresses, matched against the block'saccount(unlikesys.timekeepers/sys.oracle/sys.dao_keyset, which hold verifying keys matched against signatures)". An account address issha256("xe/account/v1" || pubkey)— also 64 hex — so nothing distinguishes a wrong (pubkey) entry from a right (address) entry at config time.
Reproduction
PoC tests (assert the trap; they fail once isMinter accepts both spellings or the config rejects pubkeys):
core/xe02_mint_config_test.go—TestXE02MintWorksWithAddressConfig: mint accepted whensys.minterholds the minter's derived address (XUSD balance after mint = 1,000,000).TestXE02MintFailsWithPubkeyConfig: the same mint, signed by the same key, rejected with "not an authorized minter" whensys.minterholds the minter's public key instead.
Run:
git clone https://github.com/xeprotocol/xe && cd xe
# add the PoC test file above, then:
go test ./core/ -run XE02 -v # 2/2 PASS (trap reproduced)
Live cross-check (testnet-0005, 2026-11-11): the minter account 8bc63438d2e9... declares pubkey 200048d329da... on its opening mint block, and that pubkey's derived address IS 8bc63438d2e9... — i.e. the live sys.minter entry is the derived address, which is why minting works there. This confirms the trap is latent, not live.
Suggested fix
- Make
isMinteraccept both spellings: an entry matches ifentry == accountORDeriveAddress(entry) == account. - And/or rename/document the field as addresses (e.g.
sys.minter.addresses, or a doc note on the field) and validate at config load that each entry equals the derived address of some known key — or at least warn when an entry looks like a raw public key rather than a derived address. - The live network needs no change (it is already configured with the address spelling).
Environment
- Codebase:
github.com/xeprotocol/xe@89a542e(2026-11-10) - Go 1.25.0,
go testas above, local reproduction only (live testnet used only for read-only cross-checks)
XE payout address: e3d3e4407fec5a846201c7ed8560484ffb881cc30068745a110dd8efb824500c
Thread
Thanks. This is the same finding as https://bounty.xe.network/XE-0360, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-13362 and says what differs; it is read like any other.