All Questions

Filter by
Sorted by
Tagged with
51
votes
4answers
37k views

<address>.send vs <address>.transfer best practice usage?

I noticed that address's offer two member functions that perform the transfer of ether to the specified address. send returns false upon failure and transfer raises an exception. In the Solidity ...
51
votes
9answers
28k 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 ...
51
votes
5answers
80k 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?
51
votes
1answer
48k 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 ...
51
votes
3answers
22k views

How to reduce the chances of your Ethereum wallet getting hacked?

Summary The hack that occurred on May 12 2016 to steal 7,218 ethers from Patrick only affects miners where: Incoming RPC connections from the Internet on TCP port 8545 are forwarded to the machine ...
50
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? ...
49
votes
2answers
46k 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?
49
votes
3answers
8k views

What is a recursive calling vulnerability?

What is a recursive calling vulnerability exactly? When creating smart contracts, DAOs or DAPPs, what measures can I take to ensure I am not vulnerable?
49
votes
1answer
51k views

Which TCP and UDP ports are required to run an Ethereum client?

The geth CLI options suggest that per default the client listens on TCP port 30303. This page, additionally suggests that UDP port 30301 is used for node discovery. Is this all that is required or ...
49
votes
3answers
32k views

What is an Event?

What is an Event? Are they only used in Solidity? How are events defined? How are events initiated? Is there a standard term for an event's invocation (do you say an event "happened", "was called",...
47
votes
5answers
23k views

Why are selfdestructs used in contract programming?

I'm reading bits and pieces that selfdestructs within contracts are a good thing. Can someone explain what the benefits are of doing a contract selfdestruct when it comes to Ethereum programming? Is ...
47
votes
3answers
33k views

How to select a network id or is there a list of network ids?

We're starting a new open network based on the Ethereum protocol. The question is how to allocate a network id for the new network. In Ethereum we have main net, four test networks, classic with test ...
47
votes
5answers
24k 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 ...
47
votes
4answers
23k views

What exactly is an Ethereum client and what clients are there?

What exactly is an Ethereum client? Is it a full network node that can post transactions to the blockchain (if that is the correct lingo?) or could it also be a light JS client that connects from a ...
46
votes
2answers
24k 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?
45
votes
4answers
36k views

The Ether denominations are called Finney, Szabo, and Wei. What/who are these named after?

This was recently asked on Reddit. To expand, who are Finney, Szabo, and Wei, and what did they do/contribute to the project that warranted being awarded denominations?
45
votes
3answers
70k 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 ...
45
votes
1answer
17k views

What is Whisper and what is it used for?

It's admittedly a very general question, but I've heard "Whisper" mentioned in several places when reading about certain DApps. I understand it allows peer-to-peer messaging of some kind, but what ...
44
votes
3answers
9k views

Why does uint8 cost more gas than uint256?

contract A { uint8 a = 0; } costs 20150 + 2000 gas during creation. as compared to contract A { uint a = 0; // or uint256 } costing 5050 + 2000 gas during creation It is odd that a variable ...
44
votes
3answers
26k views

How do you refer to a contract own address inside it?

I am attempting to use 2 contracts together, and I need my 2nd contract to pass his own address to the first contract. Is there an easy way to do this? Like this.address? Or should I update my ...
44
votes
1answer
31k views

How to Initialize a Struct?

I have a struct like so : struct fooStruct { uint foo; uint figther; } I would like to initialize that struct but it won't be stored in a mapping but inside an array. Is there a way to ...
44
votes
3answers
13k views

What are the pros and cons of Ethereum balances vs. UTXOs?

Ethereum has a simpler model by not having UTXOs (Unspent Transaction Outputs) like Bitcoin. What does Ethereum "give up" by not having UTXOs, and what does it gain?
43
votes
3answers
37k 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 ...
43
votes
3answers
24k views

What is a sidechain?

The Ethereum subreddit has this post related to an Ethereum-Dogecoin sidechain. What is a sidechain? Could one sidechain be a private Ethereum network?
43
votes
2answers
10k 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 ...
42
votes
5answers
33k views

How to delete an element at a certain index in an array?

Anyone know how to delete an element in a array? Is there any built in method to do that? If not, does anyone know of how to implement such a method?
42
votes
6answers
20k views

Truffle Migrate doesn't work: Error: No network specified. Cannot determine current network

When I try to run my migration with truffle migrate the following error message appears: Error: No network specified. Cannot determine current network. at Object.detect (/usr/local/lib/...
42
votes
4answers
15k views

How do oracle services work under the hood?

I have read many questions about oracle services, but I do not understand how they work. Often I read answers like this: https://ethereum.stackexchange.com/a/9825/5892 Smart contract can not ...
42
votes
4answers
19k views

What is the zero, empty or null value of a struct?

If I have a mapping of string => custom defined struct, how do I check if a value is defined in the mapping? The docs state that "every possible key exists and is mapped to a value whose byte-...
42
votes
3answers
10k views

How were gas costs chosen for the Ethereum Virtual Machine instructions?

Different instructions of the EVM have different associated gas costs -- you can look at the list of the gas-prices in the appendix G of the yellow paper. While the rough magnitudes of those numbers ...
42
votes
1answer
10k views

Are underscores `_` in modifiers code or are they just meant to look cool?

I often see _ in modifiers modifier onlyOwner() { if (msg.sender != owner) throw; _ } Does it execute any code or is it meant to make the code easier to read ?
41
votes
8answers
22k 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?
41
votes
5answers
27k views

How to concatenate strings in solidity?

I'm trying to concatenate two strings in solidity. I tried with + or . but neither option works. There is not much documentation on string concatenation yet. Is it even possible? If not, can I ...
41
votes
3answers
33k views

Is Ethereum wallet address case sensitive?

I sent some amount of ETH to a wallet. I checked the wallets balance on ether chain. I entered the address in the search field and noticed both lowercase and uppercase versions of the address seemed ...
41
votes
6answers
22k views

Create and sign OFFLINE raw transactions?

I'm looking to create a raw transaction, sign it, and broadcast it using the eth.sendRawTransaction RPC method. I would like to do this offline using code or an open-source library OR online but ...
41
votes
4answers
20k 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)?
41
votes
3answers
43k views

how to remove unused test accounts from Metamask

i use metamask chrome extension with testRPC to do my testing now metamask have over 20 dead accounts just sitting there in the list my question how to you clear loose unused test accounts from ...
40
votes
2answers
31k views

Use string type or bytes32?

What are the benefits to using string datatypes over bytes32 to represent text data. It seems my contract runs into an out of gas exception when I switch the data structures from bytes32 to string.
40
votes
6answers
40k views

How do you get a json file (ABI) from a known contract address?

I want to watch a Solidity contract using the Mist browser. I know how to do that and it needs the address and the json. I have the address, but I don't have the json. I do have the source code. Can ...
39
votes
8answers
23k views

Where are my keys and chain data located if I am using Parity?

Switched from geth to Parity and wondering where my information now is. Thanks.
39
votes
3answers
10k views

Where do contract event logs get stored in the Ethereum architecture?

Background on Events: https://github.com/ethereum/wiki/wiki/Solidity-Features Events allow the convenient usage of the EVM logging facilities. Events are inheritable members of contracts. When they ...
39
votes
1answer
18k 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 ...
39
votes
3answers
24k views

How can I create a multisignature address on Ethereum?

I want to store my ether in a form that requires more than one digital signature in order to authorise spends. How do I do on that on Ethereum?
39
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 ...
39
votes
3answers
15k views

How does the Casper proof of stake algorithm work?

Ethereum plans to move to the Casper proof of stake algorithm in a future version of the network. What are the details of that algorithm, and how does it compare to previous Proof of Stake consensus ...
38
votes
10answers
29k views

How can I find out what the highest block is?

I'm syncing up a new node. How can I find out what the latest block is so that I know how far I've got to go?
38
votes
3answers
68k views

How to delete or reset the blockchain in geth? (OSX)

I have a currupt Blockchain and want to hard reset the chain. what do I need to delete in order to start downloading the chain from scratch? I know that there are 2 ethereum folders (I am on OSX): $...
38
votes
4answers
130k views

Is CPU mining even worth the Ether?

I would like to start mining Ether, but my GPU isn't the greatest and I don't really want to spend the money on a dedicated rig. Is mining from my CPU (in a Linux environment) still worth the Ether? ...
38
votes
2answers
12k views

How do I detect a failed transaction after the Byzantium fork as the REVERT opcode does not consume all gas?

Pre Byzantium fork, I could use gas == gasUsed to detect when a transaction has failed (further details in How can the transaction status from a thrown error be detected when gas can be exactly the ...
37
votes
6answers
18k views

How do I parse the transaction receipt log with web3.js?

The event parser in web3 provides a nice parsing functionality for events, and I use it for logging all events to a file, but it's very difficult to use for looking at individual events for a ...

15 30 50 per page