chore: miscellaneous nits (#46)

This commit is contained in:
Cal Bera 2025-08-04 17:44:47 -07:00 committed by GitHub
parent 0eb623e141
commit f1c9320cce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 13 deletions

View file

@ -122,16 +122,14 @@ func (b *BlockGen) addTx(bc *BlockChain, vmConfig vm.Config, tx *types.Transacti
var (
blockContext = NewEVMBlockContext(b.header, bc, &b.header.Coinbase)
evm = vm.NewEVM(blockContext, b.statedb, b.cm.config, vmConfig)
gasPool = b.gasPool
gasUsed = &b.header.GasUsed
)
// Berachain: PoL txs do not count towards block gas.
if tx.Type() == types.PoLTxType {
gasPool = new(GasPool).AddGas(params.PoLTxGasLimit)
gasUsed = new(uint64)
}
b.statedb.SetTxContext(tx.Hash(), len(b.txs))
receipt, err := ApplyTransaction(evm, gasPool, b.statedb, b.header, tx, gasUsed)
receipt, err := ApplyTransaction(evm, b.gasPool, b.statedb, b.header, tx, gasUsed)
if err != nil {
panic(err)
}

View file

@ -1249,11 +1249,7 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
if err != nil {
return nil, 0, nil, fmt.Errorf(
"failed to apply transaction: %v err: %v",
args.ToTransaction(
types.LegacyTxType,
b.ChainConfig().IsPrague1(header.Number, header.Time),
b.ChainConfig().Berachain.Prague1.PoLDistributorAddress,
).Hash(),
args.ToTransaction(types.LegacyTxType, isPrague1, distributorAddress).Hash(),
err,
)
}

View file

@ -193,8 +193,8 @@ var (
},
Berachain: BerachainConfig{
Prague1: Prague1Config{
Time: newUint64(17446744073709551614),
MinimumBaseFeeWei: 1000000000, // 1 gwei
Time: newUint64(17446744073709551614), // TODO: set mainnet timestamp.
MinimumBaseFeeWei: 10000000000, // 10 gwei
BaseFeeChangeDenominator: 48, // 6x increase from the default
},
},
@ -231,7 +231,7 @@ var (
Berachain: BerachainConfig{
Prague1: Prague1Config{
Time: newUint64(1754496000),
MinimumBaseFeeWei: 1000000000, // 1 gwei
MinimumBaseFeeWei: 10000000000, // 10 gwei
BaseFeeChangeDenominator: 48, // 6x increase from the default
},
},