From c6d1b62a35b6a239106f37b4bf4f38e1e5bfe79d Mon Sep 17 00:00:00 2001 From: Someone Else Date: Mon, 13 Feb 2023 22:21:46 +0100 Subject: [PATCH] just rwd monerod db schema --- blockchain_db/src/rocksdb.rs | 40 +++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/blockchain_db/src/rocksdb.rs b/blockchain_db/src/rocksdb.rs index 4af81922..f1c493ea 100644 --- a/blockchain_db/src/rocksdb.rs +++ b/blockchain_db/src/rocksdb.rs @@ -1,8 +1,38 @@ //! //! RocksDB implementation. //! -//! Database structure: -//! ------------------------------------- -//! Column | Key | Data -//! ------------------------------------- -//! \ No newline at end of file +//! Database Schema: +//! --------------------------------------- +//! Column | Key | Data +//! --------------------------------------- +//! *block*------------------------------------------------------ +//! +//! blocks height {blob} +//! heights hash height +//! b_metadata height {b_metdata} +//! +//! *transactions*----------------------------------------------- +//! +//! tx_prefix tx ID {blob} +//! tx_prunable tx ID {blob} +//! tx_hash tx ID hash +//! tx_opti_h hash height +//! tx_outputs tx ID {amount,output,indices} +//! +//! *outputs*---------------------------------------------------- +//! +//! ouputs_txs op ID {tx hash, l_index} +//! outputs_am amount {amount output index, metdata} +//! +//! *spent keys*-------------------------------------------------- +//! +//! spent_keys hash well... obvious? +//! +//! *tx pool*------------------------------------------------------ +//! +//! txp_meta hash {txp_metadata} +//! txp_blob hash {blob} +//! +//! *alt blocks*---------------------------------------------------- +//! +//! alt_blocks hash {bock data, block blob} \ No newline at end of file