10183 commits in all time Jan 13, 2026 04:37 – Apr 13, 2026 04:37 UTC
achidlow puya
Merge c29519f673e7099ae381484de0a9b54d3b53f581 into 5f3112c38747bfc042c7eb014bb67fb76e80f794
Git Commit 117a4153 Branch pull/693/merge Document 58/2,334 ++ 2 --
achidlow puya
chore: compile all
Git Commit c29519f6 Branch fix/biguint-xor-identity-fold Document 23/101 ++ 53 --
achidlow puya
fix: remove biguint x ^ x identity fold
The `a == b` identity match for bitwise_xor_bytes folded `x ^ x` to the
biguint constant 0, which encodes as empty bytes. The AVM `b^` op
produces a zero-filled array of the same length as the inputs, so the
fold changed the observable byte-width of the result.

Remove the identity case; constant folding of literal xors is
unaffected (it correctly produces a zero-filled byte array of the
appropriate length).
Git Commit 5bb8ce97 Branch fix/biguint-xor-identity-fold Document 2/42 ++ 2 --
achidlow puya
test: add regression test for x ^ x biguint identity fold miscompilation
The intrinsic simplifier folds biguint `x ^ x` to the integer constant
0 (which encodes as empty bytes), but the AVM `b^` op produces a
zero-filled byte array of the same length as the inputs.

The fold changes the observable byte-width of the result, breaking any
downstream code that depends on the length.

Visible in the destructured IR as `self_xor` reducing to `return 0b`
(empty bytes) regardless of the argument's length. The on-chain test
fails at -O1/-O2 where the fold triggers.
Git Commit 1e79a3ac Branch fix/biguint-xor-identity-fold Document 56/2,244 ++ 0 --
achidlow puya
Merge 3dcf14e41b2a051e28431701df3497d2f6234405 into 5f3112c38747bfc042c7eb014bb67fb76e80f794
Git Commit c0669906 Branch pull/691/merge Document 105/3,880 ++ 4 --
achidlow puya
chore: compile all
Git Commit 3dcf14e4 Branch fix/div-identity-fold-divzero Document 44/298 ++ 604 --
achidlow puya
fix: remove x // x identity fold for uint64 and biguint
The `a == b` identity match for `div_floor` and `div_floor_bytes` folded
`x // x` to `1`, but this is only valid when `x != 0`. Since the AVM
panics on division by zero, the fold silently eliminates a runtime
error.
Git Commit 59d93306 Branch fix/div-identity-fold-divzero Document 2/42 ++ 4 --
achidlow puya
test: add regression tests for x // x identity fold miscompilation
Both the uint64 and biguint intrinsic simplification paths fold `x // x`
to `1` unconditionally, without considering that `x` may be zero.

The AVM panics on division by zero, so the fold silently eliminates
a runtime error: calling self_div(0) returns 1 instead of halting.

The incorrect optimization is visible in the destructured IR where the
subroutine body is reduced to `return 1u` / `return 1b` regardless of
the argument. The on-chain tests fail at -O1 and -O2 (where the fold
triggers) but pass at -O0 (where the division is preserved).
Git Commit 7a61f0d3 Branch fix/div-identity-fold-divzero Document 107/4,144 ++ 0 --
achidlow puya
Merge df8a62a8b0be5d2d850aeb32a38f2302cb4d782d into 5f3112c38747bfc042c7eb014bb67fb76e80f794
Git Commit b53a0bb6 Branch pull/689/merge Document 55/1,294 ++ 1 --
achidlow puya
chore: compile all
Git Commit df8a62a8 Branch fix/biguint-constant-fold-divzero Document 40/2,198 ++ 62 --
achidlow puya
fix: guard biguint constant-fold floor division against zero divisor
The constant-folding branch for div_floor_bytes had no guard against a
zero divisor, crashing the compiler with a ZeroDivisionError. Now
guarded with `if b_const != 0`, matching the existing mod_bytes case.
Git Commit 302e8622 Branch fix/biguint-constant-fold-divzero Document 2/41 ++ 1 --
achidlow puya
test: add regression test for BigUInt constant fold division by zero
The intrinsic simplifier attempts to constant-fold BigUInt floor division
without guarding against a zero divisor, crashing the compiler with a
Python ZeroDivisionError.

