mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 02:10:46 +00:00
eth: add eth_blobBaseFee RPC (#29140)
This commit is contained in:
parent
af4a3b0f9f
commit
0dd3d532fc
6 changed files with 24 additions and 0 deletions
|
|
@ -353,6 +353,10 @@ func (b *EthApiBackend) FeeHistory(ctx context.Context, blockCount uint64, lastB
|
||||||
return b.gpo.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles)
|
return b.gpo.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *EthApiBackend) BlobBaseFee(ctx context.Context) *big.Int {
|
||||||
|
return new(big.Int)
|
||||||
|
}
|
||||||
|
|
||||||
func (b *EthApiBackend) ChainDb() ethdb.Database {
|
func (b *EthApiBackend) ChainDb() ethdb.Database {
|
||||||
return b.eth.ChainDb()
|
return b.eth.ChainDb()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,11 @@ func (s *PublicEthereumAPI) FeeHistory(ctx context.Context, blockCount hexutil.U
|
||||||
return results, nil
|
return results, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BlobBaseFee returns the base fee for blob gas at the current head.
|
||||||
|
func (s *PublicEthereumAPI) BlobBaseFee(ctx context.Context) *hexutil.Big {
|
||||||
|
return (*hexutil.Big)(new(big.Int))
|
||||||
|
}
|
||||||
|
|
||||||
// ProtocolVersion returns the current Ethereum protocol version this node supports
|
// ProtocolVersion returns the current Ethereum protocol version this node supports
|
||||||
func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint {
|
func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint {
|
||||||
return hexutil.Uint(s.b.ProtocolVersion())
|
return hexutil.Uint(s.b.ProtocolVersion())
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ type Backend interface {
|
||||||
ProtocolVersion() int
|
ProtocolVersion() int
|
||||||
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
|
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
|
||||||
FeeHistory(ctx context.Context, blockCount uint64, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, error)
|
FeeHistory(ctx context.Context, blockCount uint64, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, error)
|
||||||
|
BlobBaseFee(ctx context.Context) *big.Int
|
||||||
ChainDb() ethdb.Database
|
ChainDb() ethdb.Database
|
||||||
AccountManager() *accounts.Manager
|
AccountManager() *accounts.Manager
|
||||||
RPCGasCap() uint64 // global gas cap for eth_call over rpc: DoS protection
|
RPCGasCap() uint64 // global gas cap for eth_call over rpc: DoS protection
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,11 @@ func (b *backendMock) SyncProgress() ethereum.SyncProgress { return ethereum.Syn
|
||||||
func (b *backendMock) FeeHistory(context.Context, uint64, rpc.BlockNumber, []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, error) {
|
func (b *backendMock) FeeHistory(context.Context, uint64, rpc.BlockNumber, []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, error) {
|
||||||
return nil, nil, nil, nil, nil
|
return nil, nil, nil, nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *backendMock) BlobBaseFee(ctx context.Context) *big.Int {
|
||||||
|
return new(big.Int)
|
||||||
|
}
|
||||||
|
|
||||||
func (b *backendMock) ChainDb() ethdb.Database { return nil }
|
func (b *backendMock) ChainDb() ethdb.Database { return nil }
|
||||||
func (b *backendMock) AccountManager() *accounts.Manager { return nil }
|
func (b *backendMock) AccountManager() *accounts.Manager { return nil }
|
||||||
func (b *backendMock) ExtRPCEnabled() bool { return false }
|
func (b *backendMock) ExtRPCEnabled() bool { return false }
|
||||||
|
|
|
||||||
|
|
@ -5586,6 +5586,11 @@ var properties = function () {
|
||||||
getter: 'eth_gasPrice',
|
getter: 'eth_gasPrice',
|
||||||
outputFormatter: formatters.outputBigNumberFormatter
|
outputFormatter: formatters.outputBigNumberFormatter
|
||||||
}),
|
}),
|
||||||
|
new Property({
|
||||||
|
name: 'blobBaseFee',
|
||||||
|
getter: 'eth_blobBaseFee',
|
||||||
|
outputFormatter: formatters.outputBigNumberFormatter
|
||||||
|
}),
|
||||||
new Property({
|
new Property({
|
||||||
name: 'accounts',
|
name: 'accounts',
|
||||||
getter: 'eth_accounts'
|
getter: 'eth_accounts'
|
||||||
|
|
|
||||||
|
|
@ -286,6 +286,10 @@ func (b *LesApiBackend) FeeHistory(ctx context.Context, blockCount uint64, lastB
|
||||||
return b.gpo.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles)
|
return b.gpo.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *LesApiBackend) BlobBaseFee(ctx context.Context) *big.Int {
|
||||||
|
return new(big.Int)
|
||||||
|
}
|
||||||
|
|
||||||
func (b *LesApiBackend) ChainDb() ethdb.Database {
|
func (b *LesApiBackend) ChainDb() ethdb.Database {
|
||||||
return b.eth.chainDb
|
return b.eth.chainDb
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue