-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add initial ledger schema * add blake tags specefication * update block structure * cleanup * update * fix * fix CI * fix spelling * fix * fix * wip * fix * wip * add image * fix * fix * wip * wip * fix * fix * wip * fix * fix * fix * fix CI * fix cddl * fix spelling * Update docs/src/architecture/08_concepts/immutable_ledger/ledger.md Co-authored-by: bkioshn <[email protected]> * Update docs/src/architecture/08_concepts/immutable_ledger/ledger.md Co-authored-by: bkioshn <[email protected]> * Update docs/src/architecture/08_concepts/immutable_ledger/ledger.md Co-authored-by: bkioshn <[email protected]> * fix * cleanup * update from feedback --------- Co-authored-by: bkioshn <[email protected]> Co-authored-by: Steven Johnson <[email protected]> Co-authored-by: Oleksandr Prokhorenko <[email protected]>
- Loading branch information
1 parent
2d32951
commit fc7943a
Showing
10 changed files
with
1,730 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
31
docs/src/architecture/08_concepts/immutable_ledger/cddl/block.cddl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]) |
18 changes: 18 additions & 0 deletions
18
docs/src/architecture/08_concepts/immutable_ledger/cddl/genesis_to_prev_hash.cddl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) |
Oops, something went wrong.