Skip to content
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

Internalize Block Tracking #27

Closed
wtogami opened this issue May 24, 2014 · 3 comments
Closed

Internalize Block Tracking #27

wtogami opened this issue May 24, 2014 · 3 comments
Assignees

Comments

@wtogami
Copy link
Collaborator

wtogami commented May 24, 2014

Proposed Details

  • Add an internal representation of recent blocks to Baron's database. type: block contains at least...
    • blockhash
    • previous blockhash
    • next blockhash
    • array of relevant incoming transactions contained within this block
    • height
  • When a block is X confirmations in the past there is no reason to keep it any longer. Allow for a configurable pruning threshold?
  • Instead of gettransaction, the # of confirmations can be calculated from latest block height minus the height of the block containing the transaction. The status of previous transactions need not be queried again if their blockhash remains valid (within the best chain).
  • If a known block becomes invalid, walk to previous until a valid block is found. Any Baron-relevant transactions within blocks that have become invalid have their status changed as part of a reorg.
@wtogami wtogami self-assigned this May 26, 2014
@akinsey
Copy link
Member

akinsey commented May 26, 2014

If we delete older blocks we should store the block height within the payment as well. This will allow us to continue to count confirmations after deleting older blocks.

@wtogami
Copy link
Collaborator Author

wtogami commented May 26, 2014

That's a very good point.

@wtogami
Copy link
Collaborator Author

wtogami commented Jun 20, 2014

We still want to do this but perhaps much later.

@wtogami wtogami closed this as completed Jun 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants