trustoverip / tswg-acdc-specification

Authentic Chained Data Containers (ACDC)
https://trustoverip.github.io/tswg-acdc-specification/
Other
10 stars 7 forks source link

Add annex with ACDC protocol packet types for Sections of ACDCs #57

Closed SmithSamuelM closed 7 months ago

SmithSamuelM commented 7 months ago

The new versionable Serder in KERI /CESR enables protocols like ACDC that sit atop these stacks to have multiple packet types.

For ACDC this means that instead of inline exapnding the Compact form of an ACDC, The expanded sections can be streamed separately inside their own packet wrapper. This better supports caching of reusable sections (schema and rules) and graduated disclosure of attributed, edge, and rule sections. Schema do not benefit from graduated disclosure but benefit greatly from caching.

SmithSamuelM commented 7 months ago

Schema Message

{
  "v": "versionstring",
  "t": "sch", 
  "d":  "messageSAID",
  "s": { }
}

Attribute Message

{
  "v": "versionstring",
  "t": "att", 
  "d":  "messageSAID",
  "a": { }
}

Aggregated Attribute Message

{
  "v": "versionstring",
  "t": "agg", 
  "d":  "messageSAID",
  "A": []
}

Edge Message

{
  "v": "versionstring",
  "t": "edg", 
  "d":  "messageSAID",
  "e": {}
}

Rule Message

{
  "v": "versionstring",
  "t": "rul", 
  "d":  "messageSAID",
  "r": {}
}

Special case Acdc with packet type

Packet type field enables fixed field for very compact ACDC, The SAD is a labeled dict but the over the wire could be CESR fixed field. Shown below is the labele SAD as python Dict not the over the wire JSON or CESR. The type field for ACDCs becomes an optional field for JSON, CBOR, MGPK, and CESR field map but required for CESR fixed field. This way can have more than one type of CESR fixed field top-level ACDC CESR serialization that is unambiguously parseable. Violates the schema is type rule a little so that the parser can find the schema field when its unlabeled as such.

{
  "v":  "ACDCCAAJSONAACD_",
  "t":  "acd",
  "d":  "EBWNHdSXCJnFJL5OuQPyM5K0neuniccMBdXt3gIXOf2B",
  "u":  "0AHcgNghkDaG7OY1wjaDAE0q",
  "i":  "EAqjsKFk66jpf3uFv7An2EDIPMvklXKhmkPreYpZfzBr",
  "ri": "EymRy7xMwsxUelUauaXtMxTfPAMPAI6FkekwlOjkggt",
  "s":  "EAXRZOkogZ2A46jrVPTzlSkUPqGGeIZ8a8FWS7a6s4re",
  "a":  "EFrn9y2PYgveY4-9XgOcLxUderzwLIr9Bf7V_NHwY1lk",
  "e":  "ECdoFOLe71iheqcywJcnjtJtQIYPvAu6DZIl3MOARH3d",
  "r":  "EH3dCdoFOLBe71iheqcywJcnjtJtQIYPvAu6DZIl3MOR"
}
SmithSamuelM commented 7 months ago

Com

SmithSamuelM commented 7 months ago

Completed