-
Notifications
You must be signed in to change notification settings - Fork 92
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
integration: order and status checks, no pending server messages #716
Conversation
This PR simply needs testing, and notes for breaking changes (API, db scheme, etc.). The individual commits have already gone through review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks and tests well. Other than API used only internally, my quick tally of breaking changes is
IsRevoked
field fordb.MatchProof
is now a method that returnsproof.ServerRevoked || proof.SelfRevoked
. (actually, this one isn't used outside core probably)msgjson.OrderStatusResult
renamed toOrderStatus
andFilled
field removed.msgjson.ConnectResult
Matches
field renamed toActiveMatches
(jsonmatches
->activematches
).
Removes all server message caching, as well as the requirement to acknowledge match, audit, and redemption requests before progressing through match negotiation. This is intended to be the base upon which a match_status / order_status conflict resolution system is built.
* server/{auth,db}: connect response return active orders (processes matches before order statuses) * client/{core,db}: compare known order statuses against connect response - Log error and issue notification for active orders reported by DEX that are unknown to the client. - Update order statuses where server-reported statuses are different from statuses recorded by client. - Set statuses to Executed, Canceled or Revoked for orders considered active by the client but not returned by the DEX in the connect response. TODO: implement an `order_status` route to accurately determine current statuses for such orders. * simnet: add trading test for order status reconciliation Also modify trade simnet test cases to run distinctly, wtih new clients created for each test case, to prevent spillages across test cases. * determine correct order statuses using order_status route * retire stale cancel orders if target orders are still active
1. Match status resolution is run on startup and reconnects for any status mismatches observed when comparing the `connect` result with our local state. 2. Client will now begin negotiation based on the extra matches in the connect response. 3. Differentiate between server-initiated revocations and client-initiated revocations. Required a database upgrade. - Log error and issue notification for active orders reported by DEX that are unknown to the client. - Update order statuses where server-reported statuses are different from statuses recorded by client. - Set statuses to Executed, Canceled or Revoked for orders considered active by the client but not returned by the DEX in the connect response.
Before returning "only one cancel order can be submitted per order per epoch error" message, first check if the existing cancel order is stale and delete the cancel order to allow submission of new cancel order.
Thanks. Debugf fix rebased into the |
This includes:
Matches status is processed before order statuses.
status-integ
PRs: #677, #699, #687, #704, #714Note: this PR will be merged via rebase, not squash so each of the commits are replayed on master.