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

[move-examples] post-mint reveal example #5821

Merged
merged 1 commit into from
Dec 14, 2022
Merged

[move-examples] post-mint reveal example #5821

merged 1 commit into from
Dec 14, 2022

Conversation

0xchloe
Copy link
Contributor

@0xchloe 0xchloe commented Dec 8, 2022

Description

Test Plan

@movekevin
Copy link
Contributor

Can you add some comments or PR's desc for:

  1. The e2e flow
  2. Design considerations. Any alternatives considered.
  3. Any gotchas/special logic that reviewers should pay attention to

@0xchloe 0xchloe force-pushed the post_mint_reveal branch 6 times, most recently from bf5b113 to fd79906 Compare December 9, 2022 00:22
@0xchloe 0xchloe requested a review from CapCap December 9, 2022 01:46
Copy link
Contributor

@davidiw davidiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good first start!

so my thoughts would be to use a bit vector to track what has been claimed and not claimed. then we have a table that is indexed by its sequential inclusion... so table[0], table[1]... the bit vector starts as all 0 and as indexes in the table are selected, the bit vector is set to 1... then the problem is to create a randomizer that iterates on the bit vector until it finds a 0.

@areshand
Copy link
Contributor

good first start!

so my thoughts would be to use a bit vector to track what has been claimed and not claimed. then we have a table that is indexed by its sequential inclusion... so table[0], table[1]... the bit vector starts as all 0 and as indexes in the table are selected, the bit vector is set to 1... then the problem is to create a randomizer that iterates on the bit vector until it finds a 0.

Actually, I find Chloe's method is simpler. She uses big vector to record URI. Each mint removes a used URI. The index of the URI to be removed is generated by the pseudo-random number generated by timestamp mod by the remaining length. This approach doesn't need an extra bit vector.

@0xchloe 0xchloe requested a review from lightmark December 12, 2022 23:18
@0xchloe 0xchloe requested a review from areshand December 13, 2022 17:07
@0xchloe 0xchloe force-pushed the post_mint_reveal branch 2 times, most recently from e949dc6 to ef01640 Compare December 14, 2022 03:37
@0xchloe 0xchloe enabled auto-merge (squash) December 14, 2022 05:24
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@0xchloe 0xchloe disabled auto-merge December 14, 2022 06:37
@github-actions

This comment has been minimized.

@0xchloe 0xchloe enabled auto-merge (squash) December 14, 2022 07:05
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on 40fe5161c95412e7628847ba802d54c9eeed8b55

performance benchmark with full nodes : 6424 TPS, 6182 ms latency, 8800 ms p99 latency,no expired txns
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 40fe5161c95412e7628847ba802d54c9eeed8b55

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 40fe5161c95412e7628847ba802d54c9eeed8b55 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 7252 TPS, 5306 ms latency, 7200 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 40fe5161c95412e7628847ba802d54c9eeed8b55
compatibility::simple-validator-upgrade::single-validator-upgrade : 4706 TPS, 8845 ms latency, 11600 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 40fe5161c95412e7628847ba802d54c9eeed8b55
compatibility::simple-validator-upgrade::half-validator-upgrade : 4713 TPS, 8834 ms latency, 11300 ms p99 latency,no expired txns
4. upgrading second batch to new version: 40fe5161c95412e7628847ba802d54c9eeed8b55
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6320 TPS, 6135 ms latency, 10500 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 40fe5161c95412e7628847ba802d54c9eeed8b55 passed
Test Ok

@0xchloe 0xchloe merged commit 6e2b1c6 into main Dec 14, 2022
@0xchloe 0xchloe deleted the post_mint_reveal branch December 14, 2022 07:41
areshand pushed a commit to areshand/aptos-core-1 that referenced this pull request Dec 18, 2022
@Markuze Markuze mentioned this pull request Dec 26, 2022
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.

5 participants