-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(rpc): add eth_coinbase implementation
#1597
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| use reth_primitives::Address; | ||
|
|
||
| /// Guarantees max transactions for one sender, compatible with geth/erigon | ||
| pub(crate) const MAX_ACCOUNT_SLOTS_PER_SENDER: usize = 16; | ||
|
|
||
|
|
@@ -12,6 +14,8 @@ pub struct PoolConfig { | |
| pub queued_limit: SubPoolLimit, | ||
| /// Max number of executable transaction slots guaranteed per account | ||
| pub max_account_slots: usize, | ||
| /// The address of the pool owner. | ||
| pub coinbase: Address, | ||
|
Comment on lines
+17
to
+18
Collaborator
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. hmm I don't think this makes sense here?
Collaborator
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. I'd expect this to be part of the EthApi.
Contributor
Author
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. I understand that the coinbase would be the beneficiary or fee recipient of minted blocks, so it would be needed for execution payload building. Maybe we could make it part of |
||
| } | ||
|
|
||
| impl Default for PoolConfig { | ||
|
|
@@ -21,6 +25,7 @@ impl Default for PoolConfig { | |
| basefee_limit: Default::default(), | ||
| queued_limit: Default::default(), | ||
| max_account_slots: MAX_ACCOUNT_SLOTS_PER_SENDER, | ||
| coinbase: Default::default(), | ||
| } | ||
| } | ||
| } | ||
|
|
||
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.
hmm, I'm actually not sure if this is sound tbh, because tying coinbase to the pool does not feel right.
unsure when we'd actually need this, I guess for block building but isn't this now part of CL @rakita ?
the coinbase endpoint is also disabled on providers like infura etc.
Uh oh!
There was an error while loading. Please reload this page.
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.
Coinbase makes sense to be part of block builder but that is still not defined. Execution is building the block but CL is sending the needed parameters that are used to build the block.
Coinbase is send over EngineAPI from CL part. It is part of https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#payloadattributesv2 :
So it can be changed depending on given values from CL. Infur and providers probably disabled it because they are not mining, it was set before merge only if the node is configured as a miner (IIRC).
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.
Then, should we close this until block building is defined? Or add it as an attribute of
EthApifor now, updating it on every payload received from CL?