-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[batcher] derive.ChannelOut factory #12344
Merged
geoknee
merged 6 commits into
ethereum-optimism:develop
from
mdehoog:michael/channel-out-factory
Oct 11, 2024
Merged
[batcher] derive.ChannelOut factory #12344
geoknee
merged 6 commits into
ethereum-optimism:develop
from
mdehoog:michael/channel-out-factory
Oct 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30c299d
to
a085671
Compare
45c33f5
to
dd7d92b
Compare
geoknee
approved these changes
Oct 11, 2024
Merged
via the queue into
ethereum-optimism:develop
with commit Oct 11, 2024
5c1e198
58 checks passed
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #12344 +/- ##
===========================================
- Coverage 64.48% 64.29% -0.19%
===========================================
Files 52 52
Lines 4361 4361
===========================================
- Hits 2812 2804 -8
- Misses 1373 1382 +9
+ Partials 176 175 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
samlaf
pushed a commit
to samlaf/optimism
that referenced
this pull request
Nov 10, 2024
* Add support for a derive.ChannelOut factory * Add DriverSetupOption for injecting custom options into the DriverSetup * Remove factory from NewChannelManager and NewChannelBuilder * Add ChannelOut factory test * Add comment about why we use a wrapper
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
(Follow up of #12045 and #12079. Replacement of #12337, which would also solve our problem although somewhat more verbosely, so let me know which one is preferred.)
Adds the ability to customize the
derive.ChannelOut
using a factory. Changes made:NewChannelBuilderWithChannelOut
that accepts aderive.ChannelOut
as a parameter rather than creating them internally.newChannel
now accepts aderive.ChannelOut
(and no longer has an error return value)ChannelManager
has a newSetChannelOutFactory
method that lets you set thederive.ChannelOut
factoryDriverSetup
contains aChannelOutFactory
that is passed to the channel manager. This can be set with a newDriverSetupOption
hook that is passed to theBatcherServiceFromCLIConfig
, which allows customization of the batcher channel out without much code duplication.Tests
Added a small factory test and updated other tests.
Additional context
This allows the L3 project to customize the ChannelOut implementation, which allows us to immediately batch when withdrawals are generated (for faster withdrawals).
Here's an example: https://github.com/mdehoog/op-enclave/blob/main/op-batcher/batcher/batch_submitter.go#L32-L35