All Questions

15
votes
3answers
5k views

How does the Ethereum ETH accounting system work and prevent double-spends?

In Bitcoin, the BTC accounting system is based on UTXOs (Unspent Transaction Outputs), which prevents the same BTC from being spent multiple times. I heard that Ethereum has a simpler account balance ...
24
votes
2answers
2k views

Is it a good practice to log an event every time I throw in Solidity?

In Solidity (0.3.2) I am aware that there is no way to throw specific exceptions. (Everything is an invalid JUMP error.) It seems beneficial to have a way to log specific errors. Does it make sense to ...
19
votes
3answers
3k views

how to catch “revert” error in truffle test javascript?

How can I catch "revert" error in truffle test written in javascript? Error: VM Exception while processing transaction: revert Here is part of test contract, function doRevert() public { ...
17
votes
4answers
5k views

Is there any safe way to send money from a cold wallet, using an untrusted computer?

You have 2 computers. One is 100% offline and, thus, trusted. Other is online. Private keys are stored on the offline computer and the online computer has no access to it. Is there any way to sign a ...
15
votes
4answers
32k views

My C: drive in my WINDOWS PC is almost full. How can I change both geth and Mist path to relocate my blockchain files?

I read here somewhere that I have to execute geth --datadir "NEW PATH". But this solution: 1) Doesn't work in a permanent way for me (it will actually point geth in that direction but if I after ...
13
votes
1answer
928 views

Concealing sensitive data in a public contract

I have some sensitive data I'd like to keep in my contract in privacy. I'd like to make a simple version of Zero-Knowledge Proofs and have an idea in mind. Let's say I have a customer who filled out ...
13
votes
1answer
1k views

What if I had the private key that had the public address of a contract?

