metaplex-foundation / digital-asset-rpc-infrastructure

Reference implementation for Metaplex Digital Asset Standard API
https://github.com/metaplex-foundation/digital-asset-standard-api
GNU Affero General Public License v3.0
66 stars 38 forks source link

High volume minting leading to empty proofs #63

Closed alex-fung closed 1 year ago

alex-fung commented 1 year ago

We're discovering that when minting 10,000 new NFTs to a tree at a rate of 10 per second, most the off chain proofs will be empty (highly reproducible).

Here's a script that demonstrates as such: https://gist.github.com/alex-fung/9f1963f34ab0ab9096653fd77965fc51 Note it takes about 20 minutes to fully run, but at the end when getting the proofs for each asset ~8000 of them are empty proofs. You will need to provide a keypair with enough SOL to create the 10,000 new NFTS (about 1.2 SOL), as well as an RPC endpoint and a ReadAPI endpoint

alex-fung commented 1 year ago

Update: the assumption I had previously might be incorrect. I tried minting 10,000 NFTs onto a new tree again, but this time one at a time (took about 9 hours). I also had a loop checking the proofs every 30 minutes as these were minted – interestingly enough at a certain threshold it seemed that a bunch of the proofs got busted, wondering if it's a volume issue as opposed to a throughput issue in this case.

In particular, when a total of 7897 NFTs were minted, none of them had empty roots/proofs (although 12 did have invalid proofs), but by the time a total of 8663 NFTs were minted, 8193 of them were returned as empty. Curious if you have any thoughts regarding this. The tree for this latest experiment was 4A8wVYH2e3SPEsHUPTVcdrNGMmnZoPja9M7K9qxVqXyn

alex-fung commented 1 year ago

Fixed with: https://github.com/metaplex-foundation/digital-asset-rpc-infrastructure/pull/68