diff --git a/CHANGELOG.md b/CHANGELOG.md index db94c6a773..6a0621ab07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,17 @@ The sections do not signal obligations; the prefixes do. ## Unreleased +### Changed + +- The description of the resize forms (`~sized`, `~wordsized`) said that + their left-side padding and truncation match how Solidity resizes both + `bytesN` and `uintN`. That holds only for `uintN`. Solidity pads and + truncates `bytesN` on the right. The description now says so ([#402]). + - Schemas: **ethdebug/format/pointer/expression** + - Producers: no change needed. The resize forms work as before. To pad a + `bytesN` value on the right, concatenate it with zero bytes (`~concat`). + - Consumers: no change needed. The evaluation rules did not change. + ## 0.1.0-draft.2 — 2026-10-07 ### Changed @@ -720,3 +731,4 @@ First published version of the specification. [#318]: https://github.com/ethdebug/format/pull/318 [#323]: https://github.com/ethdebug/format/pull/323 [#325]: https://github.com/ethdebug/format/pull/325 +[#402]: https://github.com/ethdebug/format/pull/402 diff --git a/schemas/pointer/expression.schema.yaml b/schemas/pointer/expression.schema.yaml index 4c60f717e3..d7b8318dca 100644 --- a/schemas/pointer/expression.schema.yaml +++ b/schemas/pointer/expression.schema.yaml @@ -310,8 +310,9 @@ $defs: as `` but with a number of bytes removed from the left (most significant) side until the bytes width equals ``. - (These cases match the behavior that Solidity uses for resizing its - `bytesN`/`uintN` types.) + (These cases match how Solidity converts between `uintN` types. + Solidity converts between `bytesN` types the other way: it pads and + truncates on the right.) type: object oneOf: - title: Resize to literal number of bytes