Could I spend the money a contract owns if I had the private key that goes to the public address that a contract resides at? (I realize that I'd have a better chance of being struck by lightning ...
20
votes
2answers
5k views

Do I need a compiled contract just to get the ABI definition?

Why do I need a compiled version of the contract just to get the ABI definition? Seems like the contract address should be enough. Im very confused because I am simply trying to run a contract ...
16
votes
2answers
10k views

Problem with Truffle Console: Cannot read property 'call' of undefined

I´m having problem with the basic HelloWorld example coded in Solidity and managed with truffle with testrpc. pragma solidity ^0.4.2; contract HelloWorld { uint public balance; ...
11
votes
5answers
1k views

What is an Ethereum contract?

Ethereum is described as using and enabling the creation of "Smart Contracts", sometimes called just "contracts". But what is an Ethereum contract? Is it a legal document, or something else?
10
votes
3answers
2k views

How do you verify a contract on etherscan that is deployed by another contract?

How do you properly verify a contract on etherscan that is deployed by another contact? I deployed a contract that deploys other contracts onto the blockchain. The original contract is verified , ...
9
votes
1answer
805 views

How many ethers have been drained through the recursive call attacks on The DAO?

The recursive call attacks on The DAO have now stopped as there are no more ethers in The DAO account. What are the amounts and percentages that can be attributed to the hostile and friendly attacks, ...
8
votes
2answers
6k views

I've got an error while compiling.Use “constructor(…) { … }” instead

I've followed the lecture on Udemy. But I've got an error here's my 'Inbox/contracts/Inbox.sol' pragma solidity ^0.4.17; contract Inbox { string public message; function Inbox(string ...
25
votes
1answer
4k views

What is coinbase?

What is the ethereum coinbase? I understand it is an account, but what makes it different? Is it the same as Etherbase? I've read it's the "default account for your console session." Does that mean, ...
16
votes
1answer
6k views

How to clear large arrays without blowing the gas limit?

As posted by redditor ethererik in the post GovernMental's 1100 ETH jackpot payout is stuck because it uses too much gas, 1,100 ethers are stuck in limbo because the payout of this GovernMental ...
15
votes
4answers
16k views

Conversion of uint to string

I am trying to convert uint to string in solidity. Is it possible to convert? if so how can I convert it? Convertion to base 10 is prefered, but in hexadecimal might also be helpful.
14
votes
2answers
2k views

What happens when a smart contract gets several similar calls in the same block?

What happens when a smart contract gets several similar calls in the same block? Consider for instance this greeter: contract greeter { string name; function setName(string name_) { ...
7
votes
1answer
1k views

How can I take a snapshot of Ganache or Truffle Develop state and reload later?

I would like to be able to save the state of my local Ganache or Truffle Develop chains into some sort of file. At a later time, I would like to be able to restart Ganache or Truffle Develop and apply ...
7
votes
2answers
6k views

How to verify token after etherscan, and submit icon

Sorry, my English is not good, I verified my token on etherscan, but I do not know how to change the token's icon.
6
votes
2answers
3k views

Sending tokens to multiple addresses

how could I go about sending tokens to a couple of thousands of addresses without havinging to do it manually? It's an airdrop.
16
votes
1answer
4k views

eth.pendingTransactions vs eth.getBlock('pending').transactions

What is the difference between eth.pendingTransactions and eth.getBlock('pending').transactions? I have noticed that sometimes eth.pendingTransactions have some transactions that eth.getBlock('...
7
votes
2answers
6k views

Transaction pending in queue for 100mins +

Using Parity I submitted at Transfer of ETH using 'send after block' The transaction has now been pending for 100mins+ (see attached). Now I can't send any ETH as all transactions go into 'Pending' ...
4
votes
4answers
2k views

Truffle for Windows: I can't make it work

I've installed Truffle v3.2.1 for Windows. If I try to run: truffle console Could not find suitable configuration file. If I run: truffle create:contract MyContract I get nothing but command ...
2
votes
1answer
935 views

geth v1.8 unable to download the last 65 blocks for the mainnet

Currently running geth 1.8 on Ubuntu 17.10 on an SSD. Anytime I start geth, it will always sync until it hits the last 65 blocks where it just hangs and looks like it stays stuck at downloading the ...
32
votes
5answers
13k views

Exploring and Analyzing the Ethereum blockchain

I would like to explore the data inside of the Ethereum blockchain. All transactions and contracts of the Ethereum Blockchain are stored there. So it's an interesting open dataset and I'd like to get ...
48
votes
4answers
13k views

Why don't Ethereum addresses have checksums?

A checksum, similar to its use in Bitcoin addresses, can primarily prevent mistyped or invalid addresses from being used, before a transaction with an invalid address is constructed. Why don't ...
21
votes
4answers
6k views

How to store IPFS hash using bytes?

Following Q/A (What datatype should I use for an IPFS address hash?) recommend us to use bytes to store IPFS hash. I was using following example(https://github.com/AdrianClv/ethereum-ipfs/blob/master/...
18
votes
1answer
3k views

Difference between a pruned and unpruned blockchain

At the Berlin Blockchain Meetup, Gustav Simonsson teased the Homestead release coming soon (tm) and we were discussing blockchain bloat and the current size of the Ethereum blockchain. We discussed ...
16
votes
1answer
3k views

Instrumenting EVM

I need to get all contract internal transactions. To do it, I'll need to instrument Ethereum EVM. My question is: what I should do to get the transaction details? Right now, I'm looking to the code ...
23
votes
3answers
18k views

Returning a struct and reading via Web3

I am storing data in my contract using a mapping of structs. For examples sake, say I'm storing employee info (name/address/salary), mapped by their employee ID. Via a web front-end, I'd like to be ...
28
votes
5answers
20k 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 ...
19
votes
2answers
11k views

How to pass arbitrary bytes to a function in Remix

According to this question I could write a simple contract like: contract SimpleStorage { bytes input; function setInput(bytes enterBytes){ input = enterBytes; } } Using "0x1234" as a ...
32
votes
2answers
23k 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.
32
votes
3answers
9k 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 ...
13
votes
3answers
3k views

How do Ethereum mining nodes maintain a time consistent with the network?

We have established that the timestamp on a parent block has to be before the timestamp of a child block in Can a child block have an earlier timestamp than the parent block?. How are differences in ...
15
votes
1answer
2k views

What is the max size of transactions can clients like geth keep in txpool?

What is the limit of transactions Ethereum clients can keep in transaction pool? Geth can keep 64 transactions per address according to this answer, but what is the max size of total transactions in ...
21
votes
4answers
33k views

Can't send transaction — “Exceeds block gas limit” or “Intrinsic gas too low”

I'm trying to send Ether using geth 1.3.5, like this: eth.sendTransaction({from:eth.accounts[0], to:'0x[ADDRESS_HERE]', value: web3.toWei(5, "ether"), gas:21000}); And I'm getting "Exceeds block gas ...
16
votes
2answers
21k views

Can I set the gas price to whatever I want?

The default gas price is 0.02e12 Wei. But while creating transactions on the command line or Geth's Javascript console you can define your own gasPrice: web3.eth.sendTransaction({/* ... */, gasPrice: ...
15
votes
2answers
2k views

During a 51% attack, What Can the Attacker Actually Accomplish?

During an attack on the network, where the attacker has more than 51% of hashing power (or the equivalent of Ether in PoS), what can the attacker do and not do to the chain and the contracts on it? ...
14
votes
5answers
2k views

How will regular users be able to use dApps without buying ether?

Requiring users to get ether before they can use a dApp, is too much of a barrier for any kind of mainstream adoption. If dApps offer free ether in a naive way, they can be attacked by Sybils where a ...
9
votes
3answers
3k views

are there “public” ethereum nodes? or any recommendations on hosting solutions?

I've always ran apps on Heroku. Just developed a smart contract and I need to check the blockchain from the app. Are there public nodes I can connect to to get the info I need to show on my app? If ...
35
votes
8answers
22k 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.
10
votes
1answer
2k views

How can non-javascript applications communicate with Ethereum nodes?

Web3 implements the Ethereum JSON-RPC spec and seems to be the preferred method for communicating between a javascript applications and the Ethereum node. However there are situations where you might ...
8
votes
3answers
9k views

Best way to burn ethers and other ethereum tokens?

Is it correct that any ethers or tokens sent to the address 0x0000000000000000000000000000000000000000 will be destroyed? Or what is the best way of burning ethers / tokens?
17
votes
4answers
14k views

How do I send an arbitary message to an Ethereum address?

How can I send a message to another Ethereum address? And how would that user receiving know that its a message? Is there an Ethereum wallet that will show that I sent a message to that address? And ...
14
votes
1answer
649 views

Why were empty accounts allowed to be on the blockchain?

It's hard to see what the benefits of allowing empty accounts to be on the blockchain are. This was a known subtlety (see "note: there is a difference between zero-balance and nonexistent") and ...
13
votes
1answer
1k 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 ...
11
votes
1answer
2k views

Is it possible to change the block target time?

We're curious to know what factors go into block times in a private network with a limited number of validators. Is this fixed or can it be parameterized in any way? How is it related to block times ...
8
votes
1answer
2k views

Iterating over all public values of a mapping in web3

Let's assume we have the standard token contract with balances: mapping (address => uint256) public balanceOf; If I want to know balances of all addresses (who have ever transacted with the ...
7
votes
2answers
3k views

Syntax for calling contract state changing methods

I've been struggling a bit with calling methods that change the state of the contract. Take, for example, the following contract: contract C { uint[] numbers; function initNumbers() { ...

15 30 50 per page