-
Notifications
You must be signed in to change notification settings - Fork 214
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
Chain Index: users can configure to only store txs from a block no onward #72
Chain Index: users can configure to only store txs from a block no onward #72
Conversation
a2ce982
to
96c3277
Compare
@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
@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. |
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.
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
Thanks @kk-hainq ! :) |
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
app
as 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: