Protocol Specification v0.6
Field Tables
The family (opens in a new tab) and opcode select one exact layout. An operation stores ordered 64-bit words, ordered byte strings and, where permitted, an appeal deadline (opens in a new tab). Names in this view explain positions; field names are not transmitted as part of an operand.
The view below is taken from the repository's machine-readable operation table. Its layout and decoder checks are described in Wire Format. Product acceptance still requires the authentication and authority checks in Validation.
Every table on this page is generated from one file, spec/operations.json, by scripts/render-operations.py. The script expands each field of an operation entry into rows: a group use becomes the fields of that group, and an optional field becomes a presence row followed by its own fields.
def expand(self, fields, where, prefix="", condition=None, groups=()): rows = [] for field in fields: kind = field["kind"] if kind == "use": group = field["group"] if group not in self.data["groups"]: fail(f"{where}: unknown group {group!r}") if group in groups: fail(f"{where}: group {group!r} uses itself") rows += self.expand(self.data["groups"][group]["fields"], where, prefix, condition, groups + (group,)) continue path = prefix + field["name"] note = field.get("description", "") once = "1" if condition is None else f"1 if `{condition}` is 1" many = "N" if condition is None else f"N if `{condition}` is 1" if kind == "word": text = " ".join(part for part in [note, self.accepted(field, where) if field["type"] == "code" else ""] if part) rows.append(dict(path=path, count=once, type=self.word_type(field, where), text=text, word=field)) elif kind == "optional": rows.append(dict(path=path, count=once, type="presence", text=" ".join(part for part in ["0 absent, 1 present.", note] if part))) rows += self.expand(field["fields"], where, path + ".", path, groups) elif kind == "counted_set": item = field["item"] accepted = self.accepted(item, where) if item["type"] == "code" else "" rows.append(dict(path=path, count=once, type="count", text=" ".join(part for part in ["Number of items N.", note] if part))) rows.append(dict(path=path + "[]", count=many, type=self.word_type(item, where), text=" ".join(part for part in ["Strictly ascending.", accepted] if part))) elif kind == "counted_pairs": first, second = field["first"], field["second"] rows.append(dict(path=path, count=once, type="count", text=" ".join( part for part in [f"Number of entries N. Each entry is `{first['name']}` then " f"`{second['name']}`.", note] if part))) for member, text in [(first, "Strictly ascending."), (second, "")]: accepted = self.accepted(member, where) if member["type"] == "code" else "" rows.append(dict(path=f"{path}[].{member['name']}", count=many, type=self.word_type(member, where), text=" ".join(part for part in [text, accepted] if part))) elif kind == "tagged": values = self.enum(field["enum"]) codes = [case["code"] for case in field["cases"]] if sorted(codes) != codes or set(codes) != set(values): fail(f"{where}: cases of {path} must list every {field['enum']} code in order") cases = [(case["code"], values[case["code"]], self.expand(case["fields"], where, path + ".", condition, groups)) for case in field["cases"]] rows.append(dict(path=path, count=once, type=f"`{field['enum']}` code", cases=cases, text=" ".join(part for part in [ "Selects a case; the words of that case end the layout.", note] if part))) else: fail(f"{where}: unknown field kind {kind!r}") return rowsOperand layout
The family and opcode select one layout; the wire carries only values, and the layout names each position.
- 1
Family picks the body
Core field 12,
family, is 1, so the operation travels in body field 16,state_sync. The body tag is 15 plus the family. - 2
One layout
Family 1 with opcode 1 selects Debit, one entry of
spec/operations.json. An opcode outside 1 to 6 in this family isINVALID_FORMAT. - 3
Shared prefix
The words in order 1 to 11 are the
call_prefixgroup, frommessage_referencetorecipient, which starts every ordinary, legal and spend call. - 4
Presence word
credentialmust be 0 or 1, and its six words follow only after a 1. Any other value isINVALID_FORMAT. - 5
Counted pairs
versionsgives the pair count N. N pairs ofassetandversionfollow, withassetstrictly ascending. - 6
Nothing else
The words end at
generationand the blobs atamount. A missing or extra word or blob, or any deadline, isINVALID_FORMAT.
- Selects the layout
- Present only after a presence word of 1
- Must be absent in Debit
Schematic: only the Core fields that select the layout are drawn. In the Debit layout, order numbers are the Order column of its tables; the other numbers are wire tags.
Positional operand layout of every OIP (opens in a new tab) v0.6 operation. The Core family and the operation opcode select exactly one layout of ordered words, ordered blobs and a deadline mode. Field names document the layout and never appear on the wire.
The table is operations.json (opens in a new tab) and its format is operations.schema.json (opens in a new tab). This name view is generated from the table by python scripts/render-operations.py; edit the table, not this file. The specification name of an operation is its name in the family table of wire-conformance.md (opens in a new tab).
Layout rules#
NormativeBytes, test vectors and proofs
- The family and the opcode select exactly one layout. A decoder MUST reject an opcode outside 1 through the operation count of its family with INVALID_FORMAT.
- Words are read in table order and a layout MUST consume every word. A missing word or a trailing word is INVALID_FORMAT.
- An optional field starts with a presence word that MUST be 0 or 1. Its fields follow only when the presence word is 1.
- A counted set starts with a count word followed by that many items in strictly ascending order, so it has no duplicates.
- A counted pair list starts with a count word followed by that many pairs whose first members are strictly ascending.
- A tagged field is the last field of its layout. Its tag word selects one case, and that case fixes the exact number of remaining words.
- Blobs are matched by position and the blob count MUST equal the layout's blob count.
- An enumerated word MUST hold an accepted code. A word whose accepted codes are any takes every value; the enum only names the known codes.
- A decoder runs with a nesting limit, the number of Core levels it may decode counting the outer Core. A canonical_core blob is decoded with that limit reduced by one, and a decoder MUST reject a Core it reaches with a limit of zero with INVALID_FORMAT.
- A layout fault is INVALID_FORMAT. A failed check returns the error listed with that check. A nested canonical Core returns the error of its own decode.
- A v0.6 decoder MUST reject an Operation field that operation_record does not list with INVALID_FORMAT.
Both reference decoders read the words through one cursor that applies the word rules above. A presence word above 1, a set that is not strictly ascending and a word left over at the end all fail with INVALID_FORMAT.
struct Words<'a>(&'a [u64]);impl Words<'_> { fn word(&mut self) -> Result<u64> { let (word, remaining) = self.0.split_first().ok_or(BAD)?; self.0 = remaining; Ok(*word) } fn size(&mut self) -> Result<usize> { usize::try_from(self.word()?).map_err(|_| BAD) } fn origin(&mut self) -> Result<OriginKey> { Ok(OriginKey { domain: self.word()?, event: self.word()?, }) } fn present(&mut self) -> Result<bool> { match self.word()? { 0 => Ok(false), 1 => Ok(true), _ => Err(BAD), } } fn optional_origin(&mut self) -> Result<Option<OriginKey>> { if self.present()? { Ok(Some(self.origin()?)) } else { Ok(None) } } fn optional_word(&mut self) -> Result<Option<u64>> { if self.present()? { Ok(Some(self.word()?)) } else { Ok(None) } } fn take(&mut self, count: usize) -> Result<&[u64]> { let (items, remaining) = self.0.split_at_checked(count).ok_or(BAD)?; self.0 = remaining; Ok(items) } fn set(&mut self) -> Result<BTreeSet<u64>> { let count = self.size()?; let items = self.take(count)?; if items.windows(2).any(|pair| pair[0] >= pair[1]) { return Err(BAD); } Ok(items.iter().copied().collect()) } fn end(&self) -> Result<()> { if self.0.is_empty() { Ok(()) } else { Err(BAD) } }}type words struct{ items []uint64 }func (w *words) word() (uint64, error) { if len(w.items) == 0 { return 0, ErrFormat } value := w.items[0] w.items = w.items[1:] return value, nil}func (w *words) read(targets ...*uint64) error { for _, target := range targets { value, err := w.word() if err != nil { return err } *target = value } return nil}func (w *words) take(count uint64) ([]uint64, error) { if count > uint64(len(w.items)) { return nil, ErrFormat } result := w.items[:count] w.items = w.items[count:] return result, nil}func (w *words) present() (bool, error) { value, err := w.word() if err != nil || value > 1 { return false, ErrFormat } return value == 1, nil}func (w *words) set() error { count, err := w.word() if err != nil { return err } values, err := w.take(count) if err != nil || !strictlySorted(values) { return ErrFormat } return nil}func (w *words) optional(count uint64) error { present, err := w.present() if err == nil && present { _, err = w.take(count) } return err}func (w *words) end() error { if len(w.items) != 0 { return ErrFormat } return nil}The Go decoders read counted sets and optional fields through valueSet and valueOptional, which apply the same cursor checks and also return the typed value. The legal order decoder of family 2 calls both.
func (w *words) valueSet() ([]uint64,error) { count,err:=w.word();if err!=nil {return nil,err} values,err:=w.take(count);if err!=nil || !strictlySorted(values) {return nil,ErrFormat} return values,nil}func (w *words) valueOptional(count uint64) ([]uint64,error) { present,err:=w.present();if err!=nil {return nil,err};if !present {return valueNone(),nil} values,err:=w.take(count);if err!=nil {return nil,err} switch count {case 1:return valueSome(valueScalar(values[0])),nil;case 2:return valueSome(valuePair(values[0],values[1])),nil;default:panic("unsupported semantic optional field")}}Operation record#
NormativeBytes, test vectors and proofs
Fields appear in ascending tag order: the opcode, then every word, then every blob, then at most one appeal deadline alternative.
| Tag | Field | Wire type | Label | Description |
|---|---|---|---|---|
| 1 | opcode | varint | required | Operation number within the family. |
| 2 | words | fixed64 | repeated | Ordered 64-bit operand words, one unpacked field per word. |
| 3 | blobs | length_delimited | repeated | Ordered byte-string operands. |
| 4 | appeal_deadline_indefinite | varint | oneof appeal_deadline | Indefinite appeal deadline. The only valid value is 1 (true). |
| 5 | appeal_deadline_utc_seconds | fixed64 | oneof appeal_deadline | Finite appeal deadline in UTC seconds. |
The schema's Operation message declares these five fields, and its comment names spec/operations.json as the table that gives each position its meaning.
// An operation carries positional operands. The family of the enclosing body// member and the opcode fix the meaning and order of every entry in words and// blobs. The field-meaning table spec/operations.json lists, for each family// and opcode, the positions, enumerations and whether the reference// configuration accepts the operation.message Operation { optional uint64 opcode = 1; repeated fixed64 words = 2 [packed = false]; repeated bytes blobs = 3; // The appeal deadline of a regulatory action (family 2). Operations of // other families reject both members. In this version an absent member and // appeal_deadline_indefinite both mean that no appeal deadline applies. oneof appeal_deadline { // Only the value true is canonical. bool appeal_deadline_indefinite = 4; // Unix time in UTC seconds. fixed64 appeal_deadline_utc_seconds = 5; }}Deadline modes#
NormativeBytes, test vectors and proofs
| Mode | Meaning |
|---|---|
absent | Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. |
appeal | Absent, indefinite or finite. The finite form is the appeal deadline in UTC seconds. In this version the product treats absent and indefinite alike as no appeal deadline. |
Operations#
NormativeBytes, test vectors and proofs
31 operations. Families 1 through 7 have 6, 3, 8, 8, 2, 2, 2 operations in opcode order.
| Family | Opcode | Operation | Specification name | Reference accepts | Call | Blobs | Deadline |
|---|---|---|---|---|---|---|---|
| 1 STATE_SYNC | 1 | Debit | debit | yes | yes | 1 | absent |
| 1 STATE_SYNC | 2 | RecordTerminal | record terminal evidence | yes | yes | 2 | absent |
| 1 STATE_SYNC | 3 | DeliverCredit | deliver credit | yes | yes | 1 | absent |
| 1 STATE_SYNC | 4 | Refund | refund | yes | yes | 2 | absent |
| 1 STATE_SYNC | 5 | PublishPrimary | publish primary | yes | yes | 1 | absent |
| 1 STATE_SYNC | 6 | OrdinarySpend | ordinary spend | yes | yes | 2 | absent |
| 2 REGULATORY_ACTION | 1 | EmitLegalOrder | emit legal order | yes | yes | 2 | appeal |
| 2 REGULATORY_ACTION | 2 | CommitLegalOrder | commit legal order | yes | yes | 2 | appeal |
| 2 REGULATORY_ACTION | 3 | EnforcementSpend | enforcement spend | yes | yes | 3 | appeal |
| 3 LOCK_MANAGEMENT | 1 | Reserve | reserve | yes | yes | 1 | absent |
| 3 LOCK_MANAGEMENT | 2 | Dispatch | dispatch | yes | yes | 1 | absent |
| 3 LOCK_MANAGEMENT | 3 | Cancel | cancel | yes | yes | 2 | absent |
| 3 LOCK_MANAGEMENT | 4 | Fence | fence | yes | yes | 2 | absent |
| 3 LOCK_MANAGEMENT | 5 | Preempt | preempt | yes | yes | 2 | absent |
| 3 LOCK_MANAGEMENT | 6 | Reconcile | reconcile | yes | yes | 2 | absent |
| 3 LOCK_MANAGEMENT | 7 | Write | write | no | yes | 1 | absent |
| 3 LOCK_MANAGEMENT | 8 | Timeout | timeout | no | yes | 1 | absent |
| 4 QUERY | 1 | CurrentRead | current | yes | no | 0 | absent |
| 4 QUERY | 2 | HistoricalRead | historical | yes | no | 0 | absent |
| 4 QUERY | 3 | RawRead | raw | yes | no | 0 | absent |
| 4 QUERY | 4 | OperationStatus | operation status | yes | no | 0 | absent |
| 4 QUERY | 5 | Journal | journal | yes | no | 0 | absent |
| 4 QUERY | 6 | CaptureCache | capture cache | yes | no | 0 | absent |
| 4 QUERY | 7 | OwnerRead | owner | yes | no | 0 | absent |
| 4 QUERY | 8 | ExactReceipt | exact receipt | yes | no | 1 | absent |
| 5 ACK | 1 | SettlementAcknowledgement | exact settlement acknowledgement | yes | no | 1 | absent |
| 5 ACK | 2 | CorrelatedResponse | correlated response | no | no | 1 | absent |
| 6 HEARTBEAT | 1 | Capabilities | capabilities | no | no | 0 | absent |
| 6 HEARTBEAT | 2 | Liveness | liveness | no | no | 0 | absent |
| 7 GOVERNANCE | 1 | OwnerHandover | owner handover | yes | no | 3 | absent |
| 7 GOVERNANCE | 2 | InstallEpoch | authorized epoch installation | no | no | 3 | absent |
Reference configuration#
NormativeBytes, test vectors and proofs
The Ed25519 (opens in a new tab) reference configuration accepts only the operations whose reference_accepts value is true. It refuses every other operation with UNSUPPORTED_VERSION before admission (opens in a new tab), because that operation is outside the selected version profile, which is the version together with its accepted operation set.
Accepted: 25 of 31 operations. Refused with UNSUPPORTED_VERSION: Write, Timeout, CorrelatedResponse, Capabilities, Liveness, InstallEpoch.
Both reference implementations write the accepted set as opcode ranges per family, and every other family or opcode returns false. Rust checks the configured operation set in the authority entry paths, including response generation and exact Debit resolution. The generic Rust transport decoder has no configuration-specific operation set. Go exposes the configured check through ReceiveAccepting; its generic Receive path does not select that set. Where the check runs, a false answer refuses the frame with UNSUPPORTED_VERSION.
fn supported_frame(core: &Core) -> bool { match core.body.as_ref() { Some(Body::StateSync(op)) => matches!(op.opcode, Some(1..=6)), Some(Body::RegulatoryAction(op)) => matches!(op.opcode, Some(1..=3)), Some(Body::Ack(op)) => op.opcode == Some(1), Some(Body::Query(op)) => matches!(op.opcode, Some(1..=8)), Some(Body::LockManagement(op)) => matches!(op.opcode, Some(1..=6)), Some(Body::Governance(op)) => op.opcode == Some(1), _ => false, }}// ReferenceAccepts reports whether the reference configuration executes the// operation of a decoded Core. It accepts 25 of the 31 operations of version// 6 and refuses Write, Timeout, CorrelatedResponse, Capabilities, Liveness// and InstallEpoch.func ReferenceAccepts(core *wirepb.Core) bool { family, op := Body(core) opcode := op.GetOpcode() switch family { case 1, 3: return opcode >= 1 && opcode <= 6 case 2: return opcode >= 1 && opcode <= 3 case 4: return opcode >= 1 && opcode <= 8 case 5, 7: return opcode == 1 default: return false }}Responses#
NormativeBytes, test vectors and proofs
A call carries a caller-qualified call identifier (opens in a new tab): the Core principal with the call_sequence word. Only calls have a correlated response.
Every delivery and refusal code applies to every call. The recorded codes of each call are listed with the operation.
Family 1 STATE_SYNC#
NormativeBytes, test vectors and proofs
Core body field state_sync (tag 16). 6 operations.
Each operation is one entry of the operations array in spec/operations.json, and the tables under its heading expand that entry. Debit, opcode 1, starts with the shared groups call_prefix, credential and version_vector and adds one generation word.
{ "family": 1, "opcode": 1, "name": "Debit", "title": "debit", "summary": "Source debit for the bound transfer.", "reference_accepts": true, "words": [ {"kind": "use", "group": "call_prefix"}, {"kind": "use", "group": "credential"}, {"kind": "use", "group": "version_vector"}, {"kind": "word", "name": "generation", "type": "generation"} ], "blobs": [ {"name": "amount", "type": "amount_u256"} ], "deadline": "absent", "target_domain": "origin_domain", "call": true, "recorded_codes": [1, 2, 3, 4, 12]},Debit#
Family 1 STATE_SYNC (opens in a new tab), opcode 1, specification name "debit". Source debit for the bound transfer.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 4 ORIGINAL_REJECTED, 12 DEBITED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
RecordTerminal#
Family 1 STATE_SYNC, opcode 2, specification name "record terminal evidence". Records the terminal decision of the source for the binding.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 16 RECORDED, 21 EVIDENCE_REFRESHED, 23 DUPLICATE_DECISION. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | decision_kind | 1 | decision_kind code | Accepted: every listed code. |
| 23 | evidence_reference | 1 | record_reference |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | terminal_evidence | proof | Evidence of the decision for this binding, kind and reference. |
DeliverCredit#
Family 1 STATE_SYNC, opcode 3, specification name "deliver credit". Settles a confirmed decision at the destination.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equaldestination, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 17 CREDITED, 24 DUPLICATE_CONFIRMED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | evidence_reference | 1 | record_reference |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
Refund#
Family 1 STATE_SYNC, opcode 4, specification name "refund". Settles a reversed decision at the source.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 19 REFUNDED, 25 DUPLICATE_REVERSED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation | |
| 23 | evidence_reference | 1 | record_reference |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | terminal_evidence | proof | Evidence of the REVERSED decision for this binding and reference. |
PublishPrimary#
Family 1 STATE_SYNC, opcode 5, specification name "publish primary". Publishes the primary outcome of the binding.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 22 PUBLISHED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
OrdinarySpend#
Family 1 STATE_SYNC, opcode 6, specification name "ordinary spend". Ordinary spend from the root binding.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equaldestination, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 28 SPEND_EXECUTED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | reference | 1 | commit_position | Commit position of the confirmed decision of the root binding. |
| 13 | sender | 1 | principal_id | |
| 14 | spend_recipient | 1 | principal_id | |
| 15 | spend_kind | 1 | spend_kind code | Accepted: 0 ORDINARY. |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | Amount of the root binding. |
| 2 | spend_amount | amount_u256 |
Family 2 REGULATORY_ACTION#
NormativeBytes, test vectors and proofs
Core body field regulatory_action (tag 17). 3 operations.
EmitLegalOrder, opcode 1, follows call_prefix with the order words, allows an appeal deadline and lists one decode check.
{ "family": 2, "opcode": 1, "name": "EmitLegalOrder", "title": "emit legal order", "summary": "Legal order at the source emission stage.", "reference_accepts": true, "words": [ {"kind": "use", "group": "call_prefix"}, {"kind": "word", "name": "action", "type": "code", "enum": "legal_action", "accepted": "all"}, {"kind": "word", "name": "officer", "type": "principal_id"}, {"kind": "word", "name": "jurisdiction", "type": "u64", "description": "Jurisdiction code of the order."}, {"kind": "word", "name": "legal_basis", "type": "u64", "description": "Legal basis code of the order."}, {"kind": "word", "name": "issuance_epoch", "type": "epoch"}, {"kind": "counted_set", "name": "scope", "item": {"type": "asset_id"}}, {"kind": "optional", "name": "predecessor", "description": "Origin of the preceding order.", "fields": [ {"kind": "word", "name": "domain", "type": "domain_id"}, {"kind": "word", "name": "event", "type": "event_id"} ]}, {"kind": "optional", "name": "confiscation_destination", "fields": [ {"kind": "word", "name": "principal", "type": "principal_id"} ]} ], "blobs": [ {"name": "amount", "type": "amount_u256"}, {"name": "order_authorization", "type": "proof", "description": "Officer authorization of the exact order, verified by the configured legal adapter." } ], "deadline": "appeal", "target_domain": "origin_domain", "checks": [ {"when": "decode", "rule": "issuance_epoch equals origin_epoch.", "error": "INVALID_SOURCE"} ], "call": true, "recorded_codes": [1, 2, 3, 26, 30, 31, 32, 33, 34, 35, 36, 37, 38]},Both reference decoders read the words of EmitLegalOrder and CommitLegalOrder in table order, refuse leftover words and then check the target domain and the issuance epoch (opens in a new tab), which fail with INVALID_SOURCE.
fn legal(core: &Core, op: &Operation) -> Result<Operands> { let (id, p, mut words) = native(core, op)?; let [_, proof] = op.blobs.as_slice() else { return Err(BAD); }; if proof.is_empty() { return Err(BAD); } let stage = match op.opcode { Some(1) => LegalStage::SourceEmission, Some(2) => LegalStage::ReceivingCommit, _ => return Err(BAD), }; let action = match words.word()? { 1 => LegalAction::Freeze, 2 => LegalAction::Restrict, 3 => LegalAction::Seize, 4 => LegalAction::Confiscate, 5 => LegalAction::Unfreeze, 6 => LegalAction::Unrestrict, 7 => LegalAction::Release, _ => return Err(BAD), }; let order = Order { binding: p.binding, action, officer: words.word()?, jurisdiction: words.word()?, legal_basis: words.word()?, issuance_epoch: words.word()?, scope: words.set()?, predecessor: words.optional_origin()?, destination: words.optional_word()?, appeal_deadline: deadline(op), }; words.end()?; let target = match stage { LegalStage::SourceEmission => p.binding.origin.domain, LegalStage::ReceivingCommit => p.binding.destination, }; if p.endpoint != target || order.issuance_epoch != p.origin_epoch { return Err(WireError::InvalidSource); }func legal(core *wirepb.Core, op *wirepb.Operation) (*Native,error) { n,w,err:=native(core,op);if err!=nil {return nil,err} opcode:=op.GetOpcode() if len(op.Blobs)!=2 || len(op.Blobs[1])==0 || (opcode!=1 && opcode!=2) {return nil,ErrFormat} var action,issuance,officer,jurisdiction,basis uint64 if err:=w.read(&action);err!=nil || action<1 || action>7 {return nil,ErrFormat} if err:=w.read(&officer,&jurisdiction,&basis);err!=nil {return nil,err} if err:=w.read(&issuance);err!=nil {return nil,err} scope,err:=w.valueSet();if err!=nil {return nil,err} predecessor,err:=w.valueOptional(2);if err!=nil {return nil,err} destination,err:=w.valueOptional(1);if err!=nil {return nil,err} if err:=w.end();err!=nil {return nil,err} target:=n.Binding.Origin.Domain;if opcode==2 {target=n.Binding.Destination} if target!=core.GetTargetDomain() || issuance!=n.OriginEpoch {return nil,ErrSource} fields:=valueNode(102,valueScalar(action),valueScalar(officer),valueScalar(jurisdiction),valueScalar(basis),valueScalar(issuance),valueScalars(scope),predecessor,destination,valueDeadline(op)) n.Summary=valueNode(11,valueNative(n,core.GetAuthorityEpoch()),valueScalar(opcode-1),fields,valueBytes(op.Blobs[1])) return n,nil}EmitLegalOrder#
Family 2 REGULATORY_ACTION (opens in a new tab), opcode 1, specification name "emit legal order". Legal order at the source emission stage.
- Reference configuration: accepted.
- Deadline:
appeal. Absent, indefinite or finite. The finite form is the appeal deadline in UTC seconds. In this version the product treats absent and indefinite alike as no appeal deadline. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 26 LEGAL_EMITTED, 30 LEGAL_INVALID_AUTHORITY, 31 LEGAL_INVALID_STATE, 32 LEGAL_INVALID_BINDING, 33 LEGAL_MISSING_PRIOR_FREEZE, 34 LEGAL_MISSING_PRIOR_SEIZURE, 35 LEGAL_APPEAL_STILL_OPEN, 36 LEGAL_APPEAL_DEADLINE_MISMATCH, 37 LEGAL_MISSING_DESTINATION, 38 LEGAL_CONFLICTING_ORDER. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | action | 1 | legal_action code | Accepted: every listed code. |
| 13 | officer | 1 | principal_id | |
| 14 | jurisdiction | 1 | u64 | Jurisdiction code of the order. |
| 15 | legal_basis | 1 | u64 | Legal basis code of the order. |
| 16 | issuance_epoch | 1 | epoch | |
| 17 | scope | 1 | count | Number of items N. |
| 18 | scope[] | N | asset_id | Strictly ascending. |
| 19 | predecessor | 1 | presence | 0 absent, 1 present. Origin of the preceding order. |
| 20 | predecessor.domain | 1 if predecessor is 1 | domain_id | |
| 21 | predecessor.event | 1 if predecessor is 1 | event_id | |
| 22 | confiscation_destination | 1 | presence | 0 absent, 1 present. |
| 23 | confiscation_destination.principal | 1 if confiscation_destination is 1 | principal_id |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | order_authorization | proof | Officer authorization of the exact order, verified by the configured legal adapter. |
Checks:
- decode: issuance_epoch equals origin_epoch. Otherwise INVALID_SOURCE.
CommitLegalOrder#
Family 2 REGULATORY_ACTION, opcode 2, specification name "commit legal order". Legal order at the receiving commit stage.
- Reference configuration: accepted.
- Deadline:
appeal. Absent, indefinite or finite. The finite form is the appeal deadline in UTC seconds. In this version the product treats absent and indefinite alike as no appeal deadline. - Target: the Core
target_domainMUST equaldestination, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 27 LEGAL_APPLIED, 30 LEGAL_INVALID_AUTHORITY, 31 LEGAL_INVALID_STATE, 32 LEGAL_INVALID_BINDING, 33 LEGAL_MISSING_PRIOR_FREEZE, 34 LEGAL_MISSING_PRIOR_SEIZURE, 35 LEGAL_APPEAL_STILL_OPEN, 36 LEGAL_APPEAL_DEADLINE_MISMATCH, 37 LEGAL_MISSING_DESTINATION, 38 LEGAL_CONFLICTING_ORDER. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | action | 1 | legal_action code | Accepted: every listed code. |
| 13 | officer | 1 | principal_id | |
| 14 | jurisdiction | 1 | u64 | Jurisdiction code of the order. |
| 15 | legal_basis | 1 | u64 | Legal basis code of the order. |
| 16 | issuance_epoch | 1 | epoch | |
| 17 | scope | 1 | count | Number of items N. |
| 18 | scope[] | N | asset_id | Strictly ascending. |
| 19 | predecessor | 1 | presence | 0 absent, 1 present. Origin of the preceding order. |
| 20 | predecessor.domain | 1 if predecessor is 1 | domain_id | |
| 21 | predecessor.event | 1 if predecessor is 1 | event_id | |
| 22 | confiscation_destination | 1 | presence | 0 absent, 1 present. |
| 23 | confiscation_destination.principal | 1 if confiscation_destination is 1 | principal_id |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | order_authorization | proof | Officer authorization of the exact order, verified by the configured legal adapter. |
Checks:
- decode: issuance_epoch equals origin_epoch. Otherwise INVALID_SOURCE.
EnforcementSpend#
Family 2 REGULATORY_ACTION, opcode 3, specification name "enforcement spend". Spend under an enforcement order.
- Reference configuration: accepted.
- Deadline:
appeal. Absent, indefinite or finite. The finite form is the appeal deadline in UTC seconds. In this version the product treats absent and indefinite alike as no appeal deadline. - Target: the Core
target_domainMUST equaldestination, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 28 SPEND_EXECUTED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | reference | 1 | commit_position | Commit position of the confirmed decision of the root binding. |
| 13 | sender | 1 | principal_id | |
| 14 | spend_recipient | 1 | principal_id | |
| 15 | spend_kind | 1 | spend_kind code | Accepted: 1 RECOVER, 2 SEIZE, 3 CONFISCATE, 4 LIQUIDATE. |
| 16 | officer | 1 | principal_id | |
| 17 | jurisdiction | 1 | u64 | Jurisdiction code of the order. |
| 18 | legal_basis | 1 | u64 | Legal basis code of the order. |
| 19 | assets | 1 | count | Number of items N. |
| 20 | assets[] | N | asset_id | Strictly ascending. |
| 21 | prior_seizure | 1 | presence | 0 absent, 1 present. Origin of the prior seizure. |
| 22 | prior_seizure.domain | 1 if prior_seizure is 1 | domain_id | |
| 23 | prior_seizure.event | 1 if prior_seizure is 1 | event_id |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | Amount of the root binding. |
| 2 | spend_amount | amount_u256 | |
| 3 | order_authorization | proof | Officer authorization of the exact enforcement order, verified by the configured legal adapter. |
Family 3 LOCK_MANAGEMENT#
NormativeBytes, test vectors and proofs
Core body field lock_management (tag 18). 8 operations.
Reserve, opcode 1, uses the same three groups as Debit and ends with a duration word of type clock_interval.
{ "family": 3, "opcode": 1, "name": "Reserve", "title": "reserve", "summary": "Reserves the lock footprint of the binding.", "reference_accepts": true, "words": [ {"kind": "use", "group": "call_prefix"}, {"kind": "use", "group": "credential"}, {"kind": "use", "group": "version_vector"}, {"kind": "word", "name": "duration", "type": "clock_interval"} ], "blobs": [ {"name": "amount", "type": "amount_u256"} ], "deadline": "absent", "target_domain": "origin_domain", "call": true, "recorded_codes": [1, 2, 3, 10]},Reserve#
Family 3 LOCK_MANAGEMENT (opens in a new tab), opcode 1, specification name "reserve". Reserves the lock footprint of the binding.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 10 RESERVED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | duration | 1 | clock_interval |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
Dispatch#
Family 3 LOCK_MANAGEMENT, opcode 2, specification name "dispatch". Dispatches a held lock.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 11 SOURCE_DISPATCHED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
Cancel#
Family 3 LOCK_MANAGEMENT, opcode 3, specification name "cancel". Closes a held lock.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 13 CLOSED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | recovery_authorization | proof | Signed recovery action of the current owner for the exact request. |
Fence#
Family 3 LOCK_MANAGEMENT, opcode 4, specification name "fence". Closes a dispatched lock.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 13 CLOSED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | recovery_authorization | proof | Signed recovery action of the current owner for the exact request. |
Preempt#
Family 3 LOCK_MANAGEMENT, opcode 5, specification name "preempt". Takes over an expired lock with the next generation.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 14 PREEMPTED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | duration | 1 | clock_interval |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | recovery_authorization | proof | Signed recovery action of the current owner for the exact request. |
Reconcile#
Family 3 LOCK_MANAGEMENT, opcode 6, specification name "reconcile". Reconciles a credited lock against confirmed evidence.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 18 RECONCILED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation | |
| 23 | evidence_reference | 1 | record_reference |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 | |
| 2 | terminal_evidence | proof | Evidence of the CONFIRMED decision for this binding and reference. |
Write#
Family 3 LOCK_MANAGEMENT, opcode 7, specification name "write". Writes a permitted data value for the asset.
- Reference configuration: not accepted; refused with UNSUPPORTED_VERSION.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 20 DATA_UPDATED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | generation | 1 | generation | |
| 23 | value | 1 | u64 | Data value to write. |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
Timeout#
Family 3 LOCK_MANAGEMENT, opcode 8, specification name "timeout". Advances the ledger clock.
- Reference configuration: not accepted; refused with UNSUPPORTED_VERSION.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Target: the Core
target_domainMUST equalorigin_domain, otherwise INVALID_SOURCE. - Call: yes. Recorded codes: 1 REJECTED, 2 BUSY, 3 UNAVAILABLE, 15 TIME_OBSERVED. Delivery and refusal codes also apply.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | message_reference | 1 | u64 | Caller message reference carried into the product payload. |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | session | 1 | session_id | |
| 4 | revision | 1 | revision | Revision of the signed cut. |
| 5 | origin_epoch | 1 | epoch | Authority epoch of the original request. |
| 6 | origin_domain | 1 | domain_id | |
| 7 | origin_event | 1 | event_id | |
| 8 | asset | 1 | asset_id | |
| 9 | owner | 1 | principal_id | Funding owner at the origin domain. |
| 10 | destination | 1 | domain_id | |
| 11 | recipient | 1 | principal_id | |
| 12 | credential | 1 | presence | 0 absent, 1 present. |
| 13 | credential.asset | 1 if credential is 1 | asset_id | |
| 14 | credential.origin_domain | 1 if credential is 1 | domain_id | |
| 15 | credential.origin_event | 1 if credential is 1 | event_id | |
| 16 | credential.holder | 1 if credential is 1 | principal_id | |
| 17 | credential.generation | 1 if credential is 1 | generation | |
| 18 | credential.epoch | 1 if credential is 1 | epoch | |
| 19 | versions | 1 | count | Number of entries N. Each entry is asset then version. |
| 20 | versions[].asset | N | asset_id | Strictly ascending. |
| 21 | versions[].version | N | asset_version | |
| 22 | elapsed | 1 | clock_interval |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
Family 4 QUERY#
NormativeBytes, test vectors and proofs
Core body field query (tag 19). 8 operations.
CurrentRead, opcode 1, is not a call: a session word and a revision word come before the shared query group, and the entry has no blobs.
{ "family": 4, "opcode": 1, "name": "CurrentRead", "title": "current", "summary": "Current read at the expected cut.", "reference_accepts": true, "words": [ {"kind": "word", "name": "session", "type": "session_id"}, {"kind": "word", "name": "revision", "type": "revision", "description": "Revision of the expected cut."}, {"kind": "use", "group": "query"} ], "blobs": [], "deadline": "absent", "call": false},CurrentRead#
Family 4 QUERY (opens in a new tab), opcode 1, specification name "current". Current read at the expected cut.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | revision | 1 | revision | Revision of the expected cut. |
| 3 | query | 1 | query_tag code | Selects a case; the words of that case end the layout. |
Cases of query:
| Tag | Case | Words after the tag |
|---|---|---|
| 1 | APPLICATION_ASSET | query.asset asset_id |
| 2 | SOURCE_BALANCE | query.domain domain_id, query.asset asset_id |
| 3 | DESTINATION_BALANCE | query.domain domain_id, query.asset asset_id, query.holder principal_id |
| 4 | ROOT_BALANCE | query.origin_domain domain_id, query.origin_event event_id, query.destination domain_id, query.asset asset_id, query.holder principal_id |
| 5 | REGULATORY_STATE | query.domain domain_id, query.asset asset_id |
| 6 | TERMINAL_RECEIPT | query.origin_domain domain_id, query.origin_event event_id |
Blobs: none.
HistoricalRead#
Family 4 QUERY, opcode 2, specification name "historical". Read at a retained historical revision.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | revision | 1 | revision | Historical revision to read. |
| 3 | query | 1 | query_tag code | Selects a case; the words of that case end the layout. |
Cases of query:
| Tag | Case | Words after the tag |
|---|---|---|
| 1 | APPLICATION_ASSET | query.asset asset_id |
| 2 | SOURCE_BALANCE | query.domain domain_id, query.asset asset_id |
| 3 | DESTINATION_BALANCE | query.domain domain_id, query.asset asset_id, query.holder principal_id |
| 4 | ROOT_BALANCE | query.origin_domain domain_id, query.origin_event event_id, query.destination domain_id, query.asset asset_id, query.holder principal_id |
| 5 | REGULATORY_STATE | query.domain domain_id, query.asset asset_id |
| 6 | TERMINAL_RECEIPT | query.origin_domain domain_id, query.origin_event event_id |
Blobs: none.
RawRead#
Family 4 QUERY, opcode 3, specification name "raw". Raw data read.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | query | 1 | query_tag code | Selects a case; the words of that case end the layout. |
Cases of query:
| Tag | Case | Words after the tag |
|---|---|---|
| 1 | APPLICATION_ASSET | query.asset asset_id |
| 2 | SOURCE_BALANCE | query.domain domain_id, query.asset asset_id |
| 3 | DESTINATION_BALANCE | query.domain domain_id, query.asset asset_id, query.holder principal_id |
| 4 | ROOT_BALANCE | query.origin_domain domain_id, query.origin_event event_id, query.destination domain_id, query.asset asset_id, query.holder principal_id |
| 5 | REGULATORY_STATE | query.domain domain_id, query.asset asset_id |
| 6 | TERMINAL_RECEIPT | query.origin_domain domain_id, query.origin_event event_id |
Blobs: none.
OperationStatus#
Family 4 QUERY, opcode 4, specification name "operation status". Status of the operation for an origin.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | origin_domain | 1 | domain_id | |
| 3 | origin_event | 1 | event_id |
Blobs: none.
Journal#
Family 4 QUERY, opcode 5, specification name "journal". Journal read.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id |
Blobs: none.
CaptureCache#
Family 4 QUERY, opcode 6, specification name "capture cache". Read from the capture cache.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | query | 1 | query_tag code | Selects a case; the words of that case end the layout. |
Cases of query:
| Tag | Case | Words after the tag |
|---|---|---|
| 1 | APPLICATION_ASSET | query.asset asset_id |
| 2 | SOURCE_BALANCE | query.domain domain_id, query.asset asset_id |
| 3 | DESTINATION_BALANCE | query.domain domain_id, query.asset asset_id, query.holder principal_id |
| 4 | ROOT_BALANCE | query.origin_domain domain_id, query.origin_event event_id, query.destination domain_id, query.asset asset_id, query.holder principal_id |
| 5 | REGULATORY_STATE | query.domain domain_id, query.asset asset_id |
| 6 | TERMINAL_RECEIPT | query.origin_domain domain_id, query.origin_event event_id |
Blobs: none.
OwnerRead#
Family 4 QUERY, opcode 7, specification name "owner". Registered owner of the asset.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | asset | 1 | asset_id |
Blobs: none.
ExactReceipt#
Family 4 QUERY, opcode 8, specification name "exact receipt". Receipt for an exact original call.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | original_core | canonical_core | Complete immutable original call. |
Checks:
- decode: The nesting limit is at least 2, which leaves one level for original_core. Otherwise INVALID_FORMAT.
- decode: original_core decodes as an ordinary, legal or spend call. Otherwise INVALID_FORMAT.
- consumer: The original call has the deployment, source domain, target domain, principal and authority epoch of this Core and version 6. Otherwise INVALID_SOURCE.
Family 5 ACK#
NormativeBytes, test vectors and proofs
Core body field ack (tag 20). 2 operations.
SettlementAcknowledgement, opcode 1, lists its words directly and adds a consumer check that the acknowledging target is the Core source_domain.
{ "family": 5, "opcode": 1, "name": "SettlementAcknowledgement", "title": "exact settlement acknowledgement", "summary": "Exact settlement acknowledgement from the secondary target.", "reference_accepts": true, "words": [ {"kind": "word", "name": "origin_domain", "type": "domain_id"}, {"kind": "word", "name": "origin_event", "type": "event_id"}, {"kind": "word", "name": "commit_position", "type": "commit_position", "description": "Commit position of the published decision."}, {"kind": "word", "name": "target", "type": "domain_id", "description": "Secondary target that acknowledges the settlement."}, {"kind": "word", "name": "asset", "type": "asset_id"}, {"kind": "word", "name": "owner", "type": "principal_id"}, {"kind": "word", "name": "destination", "type": "domain_id"}, {"kind": "word", "name": "recipient", "type": "principal_id"}, {"kind": "word", "name": "origin_epoch", "type": "epoch"}, {"kind": "word", "name": "decision_kind", "type": "code", "enum": "decision_kind", "accepted": "all"} ], "blobs": [ {"name": "amount", "type": "amount_u256"} ], "deadline": "absent", "checks": [ {"when": "consumer", "rule": "target equals the Core source_domain.", "error": "INVALID_SOURCE"} ], "call": false, "reference_note": "The reference accepts it only from the configured acknowledger principal of the remote domain."},SettlementAcknowledgement#
Family 5 ACK (opens in a new tab), opcode 1, specification name "exact settlement acknowledgement". Exact settlement acknowledgement from the secondary target.
- Reference configuration: accepted. The reference accepts it only from the configured acknowledger principal of the remote domain.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | origin_domain | 1 | domain_id | |
| 2 | origin_event | 1 | event_id | |
| 3 | commit_position | 1 | commit_position | Commit position of the published decision. |
| 4 | target | 1 | domain_id | Secondary target that acknowledges the settlement. |
| 5 | asset | 1 | asset_id | |
| 6 | owner | 1 | principal_id | |
| 7 | destination | 1 | domain_id | |
| 8 | recipient | 1 | principal_id | |
| 9 | origin_epoch | 1 | epoch | |
| 10 | decision_kind | 1 | decision_kind code | Accepted: every listed code. |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | amount | amount_u256 |
Checks:
- consumer: target equals the Core source_domain. Otherwise INVALID_SOURCE.
CorrelatedResponse#
Family 5 ACK, opcode 2, specification name "correlated response". Signed response correlated with an original call.
- Reference configuration: not accepted; refused with UNSUPPORTED_VERSION. The reference authority signs it after the original call returns. Callers verify it with the reference response verifier. The reference authority does not accept it as a request.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | caller_namespace | 1 | principal_id | |
| 2 | call_sequence | 1 | call_sequence | |
| 3 | kind | 1 | response_kind code | Accepted: every listed code. |
| 4 | code | 1 | response_code code | The response verifier checks the code against the original call. Accepted: any value. |
| 5 | commit | 1 | presence | 0 absent, 1 present. |
| 6 | commit.position | 1 if commit is 1 | commit_position |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | original_core | canonical_core | Canonical Core of the original call in its original bytes. |
Checks:
- decode: The nesting limit is at least 2, which leaves one level for original_core. Otherwise INVALID_FORMAT.
- decode: A commit is present only when kind is RECORDED. Otherwise INVALID_FORMAT.
- decode: The original has the version and deployment of this Core, its principal equals caller_namespace, and its source and target domains are this Core's target and source domains. Otherwise INVALID_SOURCE.
- decode: The original is not a correlated response. Otherwise INVALID_FORMAT.
- decode: An original call has the call identifier (caller_namespace, call_sequence). When it is a Debit, a present commit position equals its revision. Otherwise INVALID_FORMAT.
- decode: An original exact receipt query carries a call with the deployment, source domain, target domain, principal and authority epoch of that query and version 6. Otherwise INVALID_SOURCE.
- decode: An original exact receipt query carries a call with the call identifier (caller_namespace, call_sequence). When that call is a Debit, a present commit position equals its revision. Otherwise INVALID_FORMAT.
- consumer: original_core equals the caller's retained canonical request and the call identifier equals that request's call identifier. Otherwise REPLAY_CONFLICT.
Family 6 HEARTBEAT#
NormativeBytes, test vectors and proofs
Core body field heartbeat (tag 21). 2 operations.
Capabilities, opcode 1, has two plain words followed by four counted sets, and its reference_accepts value is false, so the reference configuration refuses it.
{ "family": 6, "opcode": 1, "name": "Capabilities", "title": "capabilities", "summary": "Capability offer.", "reference_accepts": false, "words": [ {"kind": "word", "name": "challenge", "type": "u64", "description": "Fresh challenge of the offer."}, {"kind": "word", "name": "expires", "type": "utc_seconds"}, {"kind": "counted_set", "name": "versions", "item": {"type": "protocol_version"}}, {"kind": "counted_set", "name": "families", "item": {"type": "code", "enum": "family", "accepted": "any"}}, {"kind": "counted_set", "name": "atomicities", "item": {"type": "code", "enum": "atomicity", "accepted": "any"}}, {"kind": "counted_set", "name": "schemes", "item": {"type": "code", "enum": "signature_scheme", "accepted": "any"}} ], "blobs": [], "deadline": "absent", "call": false, "reference_note": "The reference configuration negotiates channels from offers signed outside the Core."},Capabilities#
Family 6 HEARTBEAT (opens in a new tab), opcode 1, specification name "capabilities". Capability offer.
- Reference configuration: not accepted; refused with UNSUPPORTED_VERSION. The reference configuration negotiates channels from offers signed outside the Core.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | challenge | 1 | u64 | Fresh challenge of the offer. |
| 2 | expires | 1 | utc_seconds | |
| 3 | versions | 1 | count | Number of items N. |
| 4 | versions[] | N | protocol_version | Strictly ascending. |
| 5 | families | 1 | count | Number of items N. |
| 6 | families[] | N | family code | Strictly ascending. Accepted: any value. |
| 7 | atomicities | 1 | count | Number of items N. |
| 8 | atomicities[] | N | atomicity code | Strictly ascending. Accepted: any value. |
| 9 | schemes | 1 | count | Number of items N. |
| 10 | schemes[] | N | signature_scheme code | Strictly ascending. Accepted: any value. |
Blobs: none.
Liveness#
Family 6 HEARTBEAT, opcode 2, specification name "liveness". Liveness signal.
- Reference configuration: not accepted; refused with UNSUPPORTED_VERSION.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | challenge | 1 | u64 | Fresh challenge of the signal. |
| 2 | expires | 1 | utc_seconds |
Blobs: none.
Family 7 GOVERNANCE#
NormativeBytes, test vectors and proofs
Core body field governance (tag 22). 2 operations.
OwnerHandover, opcode 1, carries three blobs: the endpoint contexts installed with next_epoch and the consents of both owners.
{ "family": 7, "opcode": 1, "name": "OwnerHandover", "title": "owner handover", "summary": "Owner handover with the consents of both owners.", "reference_accepts": true, "words": [ {"kind": "word", "name": "session", "type": "session_id"}, {"kind": "word", "name": "revision", "type": "revision", "description": "Revision of the expected cut."}, {"kind": "word", "name": "asset", "type": "asset_id"}, {"kind": "word", "name": "previous", "type": "principal_id"}, {"kind": "word", "name": "successor", "type": "principal_id"}, {"kind": "word", "name": "old_session", "type": "session_id"}, {"kind": "word", "name": "new_session", "type": "session_id"}, {"kind": "word", "name": "next_epoch", "type": "epoch"} ], "blobs": [ {"name": "contexts", "type": "endpoint_contexts_json", "description": "Endpoint contexts installed with next_epoch."}, {"name": "previous_consent", "type": "proof", "description": "Consent of the previous owner."}, {"name": "successor_consent", "type": "proof", "description": "Consent of the successor."} ], "deadline": "absent", "checks": [ {"when": "consumer", "rule": "The Core principal equals previous.", "error": "INVALID_SOURCE"} ], "call": false},OwnerHandover#
Family 7 GOVERNANCE (opens in a new tab), opcode 1, specification name "owner handover". Owner handover with the consents of both owners.
- Reference configuration: accepted.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | revision | 1 | revision | Revision of the expected cut. |
| 3 | asset | 1 | asset_id | |
| 4 | previous | 1 | principal_id | |
| 5 | successor | 1 | principal_id | |
| 6 | old_session | 1 | session_id | |
| 7 | new_session | 1 | session_id | |
| 8 | next_epoch | 1 | epoch |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | contexts | endpoint_contexts_json | Endpoint contexts installed with next_epoch. |
| 2 | previous_consent | proof | Consent of the previous owner. |
| 3 | successor_consent | proof | Consent of the successor. |
Checks:
- consumer: The Core principal equals previous. Otherwise INVALID_SOURCE.
InstallEpoch#
Family 7 GOVERNANCE, opcode 2, specification name "authorized epoch installation". Authorized installation of the next authority epoch.
- Reference configuration: not accepted; refused with UNSUPPORTED_VERSION.
- Deadline:
absent. Neither appeal deadline field is present. A present deadline is INVALID_FORMAT. - Call: no. It has no correlated response.
Words:
| Order | Field | Count | Type | Description |
|---|---|---|---|---|
| 1 | session | 1 | session_id | |
| 2 | revision | 1 | revision | Revision of the expected cut. |
| 3 | next_epoch | 1 | epoch |
Blobs:
| Order | Field | Type | Description |
|---|---|---|---|
| 1 | contexts | endpoint_contexts_json | Endpoint contexts installed with next_epoch. |
| 2 | sessions | session_bindings_json | Session bindings installed with next_epoch. The list can be empty. |
| 3 | maintenance_authorization | proof | Maintenance authorization of the exact installation. |
Shared groups#
NormativeBytes, test vectors and proofs
| Group | Used by | Description |
|---|---|---|
call_prefix | Debit, RecordTerminal, DeliverCredit, Refund, PublishPrimary, OrdinarySpend, EmitLegalOrder, CommitLegalOrder, EnforcementSpend, Reserve, Dispatch, Cancel, Fence, Preempt, Reconcile, Write, Timeout | Prefix of every ordinary, legal and spend call. The call identifier is the Core principal with call_sequence. The signed cut is the Core authority_epoch with revision. The binding is the origin, asset, owner, destination and recipient with the amount in the first blob. |
credential | Debit, RecordTerminal, DeliverCredit, Refund, PublishPrimary, Reserve, Dispatch, Cancel, Fence, Preempt, Reconcile, Write, Timeout | Optional lock credential of an ordinary command. |
version_vector | Debit, RecordTerminal, DeliverCredit, Refund, PublishPrimary, Reserve, Dispatch, Cancel, Fence, Preempt, Reconcile, Write, Timeout | Signed asset version vector of an ordinary command. An asset without an entry has version zero. |
query | CurrentRead, HistoricalRead, RawRead, CaptureCache | Typed query operand. The tag selects the queried value and its exact operands. |
A group is defined once under groups and used by name. Debit and Reserve begin with these three.
"groups": { "call_prefix": { "description": "Prefix of every ordinary, legal and spend call. The call identifier is the Core principal with call_sequence. The signed cut is the Core authority_epoch with revision. The binding is the origin, asset, owner, destination and recipient with the amount in the first blob." , "fields": [ {"kind": "word", "name": "message_reference", "type": "u64", "description": "Caller message reference carried into the product payload."}, {"kind": "word", "name": "call_sequence", "type": "call_sequence"}, {"kind": "word", "name": "session", "type": "session_id"}, {"kind": "word", "name": "revision", "type": "revision", "description": "Revision of the signed cut."}, {"kind": "word", "name": "origin_epoch", "type": "epoch", "description": "Authority epoch of the original request."}, {"kind": "word", "name": "origin_domain", "type": "domain_id"}, {"kind": "word", "name": "origin_event", "type": "event_id"}, {"kind": "word", "name": "asset", "type": "asset_id"}, {"kind": "word", "name": "owner", "type": "principal_id", "description": "Funding owner at the origin domain."}, {"kind": "word", "name": "destination", "type": "domain_id"}, {"kind": "word", "name": "recipient", "type": "principal_id"} ] }, "credential": { "description": "Optional lock credential of an ordinary command.", "fields": [ {"kind": "optional", "name": "credential", "fields": [ {"kind": "word", "name": "asset", "type": "asset_id"}, {"kind": "word", "name": "origin_domain", "type": "domain_id"}, {"kind": "word", "name": "origin_event", "type": "event_id"}, {"kind": "word", "name": "holder", "type": "principal_id"}, {"kind": "word", "name": "generation", "type": "generation"}, {"kind": "word", "name": "epoch", "type": "epoch"} ]} ] }, "version_vector": { "description": "Signed asset version vector of an ordinary command. An asset without an entry has version zero.", "fields": [ {"kind": "counted_pairs", "name": "versions", "first": {"kind": "word", "name": "asset", "type": "asset_id"}, "second": {"kind": "word", "name": "version", "type": "asset_version"}} ] },Word types#
NormativeBytes, test vectors and proofs
All words are 64-bit fixed-width values on the wire.
| Type | Description |
|---|---|
u64 | Unsigned 64-bit integer. The field description gives its meaning. |
call_sequence | Caller sequence number. With the Core principal as namespace it forms the caller-qualified call identifier. |
session_id | Registered session identifier. |
revision | Ledger revision. With the Core authority_epoch it forms a commit cut. |
commit_position | Ledger commit position of a retained result. |
epoch | Authority epoch number. |
domain_id | Registered domain identifier. |
event_id | Event number within its origin domain. With that domain it forms an origin key. |
asset_id | Registered asset identifier. |
principal_id | Registered principal identifier. |
generation | Lock generation. |
asset_version | Asset version in a signed version vector. |
record_reference | Reference to a terminal evidence record. |
clock_interval | Interval on the ledger clock. A time-enabled profile counts the ledger clock in Unix seconds. |
utc_seconds | UTC time in seconds since the Unix epoch. |
protocol_version | OIP protocol version number. |
code | Code of the enum named by the field. |
Blob types#
NormativeBytes, test vectors and proofs
| Type | Length | Description |
|---|---|---|
amount_u256 | 32 | Unsigned 256-bit integer as exactly 32 big-endian bytes. The product range is u64, so the first 24 bytes MUST be zero. |
proof | at least 1 | Non-empty authorization or evidence bytes. The configured adapter verifies them against the exact canonical fields. |
canonical_core | at least 1 | Complete canonical encoding of a v0.6 Core, decoded with the nesting limit reduced by one. It is data and is not admitted again as a delivery. |
endpoint_contexts_json | at least 1 | Compact JSON array of endpoint context objects with the keys endpoint, epoch, grants, dependencies and write_permissions in that order. The array is non-empty and its endpoint values are strictly ascending. The bytes MUST equal the reference serializer's re-encoding of the decoded value. |
session_bindings_json | at least 1 | Compact JSON array of [session, {"principal": principal, "authority_epoch": epoch}] pairs with strictly ascending session values. The bytes MUST equal the reference serializer's re-encoding of the decoded value. |
Enums#
NormativeBytes, test vectors and proofs
family#
Core family (tag 12). The Core body field of a family has tag 15 plus the family code.
| Code | Name | Body field |
|---|---|---|
| 1 | STATE_SYNC | state_sync |
| 2 | REGULATORY_ACTION | regulatory_action |
| 3 | LOCK_MANAGEMENT | lock_management |
| 4 | QUERY | query |
| 5 | ACK | ack |
| 6 | HEARTBEAT | heartbeat |
| 7 | GOVERNANCE | governance |
primary#
Core primary code (tag 13). The decoder accepts 1 through 5. The codes have no names and no effect in this version.
Accepted range: 1 through 5.
No named codes.
secondary#
Optional Core secondary code (tag 14). Any value is accepted and preserved with its presence. The codes have no names and authorize no product effect.
No named codes.
signature_scheme#
Core signature scheme (opens in a new tab) (tag 15). The reference profile (opens in a new tab) uses SINGLE with Ed25519.
| Code | Name |
|---|---|
| 1 | SINGLE |
| 2 | THRESHOLD |
atomicity#
Core atomicity (opens in a new tab) (tag 23).
| Code | Name |
|---|---|
| 1 | BEST_EFFORT |
| 2 | GUARANTEED |
| 3 | ALL_OR_NOTHING |
priority#
Core priority (opens in a new tab) (tag 24). CRITICAL requires ALL_OR_NOTHING and current privileged authority. The reference configuration does not grant that authority.
| Code | Name |
|---|---|
| 0 | CRITICAL |
| 1 | REGULATORY |
| 2 | HIGH |
| 3 | NORMAL |
| 4 | LOW |
legal_action#
Action of a legal order.
| Code | Name |
|---|---|
| 1 | FREEZE |
| 2 | RESTRICT |
| 3 | SEIZE |
| 4 | CONFISCATE |
| 5 | UNFREEZE |
| 6 | UNRESTRICT |
| 7 | RELEASE |
spend_kind#
Kind of a spend. An ordinary spend accepts only ORDINARY and an enforcement spend accepts only the other kinds.
| Code | Name |
|---|---|
| 0 | ORDINARY |
| 1 | RECOVER |
| 2 | SEIZE |
| 3 | CONFISCATE |
| 4 | LIQUIDATE |
decision_kind#
Terminal decision of a source.
| Code | Name |
|---|---|
| 1 | CONFIRMED |
| 2 | REVERSED |
query_tag#
Case of a typed query operand.
| Code | Name |
|---|---|
| 1 | APPLICATION_ASSET |
| 2 | SOURCE_BALANCE |
| 3 | DESTINATION_BALANCE |
| 4 | ROOT_BALANCE |
| 5 | REGULATORY_STATE |
| 6 | TERMINAL_RECEIPT |
response_kind#
Kind of a correlated response. A recorded response reports a retained product outcome; a delivery response reports the delivery state; a refusal reports a validation refusal.
| Code | Name |
|---|---|
| 1 | RECORDED |
| 2 | DELIVERY |
| 3 | REFUSAL |
response_code#
Code of a correlated response. Each code fixes its response kind and whether the commit position is present.
| Code | Name | Kind | Commit | Description |
|---|---|---|---|---|
| 1 | REJECTED | 1 RECORDED | absent | |
| 2 | BUSY | 1 RECORDED | absent | |
| 3 | UNAVAILABLE | 1 RECORDED | absent | |
| 4 | ORIGINAL_REJECTED | 1 RECORDED | absent | Exact original Debit closed without effect. |
| 10 | RESERVED | 1 RECORDED | present | |
| 11 | SOURCE_DISPATCHED | 1 RECORDED | present | |
| 12 | DEBITED | 1 RECORDED | present | |
| 13 | CLOSED | 1 RECORDED | present | |
| 14 | PREEMPTED | 1 RECORDED | present | |
| 15 | TIME_OBSERVED | 1 RECORDED | present | |
| 16 | RECORDED | 1 RECORDED | present | |
| 17 | CREDITED | 1 RECORDED | present | |
| 18 | RECONCILED | 1 RECORDED | present | |
| 19 | REFUNDED | 1 RECORDED | present | |
| 20 | DATA_UPDATED | 1 RECORDED | present | |
| 21 | EVIDENCE_REFRESHED | 1 RECORDED | present | |
| 22 | PUBLISHED | 1 RECORDED | present | |
| 23 | DUPLICATE_DECISION | 1 RECORDED | present | |
| 24 | DUPLICATE_CONFIRMED | 1 RECORDED | present | |
| 25 | DUPLICATE_REVERSED | 1 RECORDED | present | |
| 26 | LEGAL_EMITTED | 1 RECORDED | present | |
| 27 | LEGAL_APPLIED | 1 RECORDED | present | |
| 28 | SPEND_EXECUTED | 1 RECORDED | present | |
| 30 | LEGAL_INVALID_AUTHORITY | 1 RECORDED | absent | |
| 31 | LEGAL_INVALID_STATE | 1 RECORDED | absent | |
| 32 | LEGAL_INVALID_BINDING | 1 RECORDED | absent | |
| 33 | LEGAL_MISSING_PRIOR_FREEZE | 1 RECORDED | absent | |
| 34 | LEGAL_MISSING_PRIOR_SEIZURE | 1 RECORDED | absent | |
| 35 | LEGAL_APPEAL_STILL_OPEN | 1 RECORDED | absent | |
| 36 | LEGAL_APPEAL_DEADLINE_MISMATCH | 1 RECORDED | absent | |
| 37 | LEGAL_MISSING_DESTINATION | 1 RECORDED | absent | |
| 38 | LEGAL_CONFLICTING_ORDER | 1 RECORDED | absent | |
| 50 | UNRESOLVED | 2 DELIVERY | absent | |
| 51 | RESPONSE_LOST | 2 DELIVERY | absent | |
| 52 | DEADLINE_EXPIRED | 2 DELIVERY | absent | |
| 53 | CANCELLED | 2 DELIVERY | absent | |
| 54 | TTL_EXPIRED | 2 DELIVERY | absent | |
| 55 | DELIVERY_BUSY | 2 DELIVERY | absent | |
| 56 | DELIVERY_UNAVAILABLE | 2 DELIVERY | absent | |
| 70 | INVALID_FORMAT | 3 REFUSAL | absent | |
| 71 | UNSUPPORTED_VERSION | 3 REFUSAL | absent | |
| 72 | INVALID_SOURCE | 3 REFUSAL | absent | |
| 73 | INVALID_SIGNATURE | 3 REFUSAL | absent | |
| 74 | INVALID_THRESHOLD_SIGNATURE | 3 REFUSAL | absent | |
| 75 | TTL_INVALID | 3 REFUSAL | absent | |
| 76 | REPLAY_CONFLICT | 3 REFUSAL | absent | |
| 77 | PRODUCT_REJECTED | 3 REFUSAL | absent |
Related Pages#
Edition history#
- 0.6.0: Added this edition. The v0.5 specification remains available at its original addresses.
