Repository navigation
fix(clob): resolve missing final settlement hashes - #34
Merged
Merged
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.
When the user stream reports a confirmed trade without a transaction hash, settlement currently returns success with no hashes. This change resolves missing final hashes through REST immediately and keeps the fill pending if REST also lacks the hash. Both settlement overloads require confirmed fills to have final hashes; failed fills still complete without hashes.
Complete stream confirmations continue to settle without REST calls. Unresolved hash lookups follow the existing reconciliation interval and deadline, and REST errors retain their original metadata. Earlier MINED and order-response hashes are not reused because retries can replace them. The public method signatures and type layouts are unchanged.
Validation: the new regressions failed before the fix. Release
test_stream_settlement,test_order_settlement,test_user_stream, andtest_package_consumerpass locally on macOS with Apple clang 21. Pinned clang-format/clang-tidy 21.1.6 and Prettier 3.6.2 checks pass. Tests cover omitted/null/empty hashes through the stream parser, final-hash reconciliation, incomplete REST confirmations, timeout, and original HTTP errors. The full Linux/macOS Debug/Release matrix runs in CI. No funded orders or live settlement tests were run.Protocol evidence: the transaction hash is optional in the official user-stream contract and the official Python SDK model at f1e2ab2.