Skip to content

Commit

Permalink
BM-60: Add trusted header.
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Jul 4, 2022
1 parent 6cc797a commit d5ca0e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Binary file modified docs/diagrams/database_schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 14 additions & 4 deletions docs/diagrams/database_schema.puml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ package "btccheckpoint" #FCF5C7 {
entity "Checkpoint Submission" as ckpt_submission {
* submission ID <<generated>>
--
* ckpt_hash <<FK>>: derived from OP_RETURN
* btc_public_key <<FK>>: submitter derived from inclusions
* ckpt_hash <<FK>> <<derived>>: from OP_RETURN
* btc_public_key <<FK>> <<derived>>: submitter from inclusions
--
* prev_epoch_ckpt_submission <<computed>>:
at least one submission for previous epoch in an
Expand All @@ -104,7 +104,7 @@ package "btccheckpoint" #FCF5C7 {

package "btclightclient" #ADF7B6 {
entity "Bitcoin Header" as btc_header {
* hash: Block Hash
* hash: Block Hash <<derived>>
--
* parent_hash <<FK>>
* merkle_root
Expand All @@ -115,6 +115,16 @@ package "btclightclient" #ADF7B6 {
* height <<computed>>
* total_pow <<computed>>
}

entity "Trusted Header" as btc_trusted {
<<singleton in genesis>>
--
* raw_header: bytes of a deeply embedded block
* height: from block explorer
* total_pow: from block explorer
--
* hash: Block Hash <<derived>>
}
}


Expand All @@ -141,6 +151,6 @@ ckpt_inclusion }|--|| ckpt_submission
ckpt_inclusion }o--|| btc_header

btc_header }o--o| btc_header

btc_trusted |o--|| btc_header

@enduml

0 comments on commit d5ca0e9

Please sign in to comment.