Skip to content

Always serialize block with logs #4635

Description

@benesjan

Currently we have 2 ways to serialize a block: with and without logs. This is violating the toBuffer, fromBuffer API which we use all around the codebase as you now need to pass a separate param (withLogs: bool).

Originally this was setup this way because the idea was that nodes would fetch blocks without logs and then use some form of note discovery scheme to get the relevant encrypted logs. This is turning out to be an example of premature optimization and currently it's making the code ugly while it is questionable whether the non-log serving mode would ever be used and needed - end users will most likely just run a "super light client" (get archive root from Rollup contract on L1, fetch header with merkle proof from nodes, verify the merkle proof and then get the notes and note sibling paths from some note discovery service).

The objective of this task is to remove the 2 ways of serializing a block (I am of an opinion that in general when we have 2 ways of serializing an object we are most likely doing something wrong (maybe have 2 different types) and the code is turning out to be brittle (what kind of buffer have I received? with or without logs?)).

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions