Skip to content

Fix signature hashing for long error and event names - #1592

Merged
sbillig merged 1 commit into
masterfrom
fix/uniswap-long-error-event-names
Sep 24, 2026
Merged

sbillig merged 1 commit into
masterfrom
fix/uniswap-long-error-event-names

Conversation

@cburgdorf

Copy link
Copy Markdown
Collaborator

Fix compilation of errors and events with long names by splitting their generated signature strings into supported chunks.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T05:52:22.472161Z 04baed1 PR opened
🔒 Security Review ✅ Completed 2026-09-24T05:53:41.459104Z 04baed1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cburgdorf
cburgdorf requested a review from sbillig September 24, 2026 15:02
@sbillig
sbillig merged commit 0ba9bd4 into master Sep 24, 2026
9 checks passed
@sbillig
sbillig deleted the fix/uniswap-long-error-event-names branch September 24, 2026 16:23
micahscopes added a commit that referenced this pull request Sep 25, 2026
…ages

The `#[error]` desugaring kept its own copies of the `#[event]` signature
constant and of the `msg` `AbiSize` and `Encode` impl builders, so each
fix had to be made twice: #1516 nested long `TOPIC0` tuples for events
only, and #1592 added name chunking to both signature builders and
tuple nesting to the `#[error]` one.

Build both signature constants with one function, which takes the
callee and the constant's name and type, and let errors use the `msg`
impl builders, which now take the record type and its fields. The old
`#[error]` selector builder and impl builders are deleted. An error's
`SELECTOR` now names each field type as
`<T as std::abi::SolCompat>::SOL_TYPE`, as `TOPIC0` does. Events and
messages lower exactly as before.

Add tests that an error with 8 fields reverts with the Solidity
selector of its signature, and that the 7- and 8-field selectors
evaluate to the `cast sig` values; nothing covered an error signature
long enough to need nesting.
micahscopes added a commit that referenced this pull request Sep 26, 2026
…ages

The `#[error]` desugaring kept its own copies of the `#[event]` signature
constant and of the `msg` `AbiSize` and `Encode` impl builders, so each
fix had to be made twice: #1516 nested long `TOPIC0` tuples for events
only, and #1592 added name chunking to both signature builders and
tuple nesting to the `#[error]` one.

Build both signature constants with one function, which takes the
callee and the constant's name and type, and let errors use the `msg`
impl builders, which now take the record type and its fields. The old
`#[error]` selector builder and impl builders are deleted. An error's
`SELECTOR` now names each field type as
`<T as std::abi::SolCompat>::SOL_TYPE`, as `TOPIC0` does. Events and
messages lower exactly as before.

Add tests that an error with 8 fields reverts with the Solidity
selector of its signature, and that the 7- and 8-field selectors
evaluate to the `cast sig` values; nothing covered an error signature
long enough to need nesting.
micahscopes added a commit that referenced this pull request Sep 27, 2026
…ages

The `#[error]` desugaring kept its own copies of the `#[event]` signature
constant and of the `msg` `AbiSize` and `Encode` impl builders, so each
fix had to be made twice: #1516 nested long `TOPIC0` tuples for events
only, and #1592 added name chunking to both signature builders and
tuple nesting to the `#[error]` one.

Build both signature constants with one function, which takes the
callee and the constant's name and type, and let errors use the `msg`
impl builders, which now take the record type and its fields. The old
`#[error]` selector builder and impl builders are deleted. An error's
`SELECTOR` now names each field type as
`<T as std::abi::SolCompat>::SOL_TYPE`, as `TOPIC0` does. Events and
messages lower exactly as before.

Add tests that an error with 8 fields reverts with the Solidity
selector of its signature, and that the 7- and 8-field selectors
evaluate to the `cast sig` values; nothing covered an error signature
long enough to need nesting.
micahscopes added a commit that referenced this pull request Sep 29, 2026
…ages

The `#[error]` desugaring kept its own copies of the `#[event]` signature
constant and of the `msg` `AbiSize` and `Encode` impl builders, so each
fix had to be made twice: #1516 nested long `TOPIC0` tuples for events
only, and #1592 added name chunking to both signature builders and
tuple nesting to the `#[error]` one.

Build both signature constants with one function, which takes the
callee and the constant's name and type, and let errors use the `msg`
impl builders, which now take the record type and its fields. The old
`#[error]` selector builder and impl builders are deleted. An error's
`SELECTOR` now names each field type as
`<T as std::abi::SolCompat>::SOL_TYPE`, as `TOPIC0` does. Events and
messages lower exactly as before.

Add tests that an error with 8 fields reverts with the Solidity
selector of its signature, and that the 7- and 8-field selectors
evaluate to the `cast sig` values; nothing covered an error signature
long enough to need nesting.
micahscopes added a commit that referenced this pull request Sep 30, 2026
…ages

The `#[error]` desugaring kept its own copies of the `#[event]` signature
constant and of the `msg` `AbiSize` and `Encode` impl builders, so each
fix had to be made twice: #1516 nested long `TOPIC0` tuples for events
only, and #1592 added name chunking to both signature builders and
tuple nesting to the `#[error]` one.

Build both signature constants with one function, which takes the
callee and the constant's name and type, and let errors use the `msg`
impl builders, which now take the record type and its fields. The old
`#[error]` selector builder and impl builders are deleted. An error's
`SELECTOR` now names each field type as
`<T as std::abi::SolCompat>::SOL_TYPE`, as `TOPIC0` does. Events and
messages lower exactly as before.

Add tests that an error with 8 fields reverts with the Solidity
selector of its signature, and that the 7- and 8-field selectors
evaluate to the `cast sig` values; nothing covered an error signature
long enough to need nesting.
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.

2 participants