Skip to content

Instantly share code, notes, and snippets.

@hyc
Last active April 22, 2016 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyc/be05ac1b5af0dccb6ac722307be61d53 to your computer and use it in GitHub Desktop.
Save hyc/be05ac1b5af0dccb6ac722307be61d53 to your computer and use it in GitHub Desktop.
New Monero database schema
blocks
uint64_t (block height) -> blobdata (block_to_blob(blk))
block_info
uint64_t (block_height) -> mdb_block_info {timestamp, coins, size, difficulty, hash}
block_heights
crypto::hash -> uint64_t (block height)
txs
crypto::hash -> blobdata (tx_to_blob(tx))
tx_indices
crypto::hash -> tx_data_t {tx_index, unlock_time, height}
tx_outputs
tx_index -> uint64_t (output index[])
output_txs
uint64_t (m_num_outputs) -> outtx {crypto::hash (tx_hash), uint64_t local_index}
output_amounts
uint64_t (amount) -> outkey { uint64_t tx_index, crypto::public_key pubkey, uint64_t unlock_time, uint64_t height}
spent_keys
crypto::key_image -> NULL
hf_starting_heights
hf_versions
properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment