Skip to content

Commit 4693a1a

Browse files
committed
eth: add eth_blobBaseFee RPC (ethereum#29140)
1 parent 1e7586a commit 4693a1a

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

eth/api_backend.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,10 @@ func (b *EthApiBackend) FeeHistory(ctx context.Context, blockCount uint64, lastB
353353
return b.gpo.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles)
354354
}
355355

356+
func (b *EthApiBackend) BlobBaseFee(ctx context.Context) *big.Int {
357+
return new(big.Int)
358+
}
359+
356360
func (b *EthApiBackend) ChainDb() ethdb.Database {
357361
return b.eth.ChainDb()
358362
}

internal/ethapi/api.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ func (s *PublicEthereumAPI) FeeHistory(ctx context.Context, blockCount hexutil.U
138138
return results, nil
139139
}
140140

141+
// BlobBaseFee returns the base fee for blob gas at the current head.
142+
func (s *PublicEthereumAPI) BlobBaseFee(ctx context.Context) *hexutil.Big {
143+
return (*hexutil.Big)(new(big.Int))
144+
}
145+
141146
// ProtocolVersion returns the current Ethereum protocol version this node supports
142147
func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint {
143148
return hexutil.Uint(s.b.ProtocolVersion())

internal/ethapi/backend.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type Backend interface {
4848
ProtocolVersion() int
4949
SuggestGasTipCap(ctx context.Context) (*big.Int, error)
5050
FeeHistory(ctx context.Context, blockCount uint64, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, error)
51+
BlobBaseFee(ctx context.Context) *big.Int
5152
ChainDb() ethdb.Database
5253
AccountManager() *accounts.Manager
5354
RPCGasCap() uint64 // global gas cap for eth_call over rpc: DoS protection

internal/ethapi/transaction_args_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ func (b *backendMock) SyncProgress() ethereum.SyncProgress { return ethereum.Syn
291291
func (b *backendMock) FeeHistory(context.Context, uint64, rpc.BlockNumber, []float64) (*big.Int, [][]*big.Int, []*big.Int, []float64, error) {
292292
return nil, nil, nil, nil, nil
293293
}
294+
295+
func (b *backendMock) BlobBaseFee(ctx context.Context) *big.Int {
296+
return new(big.Int)
297+
}
298+
294299
func (b *backendMock) ChainDb() ethdb.Database { return nil }
295300
func (b *backendMock) AccountManager() *accounts.Manager { return nil }
296301
func (b *backendMock) ExtRPCEnabled() bool { return false }

internal/jsre/deps/web3.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

les/api_backend.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ func (b *LesApiBackend) FeeHistory(ctx context.Context, blockCount uint64, lastB
286286
return b.gpo.FeeHistory(ctx, blockCount, lastBlock, rewardPercentiles)
287287
}
288288

289+
func (b *LesApiBackend) BlobBaseFee(ctx context.Context) *big.Int {
290+
return new(big.Int)
291+
}
292+
289293
func (b *LesApiBackend) ChainDb() ethdb.Database {
290294
return b.eth.chainDb
291295
}

0 commit comments

Comments
 (0)