4 ms·
How much "gas" does it cost to store data in the Etherium blockchain? The entire Etherium blockchain is about 180 GB.
by Animats 6y ago
How much "gas" does it cost to store data in the Etherium blockchain? The entire Etherium blockchain is about 180 GB.
- dezmou 6y agoThe image data is not stored, only the seed needed to generate the bitmap, the image generation is done by a gasless view function when needed
- jstanley 6y agoThat doesn't really help in the general case. If you can compress arbitrary images down to a single small seed, then you have the best image compression algorithm in the world. The applications of good image compression are much broader than NFTs. It looks like this project doesn't actually store arbitrary pictures.
- dezmou 6y agothis is why this approach is reserved to on-chain generated NFTs
- babyshake 6y agoWhat about the types of sprites that you would find in an Atari 2600 or similar system? Would it be even remotely practical to store these on the Ethereum blockchain?
- dezmou 6y agoA 64x64 monochrome bitmap would weight 512 bytes, still very expensive to store on blockchain
- chrisco255 6y agoNah, it's not that prohibitive. Your standard Ethereum smart contract has at least a dozen variables stored at any time. About a year ago it was roughly $13 per KB. That price has probably doubled since then.
- vmception 6y agoThe real answer is that you have to pay attention to the gas limit per block, which is pretty high now On the Ethereum EVM it is 12,000,000 ether gwei. Most blocks are full. If you are willing to pay 12,000,000 ether gwei at competitive gas prices, it will get mined. For an image application you can probably use as many blocks as you want to create and store a larger image. As blocks are already full, this wont change anything, some people will get priced out for the time being or they pay higher gas price, miners get paid 12,000,000 ether gwei * gas price either way. So gas prices right now are like 135 gwei. 12,000,000 ether gwei is 0.012 ether. 0.012 * 135 = 1.62 ether @ $1,704 per ether = $2760 cost if you want to fill up an entire block Binance Smart Chain EVM has 30,000,000 binance gwei gas limit. And the binance token is much cheaper to begin with at the moment. and there are other EVMs, you can find the EVM you want to use. Ethereum mainnet EVM has the highest number of nodes to store it though. Its economical if you can sell it for a higher price. No different from any other art trade, artist can take the risk or a studio can front capital.
- vmception 6y agoSidenote: you should really learn about the EVM and be able to synthesize the same answers as I did this is unrelated to being a “blockchain skeptic”, a “no-coiner”, a “bitcoin only, Ethereum is too centralized, dont mention any other distributed ledger around me” person, or anything else The EVM (Ethereum Virtual Machine) concept is as important to be up to speed on as the JVM (Java Virtual Machine) concept
- c-cube 6y agoSidenote: you should really learn about homeopathic dilution and how to synthesize the same cancer drug as I did. This is unrelated to being a "homeopathy sceptic", a "no-diluter" person, or anything else. --- Really? If you think blockchains are stupid, why should you learn about the details of how exactly the pollution happens and how much real money is used to power each transaction?
- vmception 6y agoBecause I think ad retargeting conglomerates are stupid too but they still use the JVM and I’ll work for san organization or project involved in that which uses Java
- kfichter 6y ago20,000 gas for 32 bytes of data if you want it to be accessible by other smart contracts. 16 gas per non-zero byte (4 gas per zero byte) of "transaction input data," which is accessible to clients off-chain but is not accessible to smart contracts.
- Canada 6y agoYou are way off. The entire Ethereum blockchain is approximately 6 TB. Even a pruned version is over 400 GB. There is no specific cost for storage, only gas for execution. For dynamic storage the SSTORE operation stores a word (256 bit). It costs 20,000 gas when the value is set from zero to non-zero, 5,000 gas when the value is set from non-zero to non-zero, and it provides a refund of 15,000 when the value is set from non-zero to zero. This is the only way to make data readable by contracts and thus light clients. There is also the option of storing as code, which cannot be updated. There's the 32,000 gas paid for the CREATE and then 200 gas per byte for the code. This is much cheaper at 6,400 gas per 32 bytes. So deploying a 128 byte string assuming a gas price of 100 GWEI and $1700 ETH: 32,000 + (6,400 * 4) = 57,600 gas 57,600 gas * 0.000000001 ETH (1 gwei) * 100 gwei * $1700 = $9.79 This would just store bits, it wouldn't be a valid contract you could actually call. Or you could write your data as the parameters to a contract call at a price of 4 gas per zero and 16 gas per non-zero.. You would be able to read data stored this way off etherscan. I'm not including the base 21,000 gas you have to pay for any transaction.
- saurik 6y ago> You are way off. The entire Ethereum blockchain is approximately 6 TB. Even a pruned version is over 400 GB. Your 6TB figure includes "store every single historical past state of the system", which is going "above and beyond": it is something that you never need to do for either correctness or operation of the system, whether as a user or as a miner... the only people who use archive nodes are people who are trying to more easily step-by-step debug old transactions.
- Canada 6y agoYou need a full fat DB if you want to be able to accurately detect transactions more than 2 days old. You need to do it if you care about more than just the current balance and don't want to rely on a centralized middleman such as etherscan.
- saurik 6y agoI don't understand what you mean by this; you do not need an archival node to either pull transaction receipts or to request transaction logs: you only need an archival node if you want access to all of the starting storage states of all past blocks, which you effectively never need (except for debugging). Notably: a "full node" is not an "archive node", and will not need more than the 400GB of space.