Skip to content

Conversation

@piersy
Copy link

@piersy piersy commented Jul 2, 2025

This fixes a synchronisation error in miner.TestDAFilters transactions were being added to the pool asynchronously and this introduced race conditions that could cause the test to fail randomly, running with a count of 1000 is enough to generate a few failures:

go test ./miner/ -run TestDAFilters -count 1000
--- FAIL: TestDAFilters (0.00s)
    --- FAIL: TestDAFilters/with-tx-filter-max-too-high (0.02s)
        payload_building_test.go:345: Unexpected transaction set: got 1, expected 257
--- FAIL: TestDAFilters (0.00s)
    --- FAIL: TestDAFilters/with-block-filter-max-too-high (0.03s)
        payload_building_test.go:345: Unexpected transaction set: got 1, expected 257
--- FAIL: TestDAFilters (0.00s)
    --- FAIL: TestDAFilters/with-tx-filter-max-too-high (0.02s)
        payload_building_test.go:345: Unexpected transaction set: got 1, expected 257
--- FAIL: TestDAFilters (0.00s)
    --- FAIL: TestDAFilters/with-tx-filter-max-too-high (0.02s)
        payload_building_test.go:345: Unexpected transaction set: got 1, expected 257
--- FAIL: TestDAFilters (0.00s)
    --- FAIL: TestDAFilters/with-nil-tx-filters (0.05s)
        payload_building_test.go:345: Unexpected transaction set: got 1, expected 257
FAIL
FAIL    github.com/ethereum/go-ethereum/miner   28.241s
FAIL

Fixes https://github.com/celo-org/celo-blockchain-planning/issues/1027

@piersy piersy requested a review from karlb July 2, 2025 13:44
Copy link

@karlb karlb left a comment

Choose a reason for hiding this comment

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

Sounds reasonable. We should upstream that fix, since it is not yet fixed there either.

@piersy
Copy link
Author

piersy commented Jul 2, 2025

Sounds reasonable. We should upstream that fix, since it is not yet fixed there either.

Yep, upstream fix is pending - ethereum-optimism#637

@piersy piersy merged commit 0196a3b into celo-rebase-13 Jul 2, 2025
7 checks passed
@piersy piersy deleted the piersy/fix_TestDAFilters branch July 2, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants