Skip to content

Error Codes

The firewall and registry layers use stable error codes for deterministic handling.

const result = firewall.checkTransaction(tx);
if (!result.ok) {
switch (result.code) {
case 8:
// Missing registry dep
break;
case 9:
// Invalid registry payload
break;
case 10:
// Registry payload order is wrong
break;
case 11:
// Blacklisted lock args
break;
case 12:
// Blacklisted type args
break;
case 17:
// More than one registry dep matched
break;
}
}
  • 5 InvalidArgsLayout
  • 6 UnsupportedVersion
  • 7 UnsupportedFlags
  • 8 MissingRegistryCellDep
  • 9 InvalidRegistryData
  • 10 RegistryNotSorted
  • 11 BlacklistedLockArgs
  • 12 BlacklistedTypeArgs
  • 13 MissingInnerLockCellDep
  • 14 InvalidInnerLockScript
  • 15 InnerLockRejected
  • 16 OutputScriptParseFailed
  • 17 AmbiguousRegistryCellDep

These codes are returned by governance-lock when a registry update transaction is rejected.

  • 1 InvalidArgs — contract args are not 1 byte (version)
  • 2 InvalidBlkl — registry cell data is not a valid BLKL v2 payload or governance header
  • 3 InvalidWitness — GOV1 payload is malformed (wrong magic, wrong version, wrong length, or zero hashes)
  • 4 SigVerificationFailed — a validator vote entry has an invalid secp256k1 signature, a mismatched recovered pubkey, or an invalid validator Merkle proof
  • 5 ThresholdNotMet — fewer than the required number of valid validator yes-votes
  • 6 ReviewWindowNotMet — the anchored PBLK proposal input’s since field does not encode a relative median-time-past delay of at least review_delay_ms
  • 20 InvalidTypeArgsLayout
  • 21 InvalidRegistryCellTopology
  • 22 InvalidRegistryPayload
  • 23 UnsupportedRegistryVersion
  • 24 InvalidGovernanceWitness
  • 25 UnauthorizedGovernanceLock
  • 27 InvalidTypeId
  • 28 InvalidProposalCell — the PBLK proposal cell data is malformed or does not match the registry transition

These codes are returned by the proposal-anchor type script, which validates PBLK cells during anchor creation, execution, and reclaim.

  • 31 InvalidTypeArgs — proposal-anchor type args are malformed
  • 32 InvalidTopology — transaction input/output structure is invalid for a proposal-anchor operation
  • 33 InvalidProposalDataPBLK cell data is malformed or has an unsupported version
  • 34 UnauthorizedTreasuryLock — the input spending the anchor is not locked by the registry treasury lock
  • 35 InvalidReclaimReturn — reclaim output does not return full capacity to the treasury lock
  • 36 InvalidReclaimSince — the anchor input’s since field does not encode a valid relative timestamp delay for reclaim

The TypeScript SDK currently exposes the subset of codes relevant to pre-flight validation:

  • 8
  • 9
  • 10
  • 11
  • 12
  • 17

These codes are stable identifiers shared by the on-chain scripts, the SDKs, and the CLI.

Code(s)Fix
8 MissingRegistryCellDepFix: MissingRegistryCellDep
9 InvalidRegistryData, 10 RegistryNotSortedFix: stale registry cell
17 AmbiguousRegistryCellDepFix: AmbiguousRegistryCellDep
11 BlacklistedLockArgs, 12 BlacklistedTypeArgsPre-flight caught a blacklisted output. Block the transfer.
Pre-flight passes but on-chain failsFix: pre-flight passes, on-chain fails
All codes — symptom not clearTroubleshooting index