nomos-specs/cryptarchia/messages.abnf
Giacomo Pasini 734b038c50
Add header id and message format specification (#52)
* Create messages.abnf

* add missing block rule

* Add content id to header message

* add header id definition + implementation in python

* address review comments
2024-01-31 23:09:03 +01:00

22 lines
696 B
ABNF

; VERSION 0.1
; ------------ BLOCK ----------------------
BLOCK = HEADER CONTENT
; ------------ HEADER ---------------------
VERSION = %x01
HEADER = VERSION HEADER-UNSIGNED
HEADER-UNSIGNED = %x00 HEADER-COMMON
HEADER-COMMON = CONTENT-SIZE CONTENT-ID BLOCK-DATE PARENT-ID
CONTENT-SIZE = U32
BLOCK-DATE = BLOCK-SLOT
BLOCK-SLOT = U64
PARENT-ID = HEADER-ID
; ------------ CONTENT --------------------
CONTENT = *OCTET
; ------------- MISC ----------------------
U32 = 4OCTET ; unsigned integer 32 bit (BE)
U64 = 8OCTET ; unsigned integer 32 bit (BE)
HEADER-ID = 32OCTET
CONTENT-ID = 32OCTET