Skip to content

Commit

Permalink
fix: internal failure: Cancun is active but ExcessBlobGas is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmalec committed Mar 13, 2024
1 parent ef51847 commit 0183d0b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
22 changes: 12 additions & 10 deletions turbo/jsonrpc/eth_callMany.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"encoding/hex"
"fmt"
"github.com/ledgerwatch/erigon-lib/common/hexutil"
"math/big"
"time"

"github.com/ledgerwatch/erigon-lib/common/hexutil"

"github.com/holiman/uint256"
"github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/log/v3"
Expand Down Expand Up @@ -160,15 +161,16 @@ func (api *APIImpl) CallMany(ctx context.Context, bundles []Bundle, simulateCont
}

blockCtx = evmtypes.BlockContext{
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
GetHash: getHash,
Coinbase: parent.Coinbase,
BlockNumber: parent.Number.Uint64(),
Time: parent.Time,
Difficulty: new(big.Int).Set(parent.Difficulty),
GasLimit: parent.GasLimit,
BaseFee: &baseFee,
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
GetHash: getHash,
Coinbase: parent.Coinbase,
BlockNumber: parent.Number.Uint64(),
Time: parent.Time,
Difficulty: new(big.Int).Set(parent.Difficulty),
GasLimit: parent.GasLimit,
BaseFee: &baseFee,
ExcessBlobGas: parent.ExcessBlobGas,
}

// Get a new instance of the EVM
Expand Down
19 changes: 10 additions & 9 deletions turbo/jsonrpc/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -482,15 +482,16 @@ func (api *PrivateDebugAPIImpl) TraceCallMany(ctx context.Context, bundles []Bun
}

blockCtx = evmtypes.BlockContext{
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
GetHash: getHash,
Coinbase: parent.Coinbase,
BlockNumber: parent.Number.Uint64(),
Time: parent.Time,
Difficulty: new(big.Int).Set(parent.Difficulty),
GasLimit: parent.GasLimit,
BaseFee: &baseFee,
CanTransfer: core.CanTransfer,
Transfer: core.Transfer,
GetHash: getHash,
Coinbase: parent.Coinbase,
BlockNumber: parent.Number.Uint64(),
Time: parent.Time,
Difficulty: new(big.Int).Set(parent.Difficulty),
GasLimit: parent.GasLimit,
BaseFee: &baseFee,
ExcessBlobGas: parent.ExcessBlobGas,
}

// Get a new instance of the EVM
Expand Down

0 comments on commit 0183d0b

Please sign in to comment.