Skip to content

Tech: Node Receipt Collection #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
capt4ce opened this issue Sep 2, 2019 · 0 comments · Fixed by #265
Closed

Tech: Node Receipt Collection #202

capt4ce opened this issue Sep 2, 2019 · 0 comments · Fixed by #265
Assignees
Labels
CORE core functionalities FEATURE New feature or request
Milestone

Comments

@capt4ce
Copy link
Contributor

capt4ce commented Sep 2, 2019

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

@capt4ce capt4ce added the FEATURE New feature or request label Sep 2, 2019
@capt4ce capt4ce added this to the Sprint 5 milestone Sep 2, 2019
@andy-shi88 andy-shi88 changed the title Tech: Receipt Collection Tech: Node Receipt Collection Sep 3, 2019
@andy-shi88 andy-shi88 mentioned this issue Sep 4, 2019
12 tasks
@astaphobia astaphobia self-assigned this Sep 9, 2019
@andy-shi88 andy-shi88 modified the milestones: Sprint 5, Sprint 6 Sep 18, 2019
@andy-shi88 andy-shi88 added the CORE core functionalities label Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE core functionalities FEATURE New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants