-
Notifications
You must be signed in to change notification settings - Fork 276
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
feat(worker): pipeline block building #735
Conversation
c6d6f0d
to
f98b830
Compare
717b196
to
0e7fde1
Compare
I'm worried that this PR will make "sync (future) l2geth upstream" difficult. |
I believe we can just call this version of the |
0e7fde1
to
2d95957
Compare
ran some benchmarks against the recent mainnet blocks; |
great, can we do it this style in this PR? |
Sure, will do 👍 |
Re-ran the test against the blocks from this morning
avg speed up is 1.726 now. |
if we keep |
cd45b5b
to
ded36a2
Compare
Done. |
ded36a2
to
f55be2a
Compare
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
From what I can see, the most notable change in that PR is moving the local channels to Pipeline scope. I kinda like that they are local to the stage functions because it signifies that the owners of those channels are the respective stages, not the pipeline itself. It makes reasoning about how stages interact with each other easier and disallows accidentally interacting with the channels from outside of the stages. |
I didn't read the code. Yet you add 900 lines of code (scroll_worker.go) and deletes 300 lines of testing code (scroll_worker_test.go). How can we make sure the newly added code are well tested? |
Deleted tests are for the features that we removed as well. Newly added code directly plugs in to the paths that existing tests cover, so from the callers perspective, behaviour of worker stays the same. |
This pipelines tracing and CCC checks, aiming to reduce the effective transaction processing delay.
Currently txn processing delay is roughly
tracing_time + ccc_time
. With a pipelined approach, this delay becomesmax(tracing_time, ccc_time)
. Considering thattracing_time
andccc_time
is pretty similar for an average mainnet transaction, this should cut our block building time almost in half.