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
huffv can set the input length as a constant instead of storing it in memory and performing a check at runtime.
What to do
Read inputs from (0x4C0 + n_ics * 0x40):(0x4C0 + n_ics * 0x40) in memory, removing the need for the input length check.
This should be safe because the verifier will always read the required number of inputs from memory. For example, if we hard code the public input length to 5 and only 2 are written to memory, the verifier will still try to load 5 between 0x640:0x6E0. If the memory is clean, the last 3 inputs would default to 0.
Should add a safety warning above VERIFY if we do this to make sure devs know that the public inputs' reserved memory should be clean when the macro is invoked.
The text was updated successfully, but these errors were encountered:
Overview
huffv
can set the input length as a constant instead of storing it in memory and performing a check at runtime.What to do
Read inputs from
(0x4C0 + n_ics * 0x40):(0x4C0 + n_ics * 0x40)
in memory, removing the need for the input length check.This should be safe because the verifier will always read the required number of inputs from memory. For example, if we hard code the public input length to 5 and only 2 are written to memory, the verifier will still try to load 5 between
0x640:0x6E0
. If the memory is clean, the last 3 inputs would default to 0.Should add a safety warning above
VERIFY
if we do this to make sure devs know that the public inputs' reserved memory should be clean when the macro is invoked.The text was updated successfully, but these errors were encountered: