You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getL1ToL2MessageAndIndex currently looks for the first leaf with the given message key in the message tree. This should probably return the first message with that message key that's not been nullified yet.
The risk here is that for messages that are emitted multiple times, the function would return a message that's already been consumed in the past instead of the most recent one. If the message's nullifier is siloed with the message's index in the tree then this would also emit a duplicate nullifier?
LHerskind
changed the title
getL1ToL2MessageAndIndex should return the first non-nullified message, not the first message
refactor(Inbox): getL1ToL2MessageAndIndex should return the first non-nullified message, not the first message
Mar 9, 2024
For this, we can use the assumption that people are using the proposed mechanism to consuming messages, if they are using other mechanisms we cannot figure out the nullifier and cannot skip it.
getL1ToL2MessageAndIndex
currently looks for the first leaf with the given message key in the message tree. This should probably return the first message with that message key that's not been nullified yet.The risk here is that for messages that are emitted multiple times, the function would return a message that's already been consumed in the past instead of the most recent one. If the message's nullifier is siloed with the message's index in the tree then this would also emit a duplicate nullifier?
aztec-packages/yarn-project/aztec-node/src/aztec-node/server.ts
Lines 374 to 379 in f3ee0b9
The text was updated successfully, but these errors were encountered: