Provide a way to limit fetched logs by single tag #9333
Labels
A-security
Area: Relates to security. Something is insecure.
C-node
Component: Aztec Node
team-fairies
Nico's team
Since there's no enshrining of any kind on a log tag is computed (#9268), and no e.g. protocol-enforced siloing, any application can emit whatever tag they desire with any log. This means there can be arbitrarily many logs associated with a given tag, and therefore returned from the
getLogsByTag
call.Certain components may require limiting the amount of received logs (e.g. the aztec-nr oracle, due to Noir array limitations), and it'd be good to in general be able to deal with upper bounds on the array size. Therefore we need to have some way to read these tagged logs with some kind of e.g. pagination mechanism, to prevent arbitrarily large responses but still be able to properly process them.
As a stop-gap measure, it might be good enough to simply return the first e.g. 20 logs associated with a given tag and ignore the rest. This does however introduce the possibility of a malicious actor spamming the network with a known tag (e.g. one it sees on the mempool), preventing good actors from discovering notes associated with a log if said log is discarded and never processed.
The text was updated successfully, but these errors were encountered: