Skip to content
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

New Aiken test for process_orders with 30 shuffled donation orders #48

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

francolq
Copy link
Collaborator

No description provided.

@Quantumplation Quantumplation requested a review from rrruko January 31, 2024 01:50
@francolq
Copy link
Collaborator Author

I made a mistake in the commit message, they are donation orders

@francolq francolq changed the title New Aiken test for process_orders with 30 shuffled deposit orders New Aiken test for process_orders with 30 shuffled donation orders Jan 31, 2024
@francolq
Copy link
Collaborator Author

Curiously, the test is giving the following result:

│ PASS [mem: 17142175, cpu: 6699341695] process_30_shuffled_orders_test

Way above the memory limit of 14 million.

@Quantumplation
Copy link
Member

That's not surprising; 37 is our maximum batch size, but that relies on the orders being sorted in-order. In practice, they'll be shuffled, which will lower the number of orders we can fit in a batch (though it will still be much higher than v1).

Additionally, we allow the scoopers to batch orders placed before the market open time in an arbitrary orders; this means we can randomly select orders, and index them in the on-chain sorted order, allowing us to burn off the initial market demand in the fastest way possible.

We'll need to put some care into biasing our selection slightly to higher transaction IDs to offset the advantage you'd get by having a lower transaction ID, but this is something that can be solved for outside of the contracts.

@Quantumplation
Copy link
Member

@francolq by the way, thanks for the pull request :D

@Quantumplation Quantumplation merged commit 2487900 into main Feb 1, 2024
1 check passed
@Quantumplation Quantumplation deleted the francolq/process_30_shuffled_orders_test branch February 1, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants