-
Notifications
You must be signed in to change notification settings - Fork 111
feat(l1)!: allow setting a target gas limit through CLI #4973
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3874c66
feat(l1): allow setting a target gas limit
MegaRedHand 9fb22ce
Merge branch 'main' into set-gas-limit
MegaRedHand f87fe21
refactor: change gas limit to show the default
MegaRedHand d294577
docs: update CLI reference
MegaRedHand 510f969
refactor: rename namespace to `builder`
MegaRedHand 42327cf
Merge branch 'main' into set-gas-limit
MegaRedHand 97d1a9b
Merge branch 'main' into set-gas-limit
MegaRedHand 8cea037
Merge branch 'main' into set-gas-limit
MegaRedHand File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,7 +130,7 @@ pub fn init_blockchain(store: Store, blockchain_opts: BlockchainOptions) -> Arc< | |
| Blockchain::new(store, blockchain_opts).into() | ||
| } | ||
|
|
||
| #[allow(clippy::too_many_arguments)] | ||
| #[expect(clippy::too_many_arguments)] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :agite: |
||
| pub async fn init_rpc_api( | ||
| opts: &Options, | ||
| peer_handler: PeerHandler, | ||
|
|
@@ -141,8 +141,6 @@ pub async fn init_rpc_api( | |
| cancel_token: CancellationToken, | ||
| tracker: TaskTracker, | ||
| log_filter_handler: Option<reload::Handle<EnvFilter, Registry>>, | ||
| gas_ceil: Option<u64>, | ||
| extra_data: String, | ||
| ) { | ||
| init_datadir(&opts.datadir); | ||
|
|
||
|
|
@@ -182,8 +180,8 @@ pub async fn init_rpc_api( | |
| peer_handler, | ||
| get_client_version(), | ||
| log_filter_handler, | ||
| gas_ceil, | ||
| extra_data, | ||
| opts.gas_limit, | ||
| opts.extra_data.clone(), | ||
| ); | ||
|
|
||
| tracker.spawn(rpc_api); | ||
|
|
@@ -463,9 +461,6 @@ pub async fn init_l1( | |
| cancel_token.clone(), | ||
| tracker.clone(), | ||
| log_filter_handler, | ||
| // TODO (#4482): Make this configurable. | ||
| None, | ||
| opts.extra_data.clone(), | ||
| ) | ||
| .await; | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this? Isn't the default gas ceil different depending on the fork? I understand if you want to overwrite it but, isnt the default different for each fork?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The default gas limit is set by each client independently of the network. For example, geth currently has a default of 60M:
https://github.com/ethereum/go-ethereum/blob/6608a2aafd3603afe59f95fa7b2a8ec00b8eaa19/miner/miner.go#L54-L55
I think we should bump this default to 60M, but I didn't change that in this PR since it's important enough to merit its own PR and discussion.