Skip to content

Conversation

@IlyasRidhuan
Copy link
Contributor

@IlyasRidhuan IlyasRidhuan commented Dec 30, 2025

For situations where radix = 0, 1 we were not building the precomputed trace for radix_safe_limbs. Even though the ToRadix subtrace will error (since the radix is invalid). We need this lookup in the execution trace to pass for gas computation.

The error was missing by our existing test suite and the to_radix fuzzer becuase the bug only manifests when:

  • You have invalid radix (0 or 1)
  • You generate the actual precomputed trace (which skipped rows 0 and 1)
  • You generate the actual execution trace (which tries to lookup radix=1)
  • You run the actual lookup constraint check

Copy link
Contributor Author

IlyasRidhuan commented Dec 30, 2025

@IlyasRidhuan IlyasRidhuan force-pushed the ir/12-30-fix_avm_precomp_trace_for_get_p_limbs branch from 36e8d0e to 4fc3709 Compare December 30, 2025 15:21
@IlyasRidhuan IlyasRidhuan marked this pull request as ready for review January 2, 2026 09:04
@IlyasRidhuan IlyasRidhuan requested review from sirasistant and removed request for fcarreiro and jeanmon January 2, 2026 09:05
Copy link
Contributor

@sirasistant sirasistant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@IlyasRidhuan IlyasRidhuan force-pushed the ir/12-27-fix_avm_preserve_coordinates_in_embedded_curve_point branch from 75ab6a6 to 280572e Compare January 2, 2026 12:10
@IlyasRidhuan IlyasRidhuan force-pushed the ir/12-30-fix_avm_precomp_trace_for_get_p_limbs branch from 4fc3709 to e2c018c Compare January 2, 2026 12:10
Base automatically changed from ir/12-27-fix_avm_preserve_coordinates_in_embedded_curve_point to merge-train/avm January 2, 2026 13:54
@IlyasRidhuan IlyasRidhuan requested a review from Maddiaa0 as a code owner January 2, 2026 13:54
@IlyasRidhuan IlyasRidhuan removed the request for review from Maddiaa0 January 2, 2026 13:54
@IlyasRidhuan IlyasRidhuan force-pushed the ir/12-30-fix_avm_precomp_trace_for_get_p_limbs branch from e2c018c to ebd5e07 Compare January 2, 2026 14:47
@IlyasRidhuan IlyasRidhuan merged commit 1a92889 into merge-train/avm Jan 2, 2026
9 checks passed
@IlyasRidhuan IlyasRidhuan deleted the ir/12-30-fix_avm_precomp_trace_for_get_p_limbs branch January 2, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants