fix(evmexec): classify syncing payload preparation correctly#1886
fix(evmexec): classify syncing payload preparation correctly#1886peter941221 wants to merge 2 commits into
Conversation
I kept the production fix unchanged and tightened the status-boundary tests around The branch now covers:
That closes the main review gap in this PR: the status classification is no longer justified by one branch and one example. The tests now pin the whole response surface that this function handles.
Linux-side validation passed in a temporary WSL verification copy: cargo fmt --all --check
Pushed follow-up commit:
I used AI assistance for code investigation, patch drafting, PR text, and test targeting. I reviewed the final patch and validation results before posting. |
|
This branch is still at the hardened test boundary from 29f44e6. It now covers the full status surface handled by build_block_from_mempool, so I think the review unit is in good shape for another look. |
Description
Fixes payload preparation error classification in
build_block_from_mempool.Before this change, the function called
forkchoiceUpdatedwith payload attributes and then immediately requiredpayload_id. That treated a legalSYNCINGresponse aspayload_id missing, even though payload building has not started yet in that state.This patch checks
payload_status.statusbefore readingpayload_id, keeps the existingVALID + payload_idpath, and returns explicit errors forSYNCING,INVALID, and unexpectedACCEPTED.Type of Change
Notes to Reviewers
The happy path is unchanged.
The important change is that the function now classifies the full response surface explicitly instead of assuming every success response must carry a payload id. The current branch tests
VALID,SYNCING,INVALID, unexpectedACCEPTED, andVALIDwithout a payload id.AI was used to assist in this PR.
Is this PR addressing any specification, design doc or external reference document?
If yes, please add relevant links:
Checklist
Related Issues