Questions tagged [storage]

all questions regarding data and storage on the ethereum blockchain

64 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
141 views

What filesystem should I use for geth and leveldb?

I used old LGA775 machine for running geth node. Its mobo has older sata 3gb/s (benchmark showed that ssd bottlenecked there) and only 4gb of DDR2, with windows installed. So syncing is a real pain ...
3
votes
3answers
567 views

How to handle dynamic size string array in solidity?

I have a shop owner and a shop owner can have multiple products. I want to keep the products id in an array. Also, A public method can return all the product id list of a shop owner. I tried the ...
3
votes
1answer
696 views

Regarding external file storage

Let's say you have a private blockchain, a DApp with an workflow to store and retrieve data from that blockchain. Now there is a need to store binary files and access it in a permissible way. One way ...
2
votes
0answers
18 views

Most efficient way to get all non-zero storage locations for a smart contract?

I'm looking at a mainnet smart contract and want to figure out all storage positions/slots where the storage has a non-zero value. Is there a way to do this other than replaying and tracing all ...
2
votes
2answers
289 views

Reset all values in a mapping

I am trying to figure out how to have the balance of all players reset to (amount) when a certain condition happens. This is the function that will update a specific player balance. How do I make it ...
2
votes
0answers
83 views

Can we use Ethereum Swarm to store normal data other than blockchain or dapp data.

I want some basic data to be stored like name and city phone no etc.So just want to ask can I use ethereum swarm just to store file and make several node to create decentralized storage.
2
votes
0answers
72 views

Plasma: how were the UTXO bitmaps conceptualised and how will they be stored?

From the white paper, page 5: We construct an interactive game whereby the exiting party attests to a bitmap of participants’ ledger outputs arranged in an UTXO model which requests a ...
2
votes
0answers
96 views

What is a cheap way to store mnemonic generator list of 1024 words in smart contract?

What is the cheapest way to store a list of 1024 words for a mnemonic generator, and why? These ideas had a gas cost of 165720 GAS for a string array, and 42300 GAS for storing all the words in a ...
2
votes
2answers
363 views

Declaring a memory array of storage pointers in Solidity

