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

Make logs hash and not logs part of block hash preimage #3412

Closed
benesjan opened this issue Nov 23, 2023 · 1 comment · Fixed by #4286
Closed

Make logs hash and not logs part of block hash preimage #3412

benesjan opened this issue Nov 23, 2023 · 1 comment · Fixed by #4286

Comments

@benesjan
Copy link
Contributor

benesjan commented Nov 23, 2023

Motivation

There is an an issue with L2Block.getTxs(). It throws when it's called on a block which does not have attached logs and the reason is that the L2Tx type which is returned tries to compute block hash and logs are part of block hash preimage. Since we serve blocks without logs this is a common issue.

Solution

Refactor L2Block type such that it always contains encrypted and unencrypted logs hashes. Make these logs hashes part of the block hash preimage instead of the logs themselves.

@benesjan benesjan changed the title Make logs_hash and not logs part of block hash preimage Make logs hash and not logs part of block hash preimage Nov 23, 2023
@benesjan
Copy link
Contributor Author

benesjan commented Jan 31, 2024

No longer necessary with #4286 because block hash is now a hash of header.

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 a pull request may close this issue.

1 participant