Skip to content

Commit 63a7d60

Browse files
committed
change ULID to UUID v7 for immutable ledger design specs
1 parent ef7261f commit 63a7d60

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

docs/src/architecture/08_concepts/immutable_ledger/cddl/block.cddl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ block = [
88
]
99

1010
block-header = [
11-
chain-id: ULID,
11+
chain-id: UUID, ; UUID v7
1212
height: int,
1313
timestamp: #6.1(uint .ge 1722470400), ; Epoch-based date/time
1414
prev-block-id: hash-bytes, ; hash of the previous block
15-
?ledger-type: UUID,
16-
?purpose-id: ULID / UUID,
15+
?ledger-type: UUID, ; UUID v4
16+
?purpose-id: UUID, ; UUID v7
1717
?validator,
1818
~metadata,
1919
]
2020

2121
block-data = encoded-cbor
2222

2323
UUID = #6.37(bytes) ; UUID type
24-
ULID = #6.32780(bytes) ; ULID type
2524

2625
kid = hash-bytes ; hash of the x509/c509 certificate
2726

docs/src/architecture/08_concepts/immutable_ledger/cddl/genesis_to_prev_hash.cddl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
; https://datatracker.ietf.org/doc/html/draft-ietf-cbor-cde-06
33

44
genesis-to-prev-hash = [
5-
chain-id: ULID,
5+
chain-id: UUID, ; UUID v7
66
timestamp: #6.1(uint .ge 1722470400), ; Epoch-based date/time
7-
ledger-type: UUID,
8-
purpose-id: ULID / UUID,
7+
ledger-type: UUID, ; UUID v4
8+
purpose-id: UUID, ; UUID v7
99
validator,
1010
]
1111

1212
UUID = #6.37(bytes) ; UUID type
13-
ULID = #6.32780(bytes) ; ULID type
1413

1514
validator = (kid / [2* kid])
1615
kid = hash-bytes ; hash of the x509/c509 certificate

0 commit comments

Comments
 (0)