I would like to declare a variable as a memory array of pointers to storage arrays of uint256. For example: pragma solidity ^0.4.24; contract A { uint256[] public array0; uint256[] public ...
2
votes
0answers
196 views

Decentralized File Storage on Ethereum white paper

I am reading white paper of Ethereum, and I am confused by this example of the Section. Decentralized File Storage, which is part of the Section. Applications: The key underpinning piece of such a ...
2
votes
0answers
73 views

Is it possible for a mapping to run out of space?

Can storage mappings in a contract run out of space? Say that mapping was keyed to an address and the value as the following struct: User bytes32 name uint8 age Theoretically, if there was a ...
2
votes
2answers
132 views

Possible to search swarm or blockchain?

I'm getting my feet wet in this blockchain world and looking to build a dapp based on Ethereum for maintaining an inventory of products. About 400,000 items that can be updated, removed or added to by ...
2
votes
0answers
149 views

Extremely slow sync after moving to external drive (macOS; thunderbolt)

I was getting low on disk space so I decided to move the blockchain to an external drive with thunderbolt. I did it using Method 2 from this answer: In Mist browser how can I move the data (blockchain)...
2
votes
0answers
155 views

Global storage array - setting length on declaration vs inside a function

I have a global storage array of 64 entries, which I declare as follows: uint256[64] globalArr; However, its length really depends on a constant variable in my code: uint8 constant MAX_VAL = 63; ...
2
votes
0answers
179 views

In a private blockchain network, can we delete the first N blocks and reassign the N+1th block as the genesis block?

I am aware of the data loss caused by deleting the first N blocks. But I am curious to know whether such a task is possible or not. If so, how to practically implement it? ( I am using go-ethereum. ...
1
vote
1answer
40 views

How to download the blockchain of a single ethereum contract’s address?

The blockchain required to run ethereum is several Terabytes large. This means more than 9 years would be required to download it with my connection speed. In my case, I just want to know if the ...
1
vote
0answers
10 views

What are the rules on persisting old transactions?

If a new node joins the network and attempts a full sync, it requires all transaction information from genesis to build up its chain state. To do this the transactions it receives must be the ...
1
vote
1answer
29 views

How do programs on the 'Ethereum World Computer' compare to traditional programs or websites?

So this question has been bugging for me for a while and I can't seem to find the answer to it. Context I have been a web developer for many years. When I access a website, any frontend code is run ...
1
vote
0answers
26 views

Why is an address changing when I add it to an array?

I'm encountering a memory / storage issue (I think) w/ an array of addresses where I want to swap out one address with another. Here's how I've initialized the array: address[] public maintainers; ...
1
vote
1answer
37 views

How the data management is done in Ethereum blockchain?

Anyone who have a good idea about ethereum blockchain storage can send me some docs to get a good idea for myself? i am in a full confused state.
1
vote
0answers
41 views

Gas cost of adding an item to a class-level (storage) array

I would like to make sure that the gas cost of adding an item to a (storage) array is constant, i.e., not dependent on the length of the array. To my understanding, the relevant EVM operation is ...
1
vote
0answers
57 views

How can I create array of array contains characters with solidity

I recently approached the Smart contract two days ago. I'm still learning about it, and I have a lot of difficulties. Can you help me to create a variable like this photo? It has a arrays of numbers ...
1
vote
0answers
33 views

How to check last block in which storage variable was modified?

I am looking for method to quick chceck in which block variable was modified last. Assuming I have geth database synced in archive mode, that means I have all previous world states tries and accounts ...
1
vote
0answers
29 views

Best way to restore historical storage state

What is the best way to get historical storage state, given db with current world state and blockchain data? Do I need to reverse assemby code or can I do this using receipt logs?
1
vote
0answers
45 views

Can Factory Contract Be Used As Parent/Child Function?

I am attempting to modify the contract below; the way it is set up at the moment is so that the contract can be deployed, and then anytime a user wants to create a campaign, they can do so without ...
1
vote
0answers
147 views

how distributed cloud storage works with ethereum blockchain?

Distributed Cloud storage is a great concept , I have been doing a lot of search on this topic but couldn't get the exact information i am looking for:- How the projects like Storj are using the ...
1
vote
0answers
31 views

Miss aligned state loading/storing gas costs

For a smart contract idea that spins around in my head, I have the situation where I have to conserve the old values of a variable (no storage refund or cheaper SSTORE updates). As the value I write ...
1
vote
0answers
41 views

Share private data and prevent data forwarding

Let's say A has some private medical records of patients and B is a pharmaceutical company who wants to view medical records from A to find out the effect of a particular drug on the patients (run a ...
1
vote
1answer
327 views

Where do you save the application data of a Dapp?

Let's say that I want to implement a Dapp similar to Facebook. Each user has its own profile, pictures and information. Usually you would use a database to store all this data. This guarantees that ...
1
vote
0answers
88 views

Uncle blocks and their Relationship to Chain Size

How much do uncle blocks affect the overall chain size? Is the amount of added security they provide for the chain comparable to how much extra data they add to the chain? If, for some reason, all ...
1
vote
1answer
76 views

Decentralized Data Storage for IoT using Sia

For my Master research I want to make a proof-of-concept of decentralized data storage for an IoT scenario. My idea is to receive measurement values from a raspberry pi and to store them using sia. I ...
1
vote
0answers
121 views

Getting complete storage of a contract using geth client

I found at here, that it is possible for a client to get the value from storage of a contract at a particular index using eth.getStorageAt(contract_address, index) interface. I wanted to ask Is it ...
1
vote
1answer
66 views

CALL always throws exception on SSTORE

this.call(bytes4(keccak256("setGBA(uint32)")), 12); How to call function by string name? I can't modify store in function. How to do this?
1
vote
0answers
100 views

EVM Assembly tags

Studying the Solidity optimizer, I found that the assembly code is divided into tags and the optimizer doesn't work between them: It splits the sequence of instructions into basic blocks at JUMPs ...
1
vote
0answers
59 views

Where in the compile process do storage indexes get assigned to variable names and where can I sniff that data?

I have found the articles explaining how storage works and I understand that if I have a mapping that I need to know the key. What I'm trying to do is figure out how given, solidity code, abi, and ...
1
vote
0answers
47 views

All variables in the Storage

I am a newbie at Ethereum, could you clarify one question. Is it possible to see all variables within Storage of the Contract? If I don't know how many variables it has and want to see the list of ...
1
vote
0answers
64 views

How do I verify the integrity of my local chainblock data?

If I suspect local data corruption, is there a way to verify that my blockchain data is valid and will not affect my Ethereum work and transactions? Example: I switched to a self-compiled version of ...
1
vote
1answer
183 views

Looking for help with designing a private Ethereum blockchain to store information

I would like to be able to store a history of an object on a private chain and have it update-able via a website.It needs to hold public information and some hashed links to an external database. Just ...
1
vote
0answers
294 views

Downloading Mist Chaindata to a New Storage Device

The computer I am working on has an SSD and HDD. The Chaindata was originally set to download to the SSD, but the SSD has run out of storage. The computer is running Mist; how can I either (1) move ...
0
votes
1answer
22 views

Fire transaction from contract

I have a contract holding a mapping like this: mapping (address => User) users. How can I get the contract to automatically fire a transaction/event when a certain condition is met? For example, ...
0
votes
1answer
16 views

How data is stored in Ethereum blockchain?

If I become a full node in Ethereum and retrieve the current state, how all this data is going to be stored in my physical drive?
0
votes
0answers
28 views

Efficient way to save and retrieve hash in blockchain

I am learning Ethereum using Geth. I have a private blockchain and I am saving hashes through a REST API (python web service). I have readed I can save hash values using maps (mapping data type) and ...
0
votes
1answer
21 views

Storing name values off-chain in events and web3.js

Somewhere I read the advice to store name (title, geographical name, people name, etc.) value off-chain in events. But if a value is stored in an event, is there an efficient way to retrieve its ...
0
votes
0answers
33 views

Safe usage of delegatecall

Hey guys I have a few questions about delegatecall. The setup: I have 2 contracts A and B. A has 2 uint state variables B has 4 uint state variables To ensure storage layout compatibility, B ...
0
votes
1answer
13 views

arrays and structs for function arguments

A lot of contracts and libraries with functions that use arrays and structs for arguments. Structs can themselves include arrays, structs and mappings. For example: function doSomething(MyStruct ...
0
votes
1answer
8 views

Can you have an array of mappings? The mappings have an address key and a struct value

Can you have an array of mappings? I want to have mappings with addresses as keys and structs as the value. I want to store these addresses in an array and iterate through them. so far it looks like ...
0
votes
1answer
26 views

Data storage and replication in a private blockchain

What type of data is Ethereum storing (file? data row in DB)? Where does it put it (theoreticaly it is stored in peers, does this mean every node must have a local db)? How the peers of the p2p ...
0
votes
2answers
20 views

Set contract storage directly at deployment

Is there a way to pre-define a contracts storage when deploying it? Say I want a mapping to be filled with 1000 entries but want to avoid having to pay gas for adding every entry on its own. Since ...
0
votes
0answers
12 views

How to find which transaction cleared a specific address into a specific contract?

I have a contract with contains the following solidity code mapping (address => mapping (bytes32)) public sealedBids; But I failed to find in the solidity code which part can clear it. As result,...
0
votes
2answers
92 views

Decentralized database for ethereum?

I'm looking for a way to store data in a decentralized way such that I can access any record from within the smart contract, probably through oracles I guess? I've been looking into gundb but not ...