-
Notifications
You must be signed in to change notification settings - Fork 6
fix: header event emits indexed and unindexed header #17
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
Conversation
i think maybe let's just do non-indexed? |
having both allows us to still use it as a topic to find the specific event that admitted that header |
yes but i'm wondering in what circumstances we would have the exact header information beforehand and want to use it to query the event. i'm wondering if there's a way we could serve the need of "i know about a header, i want to find the event" while also servicing other more general & useful things. i think it would be nice to have the following indexed:
perhaps we break out the header info into individual event params and index those two? |
for example it would be nice to be able to say "give me all the blocks from a given chain" OR "give me all the 0th blocks that have been emitted, so i can see what chains there are" but this would also serve the need of "i have a full header and i want to find the event" because (ruChainId, sequence) is a unique block identifier |
so the new would be
ya that sounds good to me |
would we wanna do
just to avoid paying for re-emitting |
this is fine. let's ship it |
indexed structs are serialized and hashed, and the original data is not included in the event. This adds a non-indexed Header struct param alongside, so that we keep access to the header data