Questions tagged [storage]

all questions regarding data and storage on the ethereum blockchain

Filter by
Sorted by
Tagged with
128
votes
1answer
48k views

What is Swarm and what is it used for?

What is Swarm and what is it used for? And what is Swarm's relationship with Whisper?
93
votes
5answers
44k views

What is the difference between Swarm and IPFS?

IPFS seems a little slow on existing dapps. will Swarm load content more quickly? Also- is there a roadmap for swarm?
48
votes
4answers
11k views

Is there anything stopping me from using the ethereum blockchain as data storage?

As I understand it, smart contracts are currently immortal by default. Does this mean that I could create a contract that happened to contain an encoded form of baby photos and have it stored forever? ...
46
votes
5answers
21k views

What is the cost to store 1KB, 10KB, 100KB worth of data into the ethereum blockchain?

Whatever is stored in the blockchain is immutable which means I can fetch this data back in the future. As of today (2016-feb), How does one store a 1kb, 10kb, or 100kb or arbitary data/text in the ...
40
votes
2answers
9k views

Is there a (theoretical) limit for amount of data that a contract can store?

Is there a theoretical limit to the amount of data that one contract can store while running in a private net in which gas is not a concern? Context: In a financial Dapp which is to replace global ...
35
votes
1answer
16k views

What does the keyword “memory” do exactly?

I've been looking through the code of Etherdice and noticed that some variables are declared like ParserResult memory result; and I haven't found the keyword "memory" in any documentation. What I ...
32
votes
3answers
8k views

Difference between Memory and Storage?

What is the difference between Memory and Storage ? From both the EVM point of view and the contract design one. Thanks!
31
votes
2answers
29k views

How can I store data in ethereum blockchain

I want to store pdf hash in blockchain I already read this post What are some proposed ways of storing data in Ethereum? But I'm beginner in this domain and I don't understand... Is it possible to ...
26
votes
1answer
2k views

Is searching data stored in event logs prohibitively slow?

Augur uses event logs to store data that never needs to be accessed on-contract, since it is about 10x cheaper than on-contract storage. However, I've noticed that retrieving event logs (e.g., using ...
25
votes
3answers
15k views

Where is the state data stored?

This question was asked on Reddit a while ago: Where is the state data actually stored though? On the hard drive of each node? Separate from or within the blockchain? — Reddit: Basic ...
20
votes
7answers
9k views

What are Storj and Sia and how different are they from Swarm and IPFS

I have recently discovered some blockchain based storage technologies like Storj and Sia. I have vaguely understood that they rely on their own blockchain with their own cryptocurrency. But why are ...
16
votes
2answers
1k views

Can a contract's internal storage keep increasing forever?

In other words, is there a limit on the amount of storage a contract can hold? Suppose a field is an Array for instance, and the contract has a method for adding items. Can I keep calling the ...
15
votes
2answers
2k views

Can a contract access another contract's storage?

I have a contract with numerous complex structs. Is it possible for a second contract to iterate over this data directly? I can't really use public accessor/getter methods as it's not possible to use ...
15
votes
1answer
2k views

How do I get the storage indices/keys?

I would like to explore the storage data of a contract. I have geth fully synched and I interact with it over RPC. There is the function "eth.getStorageAt(addr, index, block)" provided, but you need ...
15
votes
1answer
969 views

Struct not being stored in mapping when it contains more than two 'string' properties. Bug?

I am playing around with Solidity, and have encountered an extremely bemusing issue. I want to have a mapping of Address instances (postal addresses NOT the address type) Address is a custom defined ...
14
votes
3answers
2k views

Is there a functional equivalent to Factom in Ethereum?

Factom is a distributed data and records management and audit system. How easily can what Factom does be done in Ethereum? Are there any working DAPPS doing this? Could a simple smart contract take ...
14
votes
2answers
11k views

TypeError: Data location must be “storage” or “memory” for parameter in function, but none was given

/// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param ...
14
votes
1answer
2k views

How to read a private variable from a contract?

Given a contract, how can I find out the current value of one of its variables (as a dev, not from the context of another contract), if it's not public?
12
votes
1answer
335 views

How growing contract storage increases the gas spending?

I have some further questions about this and this threads. For simplicity, let's imagine that I want to create a cryptocurrency on top of ethereum. The contract that "handles" this cryptocurrency ...
11
votes
2answers
3k views

Ethereum event log maximum size

I'm thinking of storing some data in logs by emitting events but I cannot easily find the answers to the following questions: What is the total size limit of one event? Can I store lots of string32 ...
11
votes
2answers
18k views

How does data storage on the blockchain work?

If I store file chunks in the blocks, I'm causing duplicated blocks all over the networks (I mean, my file's chunks will be in each computer on the blockchain network, So eventually I have many many ...
11
votes
1answer
7k views

What are some proposed ways of storing data in Ethereum?

I keep reading that swarm or ipfs would be used for storage, but how would that work exactly? Would an ethereum contract store its data in these data blockchains? I thought ethereum smart contracts ...
11
votes
3answers
4k views

What does web3.eth.getStorageAt() return?

I want to know how this works: web3.eth.getStorageAt(addressHexString, position [, defaultBlock] [, callback]) What data we can store at any address and how? And what will this eth API return?
10
votes
1answer
5k views

How can I store big files on the blockchain?

I can hardly create transactions larger than 100kiB. I am wondering, is it possible to store huge files (several MiB or GiB) on the blockchain? If so, how?
10
votes
1answer
1k views

Data sharing on the private blockchain

Assuming that there are multiple parties on the private blockchain, few general questions on the private blockchain usage: Can Personally identifiable information (PII) data be stored on blockchain? ...
9
votes
2answers
382 views

Is the entire blockchain (including the genesis block) stored forever?

