diff --git a/design/architecture/db_schema.png b/design/architecture/db_schema.png index d0e162451e..890f80a56e 100644 Binary files a/design/architecture/db_schema.png and b/design/architecture/db_schema.png differ diff --git a/design/architecture/db_schema.puml b/design/architecture/db_schema.puml deleted file mode 100644 index 9266d65f93..0000000000 --- a/design/architecture/db_schema.puml +++ /dev/null @@ -1,175 +0,0 @@ -@startuml -' avoid problems with angled crows feet -skinparam linetype ortho - -package "Batch Execution" as BE #LightYellow{ - -note as N0 - This section is populated - when a batch is processed. -end note - -note as N1 - There can be multiple - sibling batches, but - they will always - share a body. -end note - -note as N2 - The same transaction can be part - of multiple reorged sibling batches, - and generate different receipts and events. -end note - -note as N3 - Transactions can be bound - to a batch body only. -end note - -} - -package "Block Submission" as BS #LightBlue{ -note as N4 - This section is populated - when an L1 block is processed. - The logic will store the rollups - and the cross chain messages. - It will also mark "is_canonical" - when there are reorgs. -end note - -note as N6 -Add constraint on -block(is_canonical, height) -end note - -} - -package "Config" as C #LightGreen{ -note as N5 - This table contains general - information like the shared secret, - the attestation, etc. -end note - -} - -package "Key Value" as KV { -note as N7 -This is where the stateDB lives. -Maybe some stuff needed by the embedded geth. -end note -} - -entity "Batch" as BE.batch { - *batchHash : binary(32) - -- - sequence : int - height : int - is_canonical : boolean - source : P2P/ROLLUP - header : string - *l1Proof : binary(32) <> - *bodyHash : binary(32) <> - *parentHash : binary(32) <> -} - -entity "Batch Body" as BE.batch_body { - *bodyHash : binary(32) - -- - content : mediumblob -} - -entity "Transaction" as BE.tx { - *txHash : binary(32) - -- - content : binary - senderAddress : binary(20) - nonce : int - idx : int - *bodyHash : binary(32) <> -} - -entity "Executed Transaction" as BE.exec_tx { - *execTxId : number <> - -- - createdContractAddress : binary(32) - receipt : mediumblob - *txHash : binary(32) <> - *batchHash : binary(32) <> -} - -entity "Event" as BE.event { - -- - topic0 : binary(32) - topic1 : binary(32) - topic2 : binary(32) - topic3 : binary(32) - topic4 : binary(32) - datablob : mediumblob - logIdx : int - address : binary(32) - lifecycleEvent : boolean - relAddress1 : binary(20) - relAddress2 : binary(20) - relAddress3 : binary(20) - relAddress4 : binary(20) - *execTxId : number <> -} - -entity "Block" as BS.block { - *blockHash : binary(32) - -- - *parentHash : binary(32) <> - is_canonical : boolean - height : int - header : string -} - -entity "L1 Message" as BS.l1_msg{ - __ - message : mediumblob - *blockHash : binary(32) <> -} - -entity "Rollup" as BS.rollup { - *rollupHash : binary(32) - -- - start_seq : int - end_seq : int - *blockHash : binary(32) <> -} - -entity "Config" as C.cfg{ - *key : string - -- - value : binary -} - -entity "KeyValue" as KV.kv{ - *key : binary - -- - value : binary -} - - - -batch_body ||..o{ tx : included in -batch_body ||..|{ batch -block ||..|{ batch : L1 proof -block ||..|{ rollup : Published in -exec_tx ||..|{ event -batch ||..|{ exec_tx -tx ||..|{ exec_tx -block ||..o{ l1_msg -block ||..|{ block -batch ||..|{ batch - - -batch_body .. N1 -exec_tx .. N2 -tx .. N3 -block .. N6 - -@enduml \ No newline at end of file