This repository was archived by the owner on Dec 2, 2024. It is now read-only.
Chain Index: users can configure to only store txs from a block no onward#72
Merged
silky merged 4 commits intoIntersectMBO:mainfrom Nov 15, 2021
Merged
Conversation
a2ce982 to
96c3277
Compare
Contributor
|
@kk-hainq Thanks for proposing this! It looks interesting. What about instead of specifying an era, we specify a block number, and only start storing transactions from that point forward? This would make the code a bit more generic. Then, you can provide some hints on how to run that for the specific eras, etc. Thoughts? |
96c3277 to
6c13212
Compare
Contributor
Author
|
@silky Awesome! it is not just more generic and clean for the code and users, it allows dApps to specify the block that they launch at for swift syncing before that! I have updated the code as suggested. |
silky
suggested changes
Nov 9, 2021
Contributor
silky
left a comment
There was a problem hiding this comment.
Nice; looks great! Just one minor change request.
Two other things:
- Do you think it's possible to add a test somewhere?
- Maybe we could have a comment somewhere listing a few block numbers people might like to use (i.e. the one you'd use to only save transactions from the Alonzo era and beyond.)
Thanks for working on this! :)
…or future options.
Tighten and start sharing code among existing tests as well.
6c13212 to
e7f560c
Compare
silky
approved these changes
Nov 15, 2021
silky
approved these changes
Nov 15, 2021
Contributor
|
Thanks @kk-hainq ! :) |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR is a quick proof-of-concept for #73 on allowing users to choose which batch of transactions to store in the DB. In this specific instance, the application can choose to only store transactions from Alonzo onward. Given that tip and UTXO processing is unaffected, most of these configurations are pretty safe to the functioning of the chain index?
I attempted this as a dApp developer wanting to configure the chain index, hence keeping as many decisions in
appas possible instead of extending the chain index effects.If this makes sense, I would love to clean it and add a few tests first. A possible next step will then be listing exclusive script addresses to track.
Pre-submit checklist: