All Questions

131
votes
2answers
23k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
100
votes
2answers
18k views

Are there well-solved and simple storage patterns for Solidity?

Simple and appropriate data organization can challenge Solidity newcomers. It wants us to organize everything in ways many of us aren’t accustomed to. Are there well-solved general patterns for ...
86
votes
5answers
20k views

How can a contract run itself at a later time?

In my blockchain application, I would like to have an event triggered at a later time, hours or perhaps even days after the application has most recently received a transaction from a user. How can I ...
147
votes
11answers
28k views

Upgradeable smart contracts

If the contract issuer wants to have a way to upgrade the contract code, so that account data and other things carry over, can Ethereum provide for this? Also can this be done without changing the ...
140
votes
14answers
37k views

How can I securely generate a random number in my smart contract?

If I am writing a smart contract for some kind of (gambling) game, how can I generate a random number securely? What are the best practises and security trade-offs to be aware of?
64
votes
5answers
19k views

How is the address of an Ethereum contract computed?

How is the address of an Ethereum contract computed? What use cases are there for knowing a contract's address in advance?
14
votes
1answer
16k views

How can I reverse or cancel a transaction or recover lost ethers?

Transactions (using a smart contract like a token or sending ether), by design, are immutable on the blockchain. What methods can be used to (more or less) unilaterally reverse a transaction made by ...
74
votes
11answers
26k views

Common useful JavaScript snippets for geth

