BlocSoc-iitr / HorseRiders

A complex math and Fast Fourier Transform Library for Huff and EVM Assembly
MIT License
8 stars 9 forks source link

🛠️ FIX : Reduce local variables to remove stack too deep error #6

Closed 0xpanicError closed 9 months ago

0xpanicError commented 9 months ago

🛠️ [FIX]

Description: The FFT Implementation in solidity currently uses too many local variables in function fft() which causes stack too deep error. Currently this can be overlooked by using --via-ir flag while compiling and testing the contract.

Scope: This function is implemented in src/FFT_implementation/fft.sol

Objective: Refactor code such that the number of local variables used is reduced to under 16. This removes stack too deep error from compilation and testing. Once this is achieved, --via-ir flag can also be removed from ./github/workflows/main.yml