Questions tagged [memory]
Questions related to memory use in Solidity or by nodes
28
questions with no upvoted or accepted answers
4
votes
3answers
394 views
convert bytes to uint8[8] using mstore()
I know how to convert bytes to uint8[8] using mload but mstore seemed like it could be more gas efficient.
Is something like this possible?
function bytesToUintArray(bytes input) returns (uint8[8])) ...
4
votes
1answer
370 views
personal.newAccount(“mypassword”) stops the server when i create two accounts consecutively in local privatenet
personal.newAccount("mypassword")
stops the server when i try to create two accounts one after the another.
personal.unlockAccount(eth.accounts[0],"mypassword");
same happens when I try unlock ...
3
votes
0answers
178 views
Quorum failure - Failed to decode message from payload
We use in our project -JP Morgan Quorum (Ethereum based) bloackchain - with istanbul voting mode. We have 4 nodes (3 of them are validators - hard coded, nonchangable)
And from time to time (...
2
votes
0answers
30 views
How to store array parameter of a function to contract state?
I am trying to save an invoice to contract storage (see function addNewInvoice(..)) but I seem to be tripping over the data locations.
// SPDX-License-Identifier: private
pragma solidity >=0.7.0;
...
2
votes
0answers
83 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
0answers
78 views
Assembly operations throw warnings during compiling
Leveraging the following common string utility has been quite helpful, but would like to get rid of a warning:
function stringToBytes32(string memory source) returns (bytes32 result) {
assembly ...
2
votes
0answers
59 views
How does a plot “Gas price to call / memory allocated” looks like?
Pretty simple question: i.e. I have a dummy contract like this one:
contract simple {
uint[] dataArray;
function push_one_more() {
dataArray.push(1);
}
}
How does the cost of ...
1
vote
0answers
31 views
Saving String Memory Argument to Struct Array
I have the following Solidity code that compiles and tests okay, but the insurancePlan property of the Patient struct is not being saved. I've tried many variations and it is just blank (empty) when I ...
1
vote
0answers
53 views
Private Ethereum PoA error: “out of memory”
I'm working with multi node setup on Ethereum private chain PoA. We have all three validator nodes.
blockchain
├── genesis.json
├── node1
│ ├── geth
│ ├── keystore
│ ├── ...
1
vote
0answers
75 views
What is the default cache value of Geth?
According to the help page of Geth, --cache value defines
Megabytes of memory allocated to internal caching (default = 4096 mainnet full node, 128 light mode) (default: 1024)
I don't quite get it, is ...
1
vote
1answer
222 views
Type struct Mycontract.User memory is not implicitly convertible to expected type struct Mycontract.User storage pointer
pragma solidity >=0.5.0 <0.7.0;
contract Mycontract{
uint256 a;
struct User
{ string name; }
User[] users;
function foo() public{
**User storage user=User("hey&...
1
vote
0answers
21 views
Calling private function from external - where are referenced type parameters stored in the end?
Let's assume we have something like:
contract C {
function externalFunction(uint256[] calldata data) external {
privateFunction(data);
}
function privateFunction(uint256[] memory data)...
1
vote
0answers
27 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
0answers
38 views
How to get live mempool transactions whitout full blokchain
I just want to analyse all mempool txs in realtime.
I cant use an api because after several requests my ip gets blocked for some minutes, so I dont get the txs in this time.
Thank you for help.
1
vote
0answers
39 views
getLogs RPC makes filters?
I am stuggling with memory explosion issue of Parity on my EC2 instance.
The memory usage of it keeps increasing gradually.
I suspect that getLogs API call makes some garbage on the node. But I ...
1
vote
1answer
9k views
GPU'S Failed cannot create DAG
Last night everything is fine and then this morning I check my mining its's closed I think it was restarted or close accidentally then when I open my pool I have this error.
ETH: 5 pools are ...
1
vote
0answers
51 views
Solidity VM memory management
I'm trying to do an external function call in assembly.
So I have to prepare a memory area that store the input args.
But where's the address that I should start with mstore?
I mean, there are some ...
1
vote
0answers
27 views
How load out data from blockchain when it occupies too much space?
If the blockchain working long enough it fills the memory of the mining device, how to load out the data and then rerun the system?
and why does my mining device has different miner address every time ...
1
vote
1answer
2k views
Memory usage and limits for go-ethereum
geth (and swarm) seem to require a lot of memory, and there are also reports that they tend to an all you can eat approach to system limits.
1) What are the actual memory requirements for geth?
2) ...
1
vote
0answers
280 views
For what data does Ethereum use Memory Database, and for what does it use Level Database
Ethereum uses two databases Memory database and Level Database. Is data stored in MemoryDatabase different than LevelDb? In what cases is one database used over other?
The question is different from -...
1
vote
0answers
562 views
Extreme memory consumption by geth
I'm using geth's traceTransaction() API to index certain opcodes that are used in transactions. When I request traces from some transactions (e.g. ...
0
votes
0answers
23 views
How store memory array in storage
In this code, I want to send an array of bytes32 and store them in the struct but I get the error which is
TypeError: Type string memory[8] memory is not implicitly convertible to expected type ...
0
votes
0answers
20 views
Storage vs Memory in the context of Gas Cost
I have two snippets -- one using memory, the other referencing storage:
function winnerName() public view
returns (string memory winnerName_)
{
string memory winnerName_ = ...
0
votes
1answer
81 views
Clarification on how Calldata persists on the blockchain and how Optimistic Rollups use it
So I see that a lot of optimistic rollup solutions say that they store the chain's transaction data on Ethereum via "calldata" which is way cheaper in gas costs than contract storage (I ...
0
votes
0answers
22 views
How secure is this memory wallet?
As we know memory wallets more specifically Brainwallet 1.0 is a failed technology. I want to know how secure is this wallet system? It uses blockchain transaction hash and passphrase to calcualte ...
0
votes
0answers
30 views
Memory Arrays Should Have Push() And Pop()
Dynamic memory arrays currently cannot be resized. This is true for Solang and solc solidity. However, Solang uses a heap, and has a realloc() function. Thus it is is possible for Solang to support ...
0
votes
0answers
16 views
How to save/read mappings within struct?
I am trying to create a mapping inside struct and then create a mapping of the struct. Take a look at below example:
// ------------------------------------------------------------------------
...
0
votes
0answers
975 views
FATAL ERROR: Rebalance Allocation failed - process out of memory
So while running truffle compile for my contracts on AWS Ubuntu server I got the following error:
<--- Last few GCs --->
[17055:0x3985730] 11958 ms: Scavenge 511.7 (553.4) -> 506.9 (553.4) ...