In geth you can loadscript any .js file. I discovered this one on the wiki which I like a lot: function checkAllBalances() { var i =0; eth.accounts.forEach( function(e){ console.log(" eth....
99
votes
2answers
63k views

How are ethereum addresses generated?

What criteria does a valid ethereum address need to fulfil? Is it just a random number in hexadecimal? Or does it need to be derived in a specific way, according to some cryptographic algorithm? What ...
53
votes
6answers
180k views

How to import a plain private key into geth or Mist?

This is such a basic question, but I can not figure out how to import a plain, unencrypted private key into geth or mist? I tried geth account import 7[......]bla but it seems this command is always ...
70
votes
9answers
92k views

Help with very slow mist sync

I have seen other posts in reddit where users experienced slow sync times. I am using windows 10 and version 3.7 (I saw on gitter that other users on windows 10 had trouble with version 3.8 crashing). ...
149
votes
7answers
112k views

What are the Ethereum disk space needs?

How fast is Ethereum blockchain growing and how big is it likely to get in the future? Is it still about 1 GB per month? Are there any data pruning or compression algorithms in place?
196
votes
7answers
126k views

What is meant by the term “gas”?

An Ethereum application that I want to use talks about needing "gas" to run. What is gas, and where do I get it?
83
votes
7answers
30k views

What is an ABI and why is it needed to interact with contracts?

ABI is referenced in many places including the official Ethereum website. What is an ABI and why is it necessary to use?
16
votes
2answers
4k views

Why is my ether balance 0 in geth, even though the sync is nearly complete?

My geth --fast sync is nearly complete, and the balance shows correctly on Etherscan. I was running geth on linux and haven't synced in a while, so I deleted the chaindata and updated the wallet and ...
74
votes
6answers
43k views

Ethereum block architecture

Where can I find a description (preferably a diagram like below) showing the block structure in an Ethereum blockchain? Credits: Wikipedia
43
votes
7answers
18k views

How to get contract internal transactions

I'd like to get the contract internal transactions like: https://etherscan.io/address/0xd654bdd32fc99471455e86c2e7f7d7b6437e9179#internaltx I'm using web3 API. Is there any way to do it? Where do ...
43
votes
3answers
18k 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 ...
34
votes
5answers
7k views

Ropsten testnet is under kind of attack? What can we do?

For the last approximately 24 hours, Ropsten testnet is under an attack in my opinion. The gas limit is raised to 200m and the attacker was proposing blocks with more than 4,000 internal txs ...
48
votes
5answers
73k views

How can I get a geth node to download the blockchain quickly?

I'm running a geth node on slow hardware. At the current rate of progress it could be several days before I can download all the blockchain. Is there a way to get it to synchronise more quickly?
58
votes
7answers
159k views

What is the recommended way to safely store Ether?

There are several options for storing Ether : Accounts Mist/Geth accounts. Paper wallets. Icebox Air gapped offline signing of transactions Wallet Mist Multi-signature. In short there are a lot ...
52
votes
13answers
21k views

How do I set up a private ethereum network?

I'd like to set up a local (private) blockchain that isn't connected to the wider internet so that I can deploy some test contracts. How do I go about doing that?
90
votes
2answers
81k views

What is Geth's “fast” sync, and why is it faster?

One of the answers to this question suggested using Geth's --fast flag to help quickly synchronise the block data. How does the flag work, and how does using it speed up the synchronisation? Are we ...
53
votes
5answers
71k views

What number of confirmations is considered secure in Ethereum?

In Bitcoin, 6 confirmations are considered secure (very low probability of transaction/block reversal). What is the current number in Ethereum?
18
votes
2answers
6k views

Deploying the Greeter contract via the geth CLI is not registering in my private blockchain

I am running a local private Ethereum blockchain using: geth --networkid 60098 --genesis CustomGenesis.json --nodiscover --maxpeers 0 --rpc --rpccorsdomain "http://localhost:3000" --datadir "./data" ...
22
votes
2answers
43k views

Why is my node synchronization stuck/extremely slow at block 2,306,843?

Using macOS 10.12.1 with Ethereum Wallet 0.8.7, nodes are connected but Sync doesn't even start. Stuck at block 2,306,843. What can I do? Please keep in mind, I am neither a coder nor a tech geek.
42
votes
1answer
39k views

What is Geth's “light” sync, and why is it so fast?

This question is in a similar vein to the past questions about geth --fast and parity --warp. There was a recent question where the OP wanted to do as little syncing as possible, and one of the ...
37
votes
2answers
24k views

How do I convert my The DAO tokens into ethers using the withdrawal contract after the hard fork?

The DAO contract was attacked on 17th June 2016 where the attacker drained about USD 50 million worth of ethers using a recursive call vulnerability in The DAO contract code. The attacker drained ...
66
votes
8answers
11k views

Can contracts pay the gas instead of the message sender?

Is it possible for a contract to pay the gas costs (or part of it) that result from the contract being called? Or does the sender of a message always pay the resulting gas costs no matter what?
24
votes
3answers
15k views

How can I make new account by JSON-RPC?

I'd like to make new account by JSON-RPC.I've checked the wiki of Ethereum, however I could not find out how to do that. I've found call existed accounts, but it isn't what I want. eth_accounts ...
69
votes
2answers
18k views

What is an uncle/ommer block?

The Ethereum blockchain is described as containing "ommer" blocks, usually called "uncle" blocks by the general public. What is an ommer/uncle block, and why are they needed?
19
votes
2answers
2k views

Private info in an Ethereum smart contract

Is there any way to store info on a smart contract, and keep it a secret? If a contract has a state variable that is not public like: contract foo{ uint public publicVariable; uint notPublic;...
34
votes
2answers
19k views

Is there a limit for transaction size?

Is there a theoretical limit for transaction data size when you send a transaction to Ethereum network? Ref. Is there a (theoretical) limit for amount of data that a contract can store?
85
votes
5answers
25k views

How can an Ethereum contract get data from a website?

What is the process/workflow behind the process where an Ethereum contract gets some data from a website?
43
votes
3answers
68k views

How to backup mist wallets?

I know I can backup the keystore files from my running ethereum client which holds my accounts. But how can I backup wallets created with mist? Is it enough to write down the public address where the ...
17
votes
2answers
2k views

In a private blockchain, why do miners keep adding empty blocks to the blockchain?

I have been working on a private blockchain and observed that a miner, when started, keeps on adding empty blocks with no transactions to the blockchain. Why is this happening? It doesn't make any ...
48
votes
2answers
14k views

What's the difference between 'msg.sender' and 'tx.origin'?

If either are used in the body of a Solidity function that may change the state of a contract (write call), what's the primary difference and/or benefit of using one over the other. For example: ...
34
votes
8answers
17k views

How to quickly test a Solidity function?

There are snippets and functions of Solidity code provided on this Ethereum Stack Exchange and other sites. What are ways to quickly test them, possibly debug a little, and play around?
28
votes
2answers
12k views

Get public key of any ethereum account

Can I somehow get the public key of an ethereum account knowing just the corresponding ethereum address (e.g. 0x54dbb737eac5007103e729e9ab7ce64a6850a310)?
19
votes
5answers
27k views

How do I get the raw private key from my Mist keystore file?

I use the Mist wallet. I would like to know: How I can get the private key of my account. How I can use this private key to sign messages.
39
votes
3answers
31k views

How to call a contract method using the eth_call JSON-RPC API

Ok, so I'm trying to call a contract method using the methods provided by the Ethereum JSON RPC interface. The JSON RPC is running on an Ubuntu machine. Unfortunately, I can't really get a result back ...
17
votes
3answers
19k views

How to get return values when function with argument is called?

I am writing below a simple contract which stores all results of questionnaires for each ID. contract answer{ mapping(address => mapping(string => bool)) voters; struct qList { uint ...
15
votes
2answers
2k views

How do I retrieve the Voted events from TheDAO?

This question was asked by @Pablo Yabo in the comment section of the question How can I view The DAO proposals including the current voting status?.
61
votes
3answers
19k views

Difference between require and assert and the difference between revert and throw

I was looking at the docs and Im looking for clarification on the difference between require and assert and throw and revert. assert(bool condition): abort execution and revert state changes if ...
23
votes
3answers
11k views

What are the limitations to estimateGas and when would its estimate be considerably wrong?

web3.eth.estimateGas and JSON-RPC estimateGas can be used to see how much gas should be specified for a transaction, before crafting the transaction. Since it is an estimate, are there any ...
47
votes
2answers
45k views

How do I backup my ether accounts?

I want to backup my accounts onto a USB or other external device for safe-keeping. How can I do that?
23
votes
4answers
7k views

What public test-networks and faucets exist?

What public test-networks exist and what are their conditions? What are the connection data? How often (if so) are they reset? Does a public faucet exist for this test network? Does a block explorer ...
18
votes
1answer
7k views

Deploy contract from contract in Solidity

It's a common pattern to use a hub/factory contract to create multiple instances of a standard contract. It's also common to require a way to enumerate the addresses of the created contracts. Is ...
19
votes
4answers
8k views

How can the transaction status from a thrown error be detected when gas can be exactly the same as the gasUsed for a successful transaction?

This question arose from answering Transaction Status. In the following example, I am sending gas of 21,000 (the amount required for a regular transaction). In this situation gas == gasUsed, and so ...
16
votes
2answers
3k views

What is the default ordering of transactions during mining, in e.g. geth?

I know that the yellow paper does not specify how transactions are to be ordered in a block and this is up to the miner to decide. But I am interested in how this is practically handled (I assume not ...

15 30 50 per page