Skip to content
Closed
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
1 change: 1 addition & 0 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import (
"github.com/ethereum/go-ethereum/eth/tracers"
"github.com/ethereum/go-ethereum/internal/build"
"github.com/ethereum/go-ethereum/internal/version"
"github.com/ethereum/go-ethereum/params"
)

var (
Expand Down
4 changes: 4 additions & 0 deletions consensus/beacon/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,9 @@ func IsTTDReached(chain consensus.ChainHeaderReader, parentHash common.Hash, par
if td == nil {
return false, consensus.ErrUnknownAncestor
}
ttd := chain.Config().TerminalTotalDifficulty
if ttd == nil {
return false, nil
}
Comment on lines +515 to +518
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never touch that, remove. Not sure what was the problem but it's unrelated to our CI failures.

return td.Cmp(chain.Config().TerminalTotalDifficulty) >= 0, nil
}
1 change: 0 additions & 1 deletion consensus/bor/statefull/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ func ApplyMessage(
chainContext core.ChainContext,
tracer *tracing.Hooks,
) (uint64, error) {

tx := types.NewTx(&types.LegacyTx{
Nonce: msg.Nonce(),
GasPrice: msg.GasPrice(),
Expand Down
2 changes: 1 addition & 1 deletion consensus/clique/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"bytes"
"errors"
"fmt"
"github.com/ethereum/go-ethereum/core/tracing"
"io"
"math/big"
"math/rand"
Expand All @@ -36,6 +35,7 @@ import (
"github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/tracing"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
Expand Down
2 changes: 1 addition & 1 deletion consensus/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
package consensus

import (
"github.com/ethereum/go-ethereum/core/tracing"
"math/big"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/tracing"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/params"
Expand Down
1 change: 1 addition & 0 deletions core/state/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func (j *journal) logChange(txHash common.Hash) {
j.append(addLogChange{txhash: txHash})
}

// nolint:unused
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert

func (j *journal) createObject(addr common.Address) {
j.append(createObjectChange{account: addr})
}
Expand Down
3 changes: 0 additions & 3 deletions eth/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,6 @@ func (f *Firehose) OnBlockEnd(err error) {
} else {
f.printBlockToFirehose(f.block, f.blockFinality)
}

} else {
// An error occurred, could have happen in transaction/call context, we must not check if in trx/call, only check in block
f.ensureInBlock(0)
Expand Down Expand Up @@ -2360,7 +2359,6 @@ func maxFeePerGas(tx *types.Transaction) *pbeth.BigInt {

case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType:
return firehoseBigIntFromNative(tx.GasFeeCap())

}

panic(errUnhandledTransactionType("maxFeePerGas", tx.Type()))
Expand All @@ -2374,7 +2372,6 @@ func maxPriorityFeePerGas(tx *types.Transaction) *pbeth.BigInt {
case types.DynamicFeeTxType, types.BlobTxType, types.SetCodeTxType:
return firehoseBigIntFromNative(tx.GasTipCap())
}

panic(errUnhandledTransactionType("maxPriorityFeePerGas", tx.Type()))
}

Expand Down
3 changes: 2 additions & 1 deletion eth/tracers/firehose_concurrency.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package tracers

import (
pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2"
"sync"

pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2"
)

type blockPrintJob struct {
Expand Down
9 changes: 4 additions & 5 deletions eth/tracers/firehose_concurrency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package tracers
import (
"encoding/hex"
"fmt"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
"regexp"
"strconv"
"strings"
"testing"

"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
)

func TestFirehose_BlockPrintsToFirehose_SingleBlock(t *testing.T) {

f := NewFirehose(&FirehoseConfig{
ConcurrentBlockFlushing: 1,
ApplyBackwardCompatibility: ptr(false),
Expand Down Expand Up @@ -56,7 +56,6 @@ func TestFirehose_BlockPrintsToFirehose_SingleBlock(t *testing.T) {
}

func TestFirehose_BlocksPrintToFirehose_MultipleBlocksInOrder(t *testing.T) {

const blockCount = 100
const baseBlockNum = 0

Expand Down
9 changes: 5 additions & 4 deletions eth/tracers/firehose_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ func TestFirehoseCallStack_Push(t *testing.T) {
actions []actionRunner
}{
{
"push/pop emtpy", []actionRunner{
"push/pop empty",
[]actionRunner{
push(&pbeth.Call{}),
pop(),
check(func(t *testing.T, s *CallStack) {
Expand All @@ -46,7 +47,8 @@ func TestFirehoseCallStack_Push(t *testing.T) {
},
},
{
"push/push/push", []actionRunner{
"push/push/push",
[]actionRunner{
push(&pbeth.Call{}),
push(&pbeth.Call{}),
push(&pbeth.Call{}),
Expand Down Expand Up @@ -193,7 +195,6 @@ func Test_FirehoseAndGethHeaderFieldMatches(t *testing.T) {
var endsWithUnknownConstant = regexp.MustCompile(`.*\(\d+\)$`)

func TestFirehose_BalanceChangeAllMappedCorrectly(t *testing.T) {

for i := 0; i <= math.MaxUint8; i++ {
tracingReason := tracing.BalanceChangeReason(i)
if tracingReason == tracing.BalanceChangeUnspecified || tracingReason == tracing.BalanceChangeRevert {
Expand Down Expand Up @@ -405,7 +406,7 @@ func TestFirehose_reorderIsolatedTransactionsAndOrdinals(t *testing.T) {
goldenPath := tt.expectedBlockFile

if !goldenUpdate && !fileExits(t, goldenPath) {
t.Fatalf("the golden file %q does not exist, re-run with 'GOLDEN_UPDATE=true go test ./... -run %q' to generate the intial version", goldenPath, t.Name())
t.Fatalf("the golden file %q does not exist, re-run with 'GOLDEN_UPDATE=true go test ./... -run %q' to generate the initial version", goldenPath, t.Name())
}

content, err := protojson.MarshalOptions{Indent: " "}.Marshal(f.block)
Expand Down
3 changes: 2 additions & 1 deletion eth/tracers/internal/tracetest/firehose/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func newFirehoseTestTracer(t *testing.T, model tracingModel, config *tracers.Fir
}
}

// nolint:unused
func (lines firehoseBlockLines) assertEquals(t *testing.T, goldenDir string, expected ...firehoseBlockLineParams) {
actualParams := slicesMap(lines, func(l firehoseBlockLine) firehoseBlockLineParams { return l.Params })
require.Equal(t, expected, actualParams, "Actual lines block params do not match expected lines block params")
Expand All @@ -72,7 +73,7 @@ func (lines firehoseBlockLines) assertOnlyBlockEquals(t *testing.T, goldenDir st
for _, line := range lines {
goldenPath := filepath.Join(goldenDir, fmt.Sprintf("block.%d.golden.json", line.Block.Header.Number))
if !goldenUpdate && !fileExists(t, goldenPath) {
t.Fatalf("the golden file %q does not exist, re-run with 'GOLDEN_UPDATE=true go test ./... -run %q' to generate the intial version", goldenPath, t.Name())
t.Fatalf("the golden file %q does not exist, re-run with 'GOLDEN_UPDATE=true go test ./... -run %q' to generate the initial version", goldenPath, t.Name())
}

unnormalizedContent, err := protojson.MarshalOptions{Indent: " "}.Marshal(line.Block)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ethereum/go-ethereum

go 1.23.6
go 1.23.8

require (
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion tests/bor/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func buildNextBlock(t *testing.T, _bor consensus.Engine, chain *core.BlockChain,
// Finalize and seal the block
block, err := _bor.FinalizeAndAssemble(chain, b.header, state, &types.Body{
Transactions: b.txs,
}, b.receipts)
}, b.receipts, nil)
if err != nil {
panic(fmt.Sprintf("error finalizing block: %v", err))
}
Expand Down
Loading