Labels: high-difficulty, yul, cryptography, gasguard
Difficulty: High
Module: contracts/crypto/
🧠 Concept
Build an assembly batch engine that executes multiple signature verification operations (ecrecover) or modular exponentiations (modexp) sequentially within a single Yul execution loop.
⚠️ Problem
Executing multiple cryptographic checks sequentially using high-level Solidity wrappers repeatedly allocates and frees memory, accumulating significant memory expansion gas.
📁 Implementation Scope
contracts/crypto/BatchPrecompileProcessor.sol
test/crypto/BatchPrecompileProcessor.test.ts
🛠️ Requirements
- Maintain fixed-size input/output buffers in memory without invoking free memory updates.
- Call EVM precompiles (
0x01 or 0x05) repeatedly within a Yul loop using staticcall.
- Aggregate results and return execution status flags atomically.
🎯 Acceptance Criteria
Labels:
high-difficulty,yul,cryptography,gasguardDifficulty: High
Module:
contracts/crypto/🧠 Concept
Build an assembly batch engine that executes multiple signature verification operations (
ecrecover) or modular exponentiations (modexp) sequentially within a single Yul execution loop.Executing multiple cryptographic checks sequentially using high-level Solidity wrappers repeatedly allocates and frees memory, accumulating significant memory expansion gas.
📁 Implementation Scope
contracts/crypto/BatchPrecompileProcessor.soltest/crypto/BatchPrecompileProcessor.test.ts🛠️ Requirements
0x01or0x05) repeatedly within a Yul loop usingstaticcall.🎯 Acceptance Criteria