-
Notifications
You must be signed in to change notification settings - Fork 44
Incremental storage of Cardano transactions #1619
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As they will diverge in the future.
If data are stored in db returns it and don't parse/store anything
When data are partially stored in the database.
Before it would aggregate result from the not update db and the parser.
This allow to rescan immutables in case of a previous partial scan likely when this scan failed.
The beacon parameter wasn't clearly expressing that it was an upper bound.
Since multiple traits can define it
Since it's a sqlite limitation, it's the repository job to handle that.
jpraynaud
reviewed
Apr 8, 2024
mithril-aggregator/src/services/cardano_transactions_importer.rs
Outdated
Show resolved
Hide resolved
mithril-aggregator/src/services/cardano_transactions_importer.rs
Outdated
Show resolved
Hide resolved
mithril-aggregator/src/services/cardano_transactions_importer.rs
Outdated
Show resolved
Hide resolved
- Fix comments typo - Rename function name - Change `from` type to `ImmutableFileNumber` in `parse_and_store_transactions_not_imported_yet` signature
sfauvel
approved these changes
Apr 8, 2024
jpraynaud
approved these changes
Apr 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Content
This PR optimize the retrieval of cardano transactions. Before each time a Cardano Transaction signed entity type was signed the whole cardano chain was parsed. Now we only parse the immutables that was not parsed before, with a parameter that allow to re-parse previous immutables in case of a previous failure.
There's several internal
mithril-common
api changes to handle that:TransactionStore
trait: persistence is now defined by the nodes themselves.TransactionsImporter
trait to handle both parsing and (possibly if the node need it) persistence.from_immutable
parameter toTransactionParser
trait: an optional lower bound, if None it tell the parser to parse everything from the start.Pre-submit checklist
Comments
We simplified some signatures that were using a
CardanoDbBeacon
but only needed it's immutable_file_number part.Issue(s)
Relates to #1591