Skip to content

Tech: Block Receipts Reminder #254

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
andy-shi88 opened this issue Sep 23, 2019 · 2 comments · Fixed by #294
Closed

Tech: Block Receipts Reminder #254

andy-shi88 opened this issue Sep 23, 2019 · 2 comments · Fixed by #294
Labels
CORE core functionalities FEATURE New feature or request
Milestone

Comments

@andy-shi88
Copy link
Contributor

andy-shi88 commented Sep 23, 2019

Description

When receiving a block, pay attention to the receipt merkle root that is in the block. If the receiving node has the merkle root that are included in the block, take note somewhere (could be in memory [as array of rmr]) and use those referenced rmr as criteria for picking receipts to publish when it's its turn to smith.

Breakdown

  • In receive block, check the receipts published.
  • If one or few of the receipts, memorize the rmr so that we know what are the rmr that have been published in the blocks and we can pick the correct receipt to get linked receipt point later.

*note: the block structure should have already has the receipts fields.

need #255 to be finished first, since we need to take look at the receipt.

@andy-shi88 andy-shi88 added FEATURE New feature or request CORE core functionalities labels Sep 23, 2019
@andy-shi88 andy-shi88 added this to the Sprint 6 milestone Sep 23, 2019
@andy-shi88 andy-shi88 changed the title Tech: Block Reminder Tech: Block Receipts Reminder Sep 23, 2019
@andy-shi88 andy-shi88 assigned andy-shi88 and unassigned andy-shi88 Sep 23, 2019
@andy-shi88
Copy link
Contributor Author

question: should we store the reminder block in-memory or better in some persistance storage?

@andy-shi88 andy-shi88 self-assigned this Sep 25, 2019
@andy-shi88
Copy link
Contributor Author

will store the reminder in embedded key-value database. Using badgerDB

@andy-shi88 andy-shi88 modified the milestones: Sprint 6, Sprint 7 Oct 3, 2019
andy-shi88 added a commit that referenced this issue Oct 4, 2019
* #254 checkpoint: added badger db initialization code

* #254  checkpoint: added insert and get wrapper for badgerdb

* #254 checkpoint: inject KVDb to block core service

* #254 add new config for badger db path

* #254 add new blocker typefor duplicate data detection

* #254 add constant for block reminder receipt in kvdb

* #254 generate receipt code for transaction and block data broadcasting

* #254 kvdb integration for receipt

* #254 add badger db test

* #254 add testdata directory for database tests

* #254 exclude sync.noCopy rule from govet for test files

* #254 tests for generating block and transaction receipt

* #254 add expiration to inserted kvdb record
@andy-shi88 andy-shi88 removed their assignment Dec 10, 2020
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.

1 participant