Skip to content

Commit 6b4b309

Browse files
authored
move immutable ledger design docs (#72)
1 parent 874b506 commit 6b4b309

File tree

8 files changed

+1630
-0
lines changed

8 files changed

+1630
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title: Immutable Ledger
2+
arrange:
3+
- ledger.md
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
block = [
2+
block_header,
3+
block_data: ~encoded-cbor, ; deterministically encoded CBOR
4+
validator_signature,
5+
]
6+
7+
block_header = [
8+
chain_id: ULID,
9+
height: int,
10+
timestamp: ~#6.1(uint .ge 1722470400), ; Epoch-based date/time
11+
prev_block_id: hash_bytes, ; hash of the previous block
12+
?ledger_type: UUID,
13+
?purpose_id: ULID / UUID,
14+
?validator,
15+
~metadata,
16+
]
17+
18+
UUID = #6.37(bytes) ; UUID type
19+
ULID = #6.32780(bytes) ; ULID type
20+
21+
hash_bytes = (
22+
#6.32781(bytes) \ ; Blake3 hash
23+
#6.32782(bytes) \ ; Blake2b hash
24+
#6.32783(bytes) ; Blake2s hash
25+
)
26+
kid = hash_bytes ; hash of the x509/c509 certificate
27+
28+
validator = (kid / [2* kid])
29+
metadata = [ *any ]
30+
31+
validator_signature = (bytes / [2* bytes])
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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,
6+
validator,
7+
]
8+
9+
UUID = #6.37(bytes) ; UUID type
10+
ULID = #6.32780(bytes) ; ULID type
11+
12+
validator = (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+
)

0 commit comments

Comments
 (0)