-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
txs: indexing at runtime #6277
Comments
Thanks for raising this issue @marbar3778. I'm not clear on the best approach to take either. Before, node operators were in charge of what to index and to even index at all. Now, we expand that model to allow the application to do this as well. So it's a mix of concerns. As an operator, I can disable indexing all events, yet I will still index events if the Then, the question becomes if and what should the SDK set One approach could be to hook into the Thoughts @aaronc? |
I opened an issue in Tendermint tendermint/tendermint#4877 because this will cause confusion and it seems the application will take precedent over node operator settings. Comment with your thoughts @alexanderbez @aaronc. |
Could the sdk expose a section the Currently, if the application wants to index something it will be indexed but in the Tendermint |
I agree that there should be a single place where this is configured, as multiple touchpoints for it will just make it more difficult to debug and provide a less seamless UX. That single place as it stands right now is Tendermint. Being that Tendermint is what actually does in the indexing, it seems weird to me to have the SDK decide on what to index, so I'd vote to keep that config in Tendermint. In addition, what's the difference between setting a whitelist in Tendermint vs the SDK semantically speaking?
I don't follow. How do you set |
Before an event that was sent over from the application to Tendermint consisted of:
now:
-- If an application sets some to true but in Tendermint the node operator does not have anything specified it will index the txs anyways. The proposal I was making is to bring this granularity to the sdk. Within
(the if is copied from tendermint but it would look something like that) you would just loop through some values defined in the |
+ if tmstring.StringInSlice(compositeTag, txi.compositeKeysToIndex) {
+ return abci.EventAttribute{Key: toBytes(a.Key), Value: toBytes(a.Value), Index: true}
+ } What is |
meant it as an example. it would be the values set in |
What will be set? What values? I don't understand. Can you give concrete example of what the config would look like?
What does this mean? The SDK does not index at all. It simply returns events. Tendermint does the indexing. |
I think I see what you're getting at. Are you suggesting that Tendermint remove indexing config/filtering altogether? That could work. This means you'd solely rely on Then, the config would look something like:
|
yes that is the idea, Tendermint only relies on applications telling which txs to index the config you mention would just live in the apps toml or whatever they use |
Ok, I think that simplifies the mental model. In order to accomplish this, Tendermint needs to solely rely on |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@marbar3778 why was this closed even though I added the |
I think since the stale label wasn't removed. I'll look into it tomorrow |
Summary
KV.Pair has been replaced by EventAttribute in the upcoming 0.34 release of Tendermint to enable tx indexing at runtime.
ref tendermint/tendermint#4466
Proposal
Enable indexing at runtime.
I'm not sure the best design to do this, a simple approach would be to do it on the msg but I dont think everyone running a node would want this.
For Admin Use
The text was updated successfully, but these errors were encountered: