Skip to content

Commit

Permalink
update db er diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Apr 24, 2024
1 parent 77df165 commit eeb07a2
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions crates/katana/docs/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ TxHashes {
VALUE TxHash
}
TxTraces {
KEY TxNumber
VALUE TxExecInfo
}
Transactions {
KEY TxNumber
VALUE Tx
Expand Down Expand Up @@ -97,25 +102,24 @@ ContractInfoChangeSet {
VALUE ContractInfoChangeList
}
NonceChanges {
NonceChangeHistory {
KEY BlockNumber
DUP_KEY ContractAddress
VALUE ContractNonceChange
}
ContractClassChanges {
ClassChangeHistory {
KEY BlockNumber
DUP_KEY ContractAddress
VALUE ContractClassChange
}
StorageChangeSet {
KEY ContractAddress
DUP_KEY StorageKey
VALUE StorageEntryChangeList
KEY ContractStorageKey
VALUE BlockList
}
StorageChanges {
StorageChangeHistory {
KEY BlockNumber
DUP_KEY ContractStorageKey
VALUE ContractStorageEntry
Expand All @@ -133,6 +137,7 @@ TxHashes ||--|| TxNumbers : "tx id"
TxNumbers ||--|| Transactions : "has"
TxBlocks ||--|{ Transactions : "tx block"
Transactions ||--|| Receipts : "each tx must have a receipt"
Transactions ||--|| TxTraces : "each tx must have a trace"
CompiledClassHashes ||--|| CompiledContractClasses : "has"
CompiledClassHashes ||--|| SierraClasses : "has"
Expand All @@ -143,11 +148,10 @@ ContractInfo ||--|| CompiledClassHashes : "has"
ContractInfo }|--|{ ContractInfoChangeSet : "has"
ContractStorage }|--|{ StorageChangeSet : "has"
ContractInfoChangeSet }|--|{ NonceChanges : "has"
ContractInfoChangeSet }|--|{ ContractClassChanges : "has"
ContractInfoChangeSet }|--|{ NonceChangeHistory : "has"
ContractInfoChangeSet }|--|{ ClassChangeHistory : "has"
CompiledClassHashes ||--|| ClassDeclarationBlock : "has"
ClassDeclarationBlock ||--|| ClassDeclarations : "has"
BlockNumbers ||--|| ClassDeclarations : ""
StorageChangeSet }|--|{ StorageChanges : "has"
```
StorageChangeSet }|--|{ StorageChangeHistory : "has"
```

0 comments on commit eeb07a2

Please sign in to comment.