samuelvanderwaal / metaboss

The Metaplex NFT-standard Swiss Army Knife tool.
Apache License 2.0
691 stars 220 forks source link

Error while using snapshot #110

Closed shoxie closed 2 years ago

shoxie commented 2 years ago

I'm trying to use snapshot with command:

metaboss snapshot mints -c <CMid> -r https://api.mainnet-beta.solana.com

to get all mint accounts from candy machine. I also tried using different RPCs (solana, projectserum).

Expected behavior

The command should return a json file with all mint accounts associated with provided candy machine id

Current behavior

Console prints this while using solana rpc:

Error: HTTP status client error (410 Gone) for url (https://api.mainnet-beta.solana.com/)

Caused by:
    HTTP status client error (410 Gone) for url (https://api.mainnet-beta.solana.com/)

And this while using projectserum rpc:

Error: error decoding response body: expected value at line 1 column 1

Caused by:
    0: error decoding response body: expected value at line 1 column 1
    1: expected value at line 1 column 1

Is this a common error ? Please help me. Thanks.

samuelvanderwaal commented 2 years ago

Sorry I missed this. As you probably figured out, a lot of public APIs block getProgramAccount calls to the token-metadata program because of how heavy this call is. Right now only a few RPCs support it so metaboss snapshot commands don't work on a lot of RPCs. QuickNode has their own caching thing going on so snapshot commands should still work there, and I know GenesysGo has plans to get it working again.

I'm considering a work around, but it also wouldn't work on most public APIs as it requires access to historical data and it's not clear how reliable the method is yet. There's just not a great way to do this with the current Solana design.

johnlev0 commented 2 years ago

Hi! is there a solution to use metaboss to get snapshots on a free rpc ?

samuelvanderwaal commented 2 years ago

Hi! is there a solution to use metaboss to get snapshots on a free rpc ?

Probably not, but it depends on if the RPC supports the getProgramAccounts call on the Token Metadata program. If you get a 410 Error that means it doesn't work and there's nothing I can do about it. Hopefully there will be better ways to query this data at some point.