Merged
Conversation
refcell
reviewed
Dec 3, 2024
Comment on lines
+140
to
+141
| #[cfg_attr(not(feature = "client"), rpc(server, namespace = "miner"))] | ||
| #[cfg_attr(feature = "client", rpc(server, client, namespace = "miner"))] |
Collaborator
There was a problem hiding this comment.
Curious, is it destructive to do the following instead?
Suggested change
| #[cfg_attr(not(feature = "client"), rpc(server, namespace = "miner"))] | |
| #[cfg_attr(feature = "client", rpc(server, client, namespace = "miner"))] | |
| #[rpc(server, namespace = "miner")] | |
| #[cfg_attr(feature = "client", rpc(client))] |
Member
Author
There was a problem hiding this comment.
iirc this didn't quite work, but can't remember specifics
refcell
approved these changes
Dec 3, 2024
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 17, 2024
<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below. Bug fixes and new features should include tests. Contributors guide: https://github.com/alloy-rs/core/blob/main/CONTRIBUTING.md The contributors guide includes instructions for running rustfmt and building the documentation. --> <!-- ** Please select "Allow edits from maintainers" in the PR Options ** --> ## Motivation op batcher prints error `ERROR[12-17|18:17:23.568] Result of SetMaxDASize was false, retrying.` command for op-bathcer ```shell op-batcher \ --l2-eth-rpc=http://localhost:8545 \ --rollup-rpc=http://localhost:9545 \ --poll-interval=1s \ --sub-safety-margin=6 \ --num-confirmations=1 \ --safe-abort-nonce-too-low-count=3 \ --resubmission-timeout=30s \ --rpc.addr=0.0.0.0 \ --rpc.port=8548 \ --rpc.enable-admin \ --max-channel-duration=25 \ --l1-eth-rpc=$L1_RPC_URL \ --private-key=$GS_BATCHER_PRIVATE_KEY ``` golang implementation of optimism's op-geth [returns bool](https://github.com/ethereum-optimism/op-geth/blob/optimism/eth/api_miner.go#L62) type for `miner_setMaxDASize` call. Therefore, expected response might be like following: ```json { "jsonrpc": "2.0", "id": 0, "result": true } ``` On the other hand, current trait [returns `()`](https://github.com/alloy-rs/op-alloy/blob/main/crates/rpc-jsonrpsee/src/traits.rs#L146), represents null for json. ```rust pub trait MinerApiExt { /// Sets the maximum data availability size of any tx allowed in a block, and the total max l1 /// data size of the block. 0 means no maximum. #[method(name = "setMaxDASize")] async fn set_max_da_size(&self, max_tx_size: U64, max_block_size: U64) -> RpcResult<()>; // should return bool } ``` ```json { "jsonrpc": "2.0", "id": 0, "result": null } ``` ref: #325, #345 ## Solution alter `()` to `bool` for return type ```rust async fn set_max_da_size(&self, max_tx_size: U64, max_block_size: U64) -> RpcResult<bool>; ``` ## PR Checklist - [ ] Added Tests - [ ] Added Documentation - [x] Breaking changes
theochap
pushed a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 21, 2026
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
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.
ref
paradigmxyz/reth#13092
and
https://github.com/ethereum-optimism/op-geth/blob/0a46245ccc5c801e7b18c258aceb5327d8ad69ad/eth/api_miner.go#L60-L62