eth_coinbase impl#1896
eth_coinbase impl#1896sambukowski wants to merge 1 commit intoparadigmxyz:mainfrom astriaorg:sam/eth_coinbase
eth_coinbase impl#1896Conversation
|
I think we may wanna move this to the Consensus Engine that will eventually also control the builder? #1845 |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #1896 +/- ##
==========================================
- Coverage 73.12% 73.07% -0.06%
==========================================
Files 418 418
Lines 51187 51189 +2
==========================================
- Hits 37433 37408 -25
- Misses 13754 13781 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
@gakonst would it also make sense to put the impls for |
| let (_cfg_env, block_env, _block_id) = | ||
| // TODO: swap out latest block with pending block when that gets implemented | ||
| // self.evm_env_at(BlockId::Number(BlockNumberOrTag::Pending)).await?; | ||
| self.evm_env_at(BlockId::Number(BlockNumberOrTag::Latest)).await?; | ||
| Ok(block_env.coinbase) |
There was a problem hiding this comment.
eth_coinbase is only relevant in block building and is a per node setting so we can't use the latest state.
I'm not sure how this would be implemented,
ref previous attempt to implement this:
#1597 (comment)
this handler is usually also disabled, eg:
cast rpc eth_coinbase --rpc-url "https://eth-mainnet.alchemyapi.io/v2/Lc7oIGYeL_QvInzI0Wiu_pOZZDEKBrdf"
we still need impls for these endpoints. we need some kind of oracle that does some estimation re gas price, worth checking out geth's impl of this, because we should mirror how this is calculated. |
Geth's gas price oracle logic is here: https://github.com/ethereum/go-ethereum/blob/b3f43c89b3b884d5d0b8e1a239847f54a291a19b/eth/gasprice/gasprice.go#L144-L223 |
|
I'm closing this because geth supports setting a coinbase address that is returned for this endpoint but no longer used. |
Pending block still not implemented so using Latest. - closes #1871