-
Notifications
You must be signed in to change notification settings - Fork 4
Description
NFTs impose a RAM burden on witness and API nodes by virtue of the fact that asset objects, including description field in which the NFT payload is embedded, are kept in RAM. Each NFT will consume a larger than ordinary amount of RAM for this for all nodes, including block-producing witness nodes, which can otherwise run on lean hardware since they don't serve an API to clients. Token creators should do their utmost to reduce the storage footprints of their artwork, however, a storage burden in some form is inescapable.
As a quick calculation, it would take 2,621 NFT's utilizing the entire 400KB max_transaction_size allotment to consume 1 GB of witness node RAM. This is not actually a lot of NFT's, if this becomes popular. At present, BP-only witness node consumes around 4GB of RAM, so this would be a 25% increase for for BP's for a mere 2,621 NFTs.
Aside from offloading storage requirement by storing links to content instead of actual content data, which has a disadvantage of making the NFT reliant on hosting through, e.g., ipfs, one option to reduce the RAM hit might be to publish the NFT with full artwork, but then in a subsequent block to replace the nft_object field contents and replace with an object that refers to the block number in which the original publication occurred. This means that witness and API nodes would no longer need to keep the full NFT object in RAM (they would instead keep the truncated form), and yet the full data would still be in the blockchain. A viewer wishing to retrieve the data would no longer find it in the asset description, but would be directed to retrieve the relevant block instead, and to extract the data from there. In this scheme, the NFT signature would still be in the asset description, but the NFT object would not. However, it would be retrievable without having to rely on off-chain storage.