aztec-packages
aztec-packages copied to clipboard
chore: detect enqueued calls with too-long calldata
Follow up to https://github.com/AztecProtocol/aztec-packages/pull/12199, since we never did introduce the check suggested in this comment and we want to avoid surpising errors when transactions are simply deemed invalid due to excessive calldata length.
Ideally we'd add this in the private context, which is where the calls are enqueued, but that only deals with calldata hashes and not the raw data. I instead added this to the place where we hash said data (i.e. the only place in the codebase that references GENERATOR_INDEX__PUBLIC_CALLDATA), which is the next best thing.