Skip to content

Tech: Node Receipt Collection #202

Closed
@capt4ce

Description

@capt4ce

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 the merkle_root_id specified.
    • batch_receipt to store receipts collection before store into node_receipt
  • Generate merkle root when the maximum_batch_size reached.
  • Save merkle_root and receipts 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

Metadata

Metadata

Assignees

Labels

COREcore functionalitiesFEATURENew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions