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

Resolve SSW-201 #66

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Resolve SSW-201 #66

merged 5 commits into from
Mar 5, 2024

Conversation

Quantumplation
Copy link
Member

When minting a pool, we were checking that the number of assets on the output was 3 or less.

The idea here being that the output would contain ADA, Asset B, and the Pool NFT.

However, this prevented exotic pairs (like SUNDAE/WMT) from being minted.

This resolves it by reusing @ignaciodopazo's more efficient has_expected_pool_value to check for the correct output pool value. It also adds a test case for this, which was originally written against the unfixed branch to confirm it fails, then moved to this branch to confirm it passes.

ignaciodopazo and others added 5 commits February 8, 2024 16:57
Benchmarking:
- original version
34 => { cpu: 5238830255, mem: 13459313 },
35 => { cpu: 5367257843, mem: 13789894 }

- optimized version
34 => { cpu: 5222871729, mem: 13414480 },
35 => { cpu: 5356877915, mem: 13757945 }

Savings:
- for 34 orders: 15.958.526 cpu and 44.833 mem
- for 35 orders: 10.379.928 cpu and 31.949 mem
Building off @ignaciodopazo's pr to optimize has_expected_pool_value, we
can just use that implementation to fix SSW-201

The mint contract would fail when ADA was not one of the pairs, because
we were checking that the number of tokens was 3.
@Quantumplation Quantumplation merged commit ad7183c into main Mar 5, 2024
1 check passed
@Quantumplation Quantumplation deleted the pi/SSW-201 branch March 5, 2024 21:49
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.

3 participants