zkgm: settle call panics with failure acks#153
Open
notJoon wants to merge 6 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #151
Fixes ZKGM receive and acknowledgement edge cases around only-maker and malformed acknowledgements.
The proven receive path now guards bare
ACK_ERR_ONLY_MAKERresults the same way asIntentRecv: retry-required only-maker outcomes abort receive processing so the packet receipt and acknowledgement are not committed.CALL receiver panics are handled differently: they now produce a normal failure acknowledgement instead of being converted into only-maker. This matches the expected settlement behavior and lets the source side refund immediately, including zero-timeout packets.
The source-side ack dispatcher was also hardened for token-order, batch, and forward packets. Bare only-maker or undecodable token-order acknowledgements are treated as failure acknowledgements so token-order handlers take their refund path instead of causing permanent ack processing panics.
The realcometbls scenarios were updated because the expected behavior changed. A panicking CALL receiver, either top-level or inside a batch, now commits a decodable failure acknowledgement; token-order-first batch coverage verifies that a valid earlier token child can still settle while the later CALL child records failure.
Added focused impl tests covering:
Recvaborting only on retry-required only-maker results