Skip to content

Conversation

arnetheduck
Copy link
Member

In order to avoid unnecessary Forky/Forked transitions and reduce the risk for block / blob / column / fork confusion, this PR simplifies the block processor to predominantly work with Forky types and sidecars typed accordingly.

To achieve this, the AsyncQueue is replaced with AsyncLock that ends up working in a similar way for the given use case, ie both maintain a list of pending work - the advantage of AsyncLock is that we don't have to make extra copies of the block and instead queue the in-flight future (and its closure context where the block lives) inside the lock.

Apart from the performance and memory usage benefits of not having to make so many copies along the call chain, this also reduces the risk of sidecar type contamination across different forks.

In order to avoid unnecessary `Forky`/`Forked` transitions and reduce
the risk for block / blob / column / fork confusion, this PR simplifies
the block processor to predominantly work with `Forky` types and
sidecars typed accordingly.

To achieve this, the `AsyncQueue` is replaced with `AsyncLock` that ends
up working in a similar way for the given use case, ie both maintain a
list of pending work - the advantage of `AsyncLock` is that we don't
have to make extra copies of the block and instead queue the in-flight
future (and its closure context where the block lives) inside the lock.

Apart from the performance and memory usage benefits of not having to
make so many copies along the call chain, this also reduces the risk of
sidecar type contamination across different forks.
Copy link

Unit Test Results

       15 files  ±0    3 020 suites  ±0   1h 29m 27s ⏱️ + 16m 20s
12 040 tests ±0  11 474 ✔️ ±0  566 💤 ±0  0 ±0 
76 291 runs  ±0  75 459 ✔️ ±0  832 💤 ±0  0 ±0 

Results for commit cc6daee. ± Comparison against base commit 1ebb3ec.

@tersec tersec merged commit 9a9cee4 into unstable Oct 2, 2025
12 checks passed
@tersec tersec deleted the block-proc branch October 2, 2025 10:07
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.

2 participants