Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

chore(derive): [Holocene] Drain previous channel in one iteration#583

Merged
refcell merged 5 commits intomainfrom
cl/clean-fq
Sep 30, 2024
Merged

chore(derive): [Holocene] Drain previous channel in one iteration#583
refcell merged 5 commits intomainfrom
cl/clean-fq

Conversation

@clabby
Copy link
Contributor

@clabby clabby commented Sep 28, 2024

Overview

Drains the entire previous channel at one time, rather than over multiple iterations, if the following case is met:

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.

Also fixes a small issue w/ the DERIVED_FRAMES_COUNT metric's accounting, where it was counting dropped frames.

Tests

Added a new test for this functionality, when there is a valid, closed channel earlier on in the frame queue @ test_holocene_replace_channel.

Copy link
Contributor Author

clabby commented Sep 28, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @clabby and the rest of your teammates on Graphite Graphite

@clabby clabby self-assigned this Sep 28, 2024
@clabby clabby added A-proof Area: proof crates K-fix Kind: fix labels Sep 28, 2024
@codecov
Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.3%. Comparing base (d5e7038) to head (f826bfd).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@clabby clabby changed the title fix(derive): Holocene channel replacement chore(derive): [Holocene] Drain previous channel in one iteration Sep 28, 2024
@clabby clabby added the W-holocene Workstream: Holocene label Sep 28, 2024
Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

The logic makes sense to me and I like the short variable rename to prev_frame and next_frame - much clearer.

I would like to verify that it passes tests that cover the sad path ruleset where frames with differing channels are interleaved in #585.

Maybe we can merge #585 and then rebase this on-top?

@refcell refcell added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 3b5499c Sep 30, 2024
This was referenced Sep 30, 2024
@github-actions github-actions bot mentioned this pull request Oct 19, 2024
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
…-rs/kona#583)

* fix(derive): Holocene frame queue drain

* lint

* fix: bad rebase

* fix: bad rebase

---------

Co-authored-by: refcell <abigger87@gmail.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
…-rs/kona#583)

* fix(derive): Holocene frame queue drain

* lint

* fix: bad rebase

* fix: bad rebase

---------

Co-authored-by: refcell <abigger87@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-proof Area: proof crates K-fix Kind: fix W-holocene Workstream: Holocene

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants