Skip to content
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

eip-4844: minor additions #7443

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/integration/commands/state_domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/ledgerwatch/erigon/core/vm"
"github.com/ledgerwatch/erigon/eth/ethconfig"
"github.com/ledgerwatch/erigon/node/nodecfg"
"github.com/ledgerwatch/erigon/params"
erigoncli "github.com/ledgerwatch/erigon/turbo/cli"
"github.com/ledgerwatch/erigon/turbo/services"
)
Expand Down Expand Up @@ -488,7 +489,7 @@ func (b *blockProcessor) applyBlock(

header := block.Header()
b.vmConfig.Debug = true
gp := new(core.GasPool).AddGas(block.GasLimit())
gp := new(core.GasPool).AddGas(block.GasLimit()).AddDataGas(params.MaxDataGasPerBlock)
usedGas := new(uint64)
var receipts types.Receipts
rules := b.chainConfig.Rules(block.NumberU64(), block.Time())
Expand Down
2 changes: 1 addition & 1 deletion cmd/state/commands/erigon4.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ func processBlock23(startTxNum uint64, trace bool, txNumStart uint64, rw *StateR

header := block.Header()
vmConfig.Debug = true
gp := new(core.GasPool).AddGas(block.GasLimit())
gp := new(core.GasPool).AddGas(block.GasLimit()).AddDataGas(params.MaxDataGasPerBlock)
usedGas := new(uint64)
var receipts types.Receipts
rules := chainConfig.Rules(block.NumberU64(), block.Time())
Expand Down
4 changes: 2 additions & 2 deletions turbo/transactions/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func ComputeTxEnv(ctx context.Context, engine consensus.EngineReader, block *typ
}
vmenv.Reset(TxContext, statedb)
// Not yet the searched for transaction, execute on top of the current state
if _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(txn.GetGas()), true /* refunds */, false /* gasBailout */); err != nil {
if _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(txn.GetGas()).AddDataGas(txn.GetDataGas()), true /* refunds */, false /* gasBailout */); err != nil {
return nil, evmtypes.BlockContext{}, evmtypes.TxContext{}, nil, nil, fmt.Errorf("transaction %x failed: %w", txn.Hash(), err)
}
// Ensure any modifications are committed to the state
Expand Down Expand Up @@ -203,7 +203,7 @@ func TraceTx(
callmsg := prepareCallMessage(message)
result, err = statefull.ApplyBorMessage(*vmenv, callmsg)
} else {
result, err = core.ApplyMessage(vmenv, message, new(core.GasPool).AddGas(message.Gas()), refunds, false /* gasBailout */)
result, err = core.ApplyMessage(vmenv, message, new(core.GasPool).AddGas(message.Gas()).AddDataGas(message.DataGas()), refunds, false /* gasBailout */)
}

if err != nil {
Expand Down