Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong assumption of auxdata being at the end of the creation bytecode #1246

Open
kuzdogan opened this issue Jan 4, 2024 · 0 comments
Open

Comments

@kuzdogan
Copy link
Member

kuzdogan commented Jan 4, 2024

Related to #851 when matching with the creation bytecode, we are assuming the bytecode has the auxdata at the end of the contract when doing splitAuxdata. E.g.:

const [trimmedRecompiledCreationBytecode] = splitAuxdata(
recompiledCreationBytecode
);

This does not cause a bug as splitAuxdata will return the original bytecode if it fails to find the CBOR part and the verification will fail again.

Instead we should use the findAuxdataPositions function we created to find the positions by recompiling, and not assume

  1. There's only 1 CBOR auxdata in the bytecode
  2. It's appended at the end of the creation bytecode.

View in Huly HI-489

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

No branches or pull requests

1 participant