op-node: Switch L1 Retrieval to pull based#3584
Conversation
|
|
This PR changes implementation code, but doesn't include a changeset. Did you forget to add one? |
1ba4295 to
b470568
Compare
|
Tests are failing at the check changed script. I think it's because it's not pointing to develop as the base commit. |
This makes the L1 Retrieval a purely pull based stage. This commit required large modifications to the channel bank stage in order for the channel bank to maintain it's own progress.
7c741f8 to
fe78c14
Compare
b470568 to
5aa961d
Compare
|
|
||
| // NewChannelBank creates a ChannelBank, which should be Reset(origin) before use. | ||
| func NewChannelBank(log log.Logger, cfg *rollup.Config, next ChannelBankOutput) *ChannelBank { | ||
| func NewChannelBank(log log.Logger, cfg *rollup.Config, next ChannelBankOutput, prev *L1Retrieval) *ChannelBank { |
There was a problem hiding this comment.
Will focus on the retrieval code for this PR, the channel bank can change later. But would be nice to separate each stage by interface instead of concrete types.
There was a problem hiding this comment.
fyi the channel bank takes an interface rather than a concrete type in the next PR
This again requires a fair amount of changes to channel_in_reader.go for the channel in reader to maintain its progress state.
Like the rest of the changes, this also required modifications to the next stage - the batch queue in order for it to manage the progress API. This commit required even more changes than usual. I changed the pipeline to be reset to a common starting point and now use the L2SafeHead block to filter out adding batches & L1 blocks to the batch queue.
The attributes queue actually had pretty few modifications to work with the progress API. The logic of switching the batch queue over was a bit more complex because the batch queue is very stateful, but still not the worst.
The progress API is very nearly removed from the engine queue stage.
op-node: Switch batch queue to be pull based
op-node: Switch channel bank and channel in reader to a pull based stage
Description
This makes the L1 Retrieval a purely pull based stage. This commit required large modifications to the channel bank stage in order for the channel bank to maintain its own progress.
Tests
L1 Retrieval unit tests pass. I skipped the channel bank unit tests & fixed them up in the next PR (would have been lots of extra work to fix them twice).
Metadata