Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/src/architecture/08_concepts/immutable_ledger/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title: Immutable Ledger
arrange:
- ledger.md
31 changes: 31 additions & 0 deletions docs/src/architecture/08_concepts/immutable_ledger/cddl/block.cddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
block = [
block_header,
block_data: ~encoded-cbor, ; deterministically encoded CBOR
validator_signature,
]

block_header = [
chain_id: ULID,
height: int,
timestamp: ~#6.1(uint .ge 1722470400), ; Epoch-based date/time
prev_block_id: hash_bytes, ; hash of the previous block
?ledger_type: UUID,
?purpose_id: ULID / UUID,
?validator,
~metadata,
]

UUID = #6.37(bytes) ; UUID type
ULID = #6.32780(bytes) ; ULID type

hash_bytes = (
#6.32781(bytes) \ ; Blake3 hash
#6.32782(bytes) \ ; Blake2b hash
#6.32783(bytes) ; Blake2s hash
)
kid = hash_bytes ; hash of the x509/c509 certificate

validator = (kid / [2* kid])
metadata = [ *any ]

validator_signature = (bytes / [2* bytes])
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
genesis_to_prev_hash = [
chain_id: ULID,
timestamp: ~#6.1(uint .ge 1722470400), ; Epoch-based date/time
ledger_type: UUID,
purpose_id: ULID / UUID,
validator,
]

UUID = #6.37(bytes) ; UUID type
ULID = #6.32780(bytes) ; ULID type

validator = (kid / [2* kid])
kid = hash_bytes ; hash of the x509/c509 certificate
hash_bytes = (
#6.32781(bytes) \ ; Blake3 hash
#6.32782(bytes) \ ; Blake2b hash
#6.32783(bytes) ; Blake2s hash
)
Loading