Closed protolambda closed 6 months ago
I'm curious what the plan is to roll this out. Is there a way we can roll this refactor out incrementally in order to reduce review burden and risk?
I'm curious what the plan is to roll this out. Is there a way we can roll this refactor out incrementally in order to reduce review burden and risk?
@mslipper I believe @protolambda presents a nice rollout plan in three phases towards the end of the proposal, where the first removes the EngineQueue, the second introduces the new pattern into the Deriver without changing underlying concurrency, and the third would then incrementally add concurrency.
I'm curious what the plan is to roll this out. Is there a way we can roll this refactor out incrementally in order to reduce review burden and risk?
@mslipper I believe @protolambda presents a nice rollout plan in three phases towards the end of the proposal, where the first removes the EngineQueue, the second introduces the new pattern into the Deriver without changing underlying concurrency, and the third would then incrementally add concurrency.
A POC implementation also hid the new logic behind a flag and kept the old logic such that its possible to incrementally roll out the software to production, ie we run some nodes that opt into the new code and then after being sure that its safe we can eventually remove the old code
Alignment on:
EngineQueue
situation first.Aware of:
derive
package into the driver
package,
unless not used by Fault-Proofs, should be either synchronous or have a simple synchronous alternative.Contention on:
Confusion on: the exact usage of Resource
/ OnEvent
:
Resource
an Inbox
?Message
?The Resource worker is essentially a router/prioritizer here? This helps explain my earlier confusion about the relationship between Resources and Workers a bit.
Are there any cases where work has multiple contentious Resources that aren't managed by just a single Resource worker?
It would be good to avoid having to have a interop+derive, interop+fp, altda+derive, altda+fp kind of stacks. So I think we want to decouple how message passing happens from where the message is handled (which this part implies but doesn't seem to fit with some of the stuff above).
I'm unclear on how the OnEvent implementation is controlled.
Resource
is meant to signal which thread runs the OnEvent
call.
There is still only one instance of the deriver stack.It would definitely be very useful to have a clear set of threading expectations around event handling. For example does OnEvent have to be handled synchronously or could it be async? Is that deriver dependent?
OnEvent
should maybe be renamed,
it's meant as a standard interface, such that derivers are all compatible and easy to wrap.Deriver
interface allows any component to be composed as a target for events to be emitted into.Proposal:
type Emitter interface {
EmitEvent(event *Event, dest Deriver)
}
Resource
to something that better describes "thread concerned with single L1 or L2 block-tag label".
Description
Design doc for refactor of the Driver/Derivation in op-node, and introduction of "Deriver" to make the core chain validation processes of the rollup-node more extensible. This supports new projects such as interop by providing cleaner abstractions for major new functionality.