Closed
Description
Description
Store receipt got from target node
, and store them in batch
in memory. When maximum number of batch_size
is reached, generate merkle root, store them in merkle_root
table, and store every receipt collected to the node_receipt_table
linked to the merkle_root
table id.
Breakdown
- Table needed:
merkle_root
to store the merkle root of the receipt collected.node_receipt
to store the receipt that are collected, with themerkle_root_id
specified.batch_receipt
to store receipts collection before store intonode_receipt
- Generate merkle root when the
maximum_batch_size
reached. - Save
merkle_root
andreceipts
to database.
MerkleRoot table schema
- id : root hash
- tree: [uint32(leaf length), uint32(crypto schema), ... tree] which is a []byte
Additional Diagram / File
Put additional diagram or file