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

refactor(pool-nonce): updates pool nonce to be a mapping from pair nonce #272

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

Alexangelj
Copy link
Contributor

@Alexangelj Alexangelj commented Mar 11, 2023

MUST MERGE chore/fmt FIRST.

Description

This expands the total amount of pools by a significant amount, since there can be 2^32 pools for all 2^24 pairs. Before, the pool nonce space was global, limiting the sum of all 2^24 pairs to 2^32 total pools.

These types were on the larger side to be conservative about the amount of pools/pairs created. However, with this mapping, we might be able to reconsider the size of both the values. Pairs take 3 bytes, pool nonces take 4 bytes, this could be potentially halved.

@Alexangelj
Copy link
Contributor Author

Must run forge fmt on this pr before merging. This must be done after the it has been run on the main branch with the new formatter settings in the toml.

@Alexangelj Alexangelj changed the base branch from main to chore/fmt March 11, 2023 23:07
@Alexangelj Alexangelj changed the base branch from chore/fmt to main March 11, 2023 23:09
@Alexangelj Alexangelj changed the base branch from main to rc/1.0.0-beta March 11, 2023 23:15
@Alexangelj Alexangelj changed the base branch from rc/1.0.0-beta to main March 11, 2023 23:20
@Alexangelj Alexangelj force-pushed the refactor/pool-nonce branch from 60e6e14 to 7509350 Compare March 11, 2023 23:27
@Alexangelj Alexangelj changed the base branch from main to chore/fmt March 11, 2023 23:27
Base automatically changed from chore/fmt to main March 13, 2023 15:47
@Alexangelj Alexangelj marked this pull request as ready for review March 13, 2023 15:48
@Alexangelj Alexangelj merged commit e6bdf85 into main Mar 13, 2023
@Alexangelj Alexangelj deleted the refactor/pool-nonce branch March 13, 2023 15:48
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.

Explore: Pool Ids and Non-global Pool nonces
1 participant