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

Serialize L1 block numbers as hex strings #1534

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sveitser
Copy link
Collaborator

  • Add newtype for L1 block number.
  • Implement serialization in backwards compatible manner. Although there is currently no test for this backwards compatibility.
  • Don't ignore "actual" files created from reference tests.
  • Remove "actual" files for successful tests, if they exist.

After implementing this and looking at the JSON file I'm now of the opinion that we should throw the compatibility with L1 away. It looks rather messy and I don't see what we really gain from it. I now think we should just serialize everything in the way we think is best, most pretty or whatever.

Close #1507

- Add newtype for L1 block number.
- Implement serialization in backwards compatible manner. Although there
  is currently no test for this backwards compatibility.
- Don't ignore "actual" files created from reference tests.
- Remove "actual" files for successful tests, if they exist.

After implementing this and looking at the JSON file I'm now of the
opinion that we should throw the compatibility with L1 away. It looks
rather messy and I don't see what we really gain from it. I now think we
should just serialize everything in the way we think is best, most
pretty or whatever.

Close #1507
@sveitser
Copy link
Collaborator Author

So what I'm saying is we should keep the new L1 block number type but actually serialize L1 block numbers as JSON number like our height, L1 timestamp like our timestamp. I think it's more important that our header serialization is internally consistent instead of L1 derived data being consistent with L1.

@sveitser sveitser marked this pull request as draft May 31, 2024 14:18
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.

Follow up work on JSON number serialization
1 participant