File tree Expand file tree Collapse file tree 4 files changed +21
-21
lines changed
docs/src/architecture/08_concepts/immutable_ledger/cddl Expand file tree Collapse file tree 4 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ check-cddl:
77
88 WORKDIR /cddl
99
10- COPY ./block.cddl ./genesis_to_prev_hash.cddl .
10+ COPY ./block.cddl ./genesis_to_prev_hash.cddl ./hash.cddl .
1111
12+ RUN cddlc -2 hash.cddl
1213 RUN cddlc -2 block.cddl
1314 RUN cddlc -2 genesis_to_prev_hash.cddl
Original file line number Diff line number Diff line change 11block = [
2- block_header ,
2+ block-header ,
33 block-data,
44 validator-signature,
55]
66
7- block_header = [
7+ block-header = [
88 chain-id: ULID,
99 height: int,
1010 timestamp: #6.1(uint .ge 1722470400), ; Epoch-based date/time
11- prev-block-id: hash_bytes , ; hash of the previous block
11+ prev-block-id: hash-bytes , ; hash of the previous block
1212 ?ledger-type: UUID,
1313 ?purpose-id: ULID / UUID,
1414 ?validator,
@@ -20,14 +20,11 @@ block-data = encoded-cbor
2020UUID = #6.37(bytes) ; UUID type
2121ULID = #6.32780(bytes) ; ULID type
2222
23- hash_bytes = (
24- #6.32781(bytes) / ; Blake3 hash
25- #6.32782(bytes) / ; Blake2b hash
26- #6.32783(bytes) ; Blake2s hash
27- )
28- kid = hash_bytes ; hash of the x509/c509 certificate
23+ kid = hash-bytes ; hash of the x509/c509 certificate
2924
3025validator = (kid / [2* kid])
3126metadata = [ *any ]
3227
3328validator-signature = (bytes / [2* bytes])
29+
30+ ;# include hash
Original file line number Diff line number Diff line change 1- genesis_to_prev_hash = [
2- chain_id : ULID,
3- timestamp: ~ #6.1(uint .ge 1722470400), ; Epoch-based date/time
4- ledger_type : UUID,
5- purpose_id : ULID / UUID,
1+ genesis-to-prev-hash = [
2+ chain-id : ULID,
3+ timestamp: #6.1(uint .ge 1722470400), ; Epoch-based date/time
4+ ledger-type : UUID,
5+ purpose-id : ULID / UUID,
66 validator,
77]
88
99UUID = #6.37(bytes) ; UUID type
1010ULID = #6.32780(bytes) ; ULID type
1111
1212validator = (kid / [2* kid])
13- kid = hash_bytes ; hash of the x509/c509 certificate
14- hash_bytes = (
15- #6.32781(bytes) \ ; Blake3 hash
16- #6.32782(bytes) \ ; Blake2b hash
17- #6.32783(bytes) ; Blake2s hash
18- )
13+ kid = hash-bytes ; hash of the x509/c509 certificate
14+
15+ ;# include hash
Original file line number Diff line number Diff line change 1+ hash-bytes = (
2+ #6.32781(bytes) / ; Blake3 hash
3+ #6.32782(bytes) / ; Blake2b hash
4+ #6.32783(bytes) ; Blake2s hash
5+ )
You can’t perform that action at this time.
0 commit comments