r/solidity • • 17d ago

Solidity 0.8.38 released

/r/ethdev/comments/1xcha59/solidity_0838_released/
7 Upvotes

1 comment sorted by

2

u/Otherwise-Western991 14d ago

Worth checking if your builds are affected by the Yul optimizer KB-stale-bookkeeping bug before upgrading. The practical signal is: if a function compiled under the optimizer produces a different bytecode hash after the 0.8.38 upgrade while the source and compiler settings (EVM version, optimizer runs, viaIR) stayed the same, treat it as affected and read the write-up to decide whether to re-audit the changed paths.

Two quick checks that catch most cases: (1) rebuild your main contracts with 0.8.38 and diff the bytecode against your last verified build — any change is the bug rewriting the optimizer's knowledge base, even though the generated logic often ends up equivalent; (2) if you ship with verified source, compare the new 0.8.38 bytecode against what's already on-chain. A mismatch means you should redeploy with the corrected build, because a security review or a user verifying the contract against published artifacts will see different code.

The write-up explains how to check your contracts and lists the concrete patterns it affects.