Quick question: Is the complete blockchain for Ethereum stored for as long as the currency exists? If not, then what determines the amount of time the binary for a contract can exist to be called? If ...
9
votes
2answers
2k views

How to access files hosted on swarm?

The swarm roadmap suggests that the orange paper series and a landing page is released on swarm. There is also an internet gateway for swarm: http://swarm-gateways.net/bzz:/theswarm.eth/ But how to ...
9
votes
1answer
5k views

Nested structs in solidity?

Is it possible to have a struct inside a struct? I am not sure about the data type internals, but I was basically trying to do something like (pseudo-code): library IpfsUtils { struct IpfsHash { ...
9
votes
1answer
676 views

Truffle framework with storage

How can I integrate truffle with swarm or ipfs for permanent document storage? Are there any libraries?
8
votes
2answers
2k views

DApp storage for data other than tranactions?

For the purpose of illustration, say I would like to create a decentralized version of Yelp. A centralized approach would be to have a restaurants table and a reviews table in an Mysql database. In ...
8
votes
1answer
1k views

How is contract storage arranged?

Thinking about smart contract storage, how is the data arranged? I know that every variable within a contract has an unique ID, therefore, it's possible to create a node with a structure like <...
8
votes
2answers
683 views

Why does delete increase overall gas cost?

My understanding is there is a gas refund for delete and the idea is to encourage developers to remove garbage from contract states. Consider this contract with a delete-enabled index of keys to ...
8
votes
1answer
871 views

What is the composition of the blockchain database?

From axic's explanation of the structure of the ethereum database, we learned that data is stored in Merkle Patricia tries, usually inside a LevelDB store. It consists of structures such as blocks, ...
8
votes
1answer
572 views

Is it convenient to use mappings as temporary KeyValue instances?

Consider the following contract that illustrates the problem. Here we have a dynamic array of mappings, add() is meant to add a fresh new mapping to the end of the array, return the value for mapping ...
8
votes
1answer
2k views

Is Ethereum suitable for a storage application?

I'm interested to make an app to store some data and I'd rather think that the blockchain might not be the only or the right solution for me. I'd like the users to contribute data and to make that ...
7
votes
2answers
6k views

How to initialize an empty array inside a struct?

Is there a mistake in the way I initialize Bar b in the function foobar? contract Foo { struct Bar { address owner; uint[] x; } Bar[] public bars; function foobar(...
7
votes
1answer
2k views

What's cheaper — contract storage | log data | transaction input?

I want to collect user data and store it on the blockchain. Let's say I need to store usernames. Is the cost of storing 1 byte on the blockchain different for contract storage/log data/transaction ...
7
votes
2answers
3k views

How to fill dynamic in-memory array

For some reason solidity doesn't allow to push values into memory array Member "push" is not available in bytes32[] memory outside of storage. Here is sample contract code: pragma solidity ^0.4....
7
votes
1answer
264 views

How do I Zero Storage

I am trying to delete all the players that played a turn in a game. The contract is not meant to permanently store a list of players, it simply keeps track of players that have played in the current ...
6
votes
1answer
942 views

Status of Swarm vs IPFS

I have been studying ipfs for a few days.. still a newbie.. its a amazing protocol. So is Swarm. Correct me, if I am wrong, but right now ipfs cant be used for long term storage or even as a backup. ...
6
votes
0answers
2k views

“Push” is not available in bytes32[], memory out of storage [duplicate]

Here is the function of my code where error comes ``` function getPeople() constant returns(bytes32[], bytes32[], uint[] ) { uint length = people.length; bytes32[] memory firstNames = new bytes32[]...
5
votes
3answers
3k views

Blockchain password manager

Is there a blockchain, or a smart contract designed to store user passwords? I am using a proprietary password manager and have hundreds of passwords stored there. I am just a bit worried that the ...
5
votes
2answers
3k views

How can I estimate price of data storage? [duplicate]

I'd like to make estimations of the cost of an application, and one of the things I need is the price to store n kB of data on a contract. In ether and in USD. Where could I find rates or prices of ...
5
votes
1answer
2k views

Storing use login details for an Ethereum app

I have an idea for a dApp using Ethereum that would require user registration and a login system. Once logged in, the user will trigger transactions and smart contract part will come in. However, I am ...
5
votes
2answers
162 views

Stack Exchange Structure Using Ethereum

Could one build a "Stack Exchange" like information structure or process over Ethereum? Could the "Stack Exchange" team use Ethereum to build a new and improved information learning structure? As it ...
5
votes
4answers
115 views

Efficient Solidity storage pattern for a directional weighted graph

I would like my graph's nodes to each have a struct of data and 0 or more pointers to other nodes. It needs to be efficient for insertions of new nodes in between two existing nodes. Should I use ...
5
votes
3answers
258 views

Why memory arrays are unresizable?

I don't know the required length of my array before execution of the function.. why technically can't I resize my memory array? What is the common way to go around of this problem, if you are also ...
5
votes
1answer
330 views

Ethereum metadata limit

Couple of days ago Vitalik Buterin tweeted that Ethereum has no metadata limit. Is that true? Two major questions that bothers me, as a developer: I can store any amount of data inside contacts? ...
5
votes
2answers
711 views

Optimizing storage for an array of addresses

When possible, does Solidity optimize a storage array of address? For example, does address[8] take up 5 storage slots (160 bytes), or 8 storage slots? contract C { address[8] arr; } If 8 slots ...
4
votes
2answers
125 views

Why is the Eternal Storage approach still used if it hugely increases gas usage compared to storing data in structs?

I was wondering why is the eternal storage approach (first code snippet) still used? I know it's meant to make contracts upgradable but it seems too expensive to me. contract Storage { mapping(...