compilation at -O1/-O2 crashes with:
  ZeroDivisionError: division by zero
Git Commit 05370a4f Branch fix/biguint-constant-fold-divzero Document 15/571 ++ 1,454 --
achidlow puya
Merge 3977de847fb0090aaf56b310f5df23ffd8672825 into 5f3112c38747bfc042c7eb014bb67fb76e80f794
Git Commit 0d77257c Branch pull/687/merge Document 58/1,476 ++ 2 --
achidlow puya
chore: compile all
Git Commit 3977de84 Branch fix/biguint-large-constant-crash Document 43/1,110 ++ 0 --
achidlow puya
fix: handle BigUInt constants exceeding 64 bytes in intrinsic simplification
Remove the assertion in biguint_bytes_eval that crashes on >64 byte
values. Instead, _get_biguint_constant now returns None for the integer
value when the bytes constant exceeds 64 bytes, preventing constant
folding while still allowing valid IR to flow through.
Git Commit 0797c32b Branch fix/biguint-large-constant-crash Document 3/47 ++ 2 --
achidlow puya
Merge b1d74932936ac856060a1cbcb251a95328c0c077 into 5f3112c38747bfc042c7eb014bb67fb76e80f794
Git Commit e5ef9dd7 Branch pull/687/merge Document 57/1,434 ++ 2 --
achidlow puya
fix: handle BigUInt constants exceeding 64 bytes in intrinsic simplification
Remove the assertion in biguint_bytes_eval that crashes on >64 byte
values. Instead, _get_biguint_constant now returns None for the integer
value when the bytes constant exceeds 64 bytes, preventing constant
folding while still allowing valid IR to flow through.
Git Commit 8c20b933 Branch fix/biguint-large-constant-crash Document 2/5 ++ 2 --
achidlow puya
chore: compile all
Git Commit b1d74932 Branch fix/biguint-large-constant-crash Document 43/1,110 ++ 0 --
achidlow puya
test: add regression test for large BigUInt constant crash
BigUInt constants that exceed 64 bytes (e.g. 2**512) cause an
AssertionError in biguint_bytes_eval during intrinsic simplification.

The crash is triggered when a first constant fold produces a >64 byte
result, and a subsequent optimization pass attempts to simplify a
binary op using that result.

compilation at -O1/-O2 crashes with:
  AssertionError: Biguints must be 64 bytes or less
Git Commit 183fec00 Branch fix/biguint-large-constant-crash Document 12/319 ++ 0 --
Merge 8b9a96f0157a10b8fce00b21755659f909a36470 into 97eab87fc40a86b9e9fae6259e442f7b9fbe4a4b
Git Commit 4044884e Branch pull/124/merge Document 14/1,587 ++ 88 --
refactor: use instanceof to check if a value is LocalState or LocalMap
Git Commit 8b9a96f0 Branch global-local-map-support Document 4/96 ++ 42 --
iglosiggio puya
Merge 16dbeb811ba0136b2d41e80ee29b15c38f9ea8a2 into 5f3112c38747bfc042c7eb014bb67fb76e80f794
Git Commit c61788a6 Branch pull/623/merge Document 75/16,896 ++ 39 --
renovate[bot] use-wallet
Merge 32fa1ea1d7667fa3a644db7bb178c7de191e20f3 into 5073ca134b7c4c5721fcfbe976d5c364a5cc777a
Git Commit e23220a9 Branch pull/421/merge Document 15/1,585 ++ 1,225 --
renovate[bot] use-wallet
chore(deps): update non-major dependencies
Git Commit 32fa1ea1 Branch renovate/non-major-dependencies Document 15/1,585 ++ 1,225 --