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

Mocked SetTTDBlockClient function for Erigon #39

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

dmitriy-b
Copy link
Collaborator

Recently Erigon team has removed totalDifficulty erigontech/erigon#11809 from Block schema

As expected, hive tests fail

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x52d522]

goroutine 67 [running]:
math/big.(*Int).Cmp(0xc0002ae500?, 0x1745608?)
	/usr/local/go/src/math/big/int.go:373 +0x22
github.com/ethereum/hive/simulators/ethereum/engine/helper.CheckTTD({0x1757f08, 0xc0002ae500}, {0x1745598?, 0xc00052c190?})
	/source/helper/helper.go:294 +0xe5
github.com/ethereum/hive/simulators/ethereum/engine/helper.WaitForTTD({0x1757f08, 0xc0002ae500}, 0xc0002d4000?, 0xc00028c420, {0x1745598?, 0xc00052c190?})
	/source/helper/helper.go:310 +0x12d
created by github.com/ethereum/hive/simulators/ethereum/engine/helper.WaitAnyClientForTTD
	/source/helper/helper.go:357 +0x1a5

In this PR I just mocked WaitAnyClientForTTD to fix the build and did not remove all TD related things because we do not know when Nethermind and other clients will remove it. We may wait until the changes will be applied to upstream and use similar way to update it.

Another approach is to use environment variables (in jq simulator) and turn on / turn off such features to specific clients.

As for now, the changes affects ethereum/engine-gnosis-erigon simulator only

@brbrr brbrr merged commit 88746f1 into reflow Sep 9, 2024
@brbrr brbrr deleted the fix/erigon-td-remove branch September 9, 2024 16:08
@GIgako19929
Copy link

gh pr checkout 39

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