Skip to content

eth/catalyst: fix a bug about using null PayLoadID #31871

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mask-pp
Copy link
Contributor

@mask-pp mask-pp commented May 21, 2025

geth cmd: geth --dev --dev.period 5
call: debug.setHead to rollback several blocks.

If the debug.setHead call is delayed, it will trigger a panic with a small probability, due to using the null point of fcResponse.PayloadID.

@jwasinger
Copy link
Contributor

Thanks for reporting this. Please attach a stack trace if possible.

@mask-pp
Copy link
Contributor Author

mask-pp commented May 29, 2025

Thanks for reporting this. Please attach a stack trace if possible.

Debug.SetHead` can only delay if there are a large number of blocks in the database. So, to capture this scenario I added sleep 500 ms. The longer the delay, the greater the probability of occurrence.

image

@jwasinger
Copy link
Contributor

so iiuc, the issue is that if setHead has a delay, a block can be mined in the meantime while setHead is executing? and this will cause the crash?

@mask-pp
Copy link
Contributor Author

mask-pp commented May 29, 2025

so iiuc, the issue is that if setHead has a delay, a block can be mined in the meantime while setHead is executing? and this will cause the crash?

Yeah, and the forkchoiceUpdated returned here.

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.

2 participants