You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a non-first frame (i.e., a frame with index >0) decoded from a batcher transaction is out of order, it is immediately dropped, where the frame is called out of order if
its frame number is not the previous frame's plus one, if it has the same channel ID, or
the previous frame already closed the channel with the same ID, or
the non-first frame has a different channel ID than the previous frame in the frame queue.
If a first frame is decoded while the previous frame isn't a last frame (i.e., is_last is false), all previous frames for the same channel are dropped and this new first frame remains in the queue.
These changes must be added to the FrameQueue stage in kona-derive, with backwards-compatibility.
Output
Add out-of-order changes to the FrameQueue after parsing frames. This should be placed within a branch that is hit if holocene is active. Use RollupConfig::is_holocene_active.
Out of order validation rules:
Since the Frame queue is empty, the start of the frame array can trimmed while the frame number is non-zero, effectively dropping the frames. Add a metric to record the number of dropped frames due to out of order frame number.
Validate the channel ids are strictly ordered, dropping and metricing out of order frames.
Validate frames are not present with already-closed channels.
Add a validation rule for when the first frame is decoded while the previous channel is open, drop all previous frames and start with the current channel.
Alternatively, we can place the validation rules within the Frame type impl in op-alloy such that in the FrameQueue we could write the following, where Frames is a wrapper type around Vec<Frame>.
Description
Warning
It is highly encouraged to read the specs prior to working on this implementation.
As part of Strict Batch Ordering, the frame-queue must be modified with the following constraints:
These changes must be added to the
FrameQueue
stage inkona-derive
, with backwards-compatibility.Output
Add out-of-order changes to the FrameQueue after parsing frames. This should be placed within a branch that is hit if holocene is active. Use
RollupConfig::is_holocene_active
.Out of order validation rules:
Add a validation rule for when the first frame is decoded while the previous channel is open, drop all previous frames and start with the current channel.
For reference, the
Frame
type lives in op-alloy.Alternatively, we can place the validation rules within the
Frame
typeimpl
inop-alloy
such that in theFrameQueue
we could write the following, whereFrames
is a wrapper type aroundVec<Frame>
.The text was updated successfully, but these errors were encountered: