-
Notifications
You must be signed in to change notification settings - Fork 113
Not all orders are being shared between browsers #803
Comments
PlatformAll browsers across all OS. Mesh Version9.2.1 and 9.3.0 DescriptionBeginning last Thursday April 30, around 3pm EST our product manager noticed weird issues where orders were not appearing between two of his devices. We subsequently upgrades from 9.2.1 to 9.3.0 and are seeing the same behavior. With further debugging, we've discovered that our call to getOrdersAsync returns wildly different numbers of orders, and will never receive orders that were not available in that initial fetch. Subsequent re-runs of the application without clearing database state will discover more orders. I'll respond with detailed logs of subsequent runs of the mesh. This is easily reproducible on https://v2.augur.net where debug logging is deployed, but doesn't have level 6 mesh logs turned on. Example runs:
At the same time other devs are reporting: Repro materials
LogsForthcoming |
Logs / InfoCurrent StateBefore doing this test, I loaded https://v2.augur.net with a primed browser (e.g. one that has been connected to the mesh for hours), and checked how many orders it was getting. Our syncing process first calls For that browser I received 6436 orders from the getOrdersAsync(): Fresh State TestsFor this test I will switch over to chrome, clear all application state, and reload https://v2.augur.net, noting the total order numbers retrieved. Load 1
After this, no other order events are emitted. Load 2The tab was reloaded without clearing any state (all 0x db entries are intact).
After this, no more Order Events are emitted. Load 3The tab was reloaded without clearing any state (all 0x db entries are intact).
Load 4The tab was reloaded without clearing any state (all 0x db entries are intact).
So at this point this browser appears to have hit a steady state and isn't receiving new bulk events. Back to FirefoxBack to firefox just to check and see with the original browser. This ran very slowly, locked up the browser ~8 times, and showed the "A Webpage is slowing down your browser. Close or wait?" message as well. However, according to this we've still received over 6k orders from the mesh, with numbers matching exactly the first test. Firefox with a cleared stateFor completeness, lets clear the state of firefox, previously reporting 6436 orders. Load 1Similar results to Chrome above, where it starts with 0 orders and then gets some in blocks. This time a lot less than the previous loads.
0x Mesh Debug LogsI'll run these tests with a local instance with the 0x debug logs and attach per run. |
I am able to reproduce similar results by following the instructions you shared. I'm coordinating with our devops engineer to see if there is anything wrong with our Mesh nodes on Kovan. I also separately reached out to you on Discord to confirm the latest custom order filter as that may be a contributing factor. |
I spent a lot more time investigating this today. Here's what I found out:
|
While the CPU optimizations we're working on will help with this, I'm starting to think that they won't be enough to fully address the problem. I also opened #822 to improve the ordersync protocol itself. |
With each change its getting better. I think 822 will help a lot, and in the long term more intelligent routing for https will also help. |
Context
Augur has reported this issue on Discord.
Please provide any relevant information about your setup
All browsers across all OS.
I.e. currently an issue between chrome, Firefox, and safari across Linux (mint with Ubuntu 20.04 base), windows 10, macos mojave and iOS 13.
8.0.1
instead oflatest
or8
).9.2.1 and 9.3.0
Expected Behavior
Setting aside fills/expiries, all orders should be propagated between two browser nodes.
Current Behavior
One node is receiving > 7k orders. The other is only receiving 1390.
Failure Information (for bugs)
chwy (in new jersey) is getting >7k orders during the getOrdersAsync().
Steps to Reproduce
(See comment below).
Failure Logs
(See screenshots above).
The text was updated successfully, but these errors were encountered: