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

op-supervisor: encode full hashes #12071

Merged
merged 1 commit into from
Sep 23, 2024
Merged

op-supervisor: encode full hashes #12071

merged 1 commit into from
Sep 23, 2024

Conversation

protolambda
Copy link
Contributor

@protolambda protolambda commented Sep 23, 2024

Description

This changes the op-supervisor DB format to be more secure and more convenient:

  • Truncated hashes have a lot at stake, truncating to 20 bytes is possible but not ideal. See EIP https://eips.ethereum.org/EIPS/eip-3607
  • Hashes can now be retrieved from the DB. Along with block number, timestamp, and parent hash, this allows a full block reference or head-pointer to be constructed from the DB content.

Additionally, merge the types packages of the supervisor (after removing the truncated-hash, it was just a single struct definition in a separate package otherwise)

Tests

Same tests still apply.

@protolambda protolambda requested review from a team as code owners September 23, 2024 21:36
Copy link
Contributor

@axelKingsley axelKingsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Truncated hashes have a lot at stake, truncating to 20 bytes is possible but not ideal. See EIP

Which EIP?

Changes look good,

@protolambda
Copy link
Contributor Author

@axelKingsley sorry, I forgot the EIP link. It's https://eips.ethereum.org/EIPS/eip-3607

@protolambda protolambda added this pull request to the merge queue Sep 23, 2024
Merged via the queue into develop with commit 718b9b0 Sep 23, 2024
63 checks passed
@protolambda protolambda deleted the interop-full-hashes branch September 23, 2024 22:17
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
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