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

store inputs #6

Merged
merged 9 commits into from
Aug 4, 2021
Merged

store inputs #6

merged 9 commits into from
Aug 4, 2021

Conversation

code-for-uss
Copy link
Collaborator

Related to #4
Some Changes:

  • Added functionality for storing input boxes related to output boxes and specifying spent boxes
  • Fixed some todos about DB blocking
  • Add dataInputs DAO and functionality for store them
  • Fixed bug duplicate scanning output boxes
  • Merged all migrations into one schema

@code-for-uss code-for-uss requested a review from kushti July 27, 2021 14:20
@code-for-uss code-for-uss linked an issue Jul 27, 2021 that may be closed by this pull request
extends DbUtils with HasDatabaseConfigProvider[JdbcProfile] {

import profile.api._
/**
* store data into db as transactionally.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfinished description

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change naming and descriptions

* @param extractionResult : ExtractionResultModel extracted data
* @param spentTrackedInputs : ExtractionInputResultModel extracted spent Tracked Inputs
*/
def storeBaseOnInputs(spentTrackedInputs: Seq[ExtractionInputResultModel]): Unit = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like inputs for tracked outputs being spent passed, while in fact all the inputs in the block. Please fix descriptions and naming.

Inputs filtering can be very inefficient, can we consider using and storing a Bloom filter maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think according to the database queries, this is the only way to use Bloom filter, If you have another comment please share

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems Bloom filter is not doing doing much here, also, after checking with mightContain you need to check for false positives. Let's revert ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert on which? the filter or check false positives for Bloom filter?
I think revert on the filter is better!

@code-for-uss code-for-uss requested a review from kushti July 30, 2021 12:23
@kushti kushti merged commit f12ac71 into master Aug 4, 2021
@kushti kushti deleted the 4-store-inputs branch August 4, 2021 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storing input boxes and specifying spent boxes
2 participants