All Questions

15
votes
3answers
2k views

What are the limits to gas refunds?

Gas refunds are provided when clearing storage or calling SELFDESTRUCT on contracts. The Yellow Paper mentions that refunds are "being capped up to a maximum of half...". What exactly is this "half" ...
10
votes
1answer
3k views

Can I unlock an account using JSON-RPC?

The only way I can work with ETH is through --rpc mode. Normally I would prefer to use the Python interface. But I found myself in a situation where the RPC is very limited. For example, I can't ...
13
votes
1answer
6k views

Are pending transactions “dropped” and “reinstated”?

I tried a simple transfer of ether between two accounts using geth, but set quite a low gas price (2 gwei). After two hours the transaction was still showing in geth under eth.pendingTransactions - I ...
9
votes
1answer
2k views

Does Solidity's constant keyword do anything?

It seems that the purpose of function foo() constant {} is to indicate that a function does not change the contract's state. And yet, as it states here, the compiler doesn't actually enforce this. So ...
101
votes
11answers
80k views

How would I explain Ethereum to a non-technical friend?

I've recently attempted to explain Ethereum to several non-techy friends. My explanation usually involves starting with a comparison to Bitcoin, but this quickly becomes complicated as I then have ...
56
votes
2answers
20k views

What OPCODES are available for the Ethereum EVM?

The Ethereum virtual machine has a large number of operation codes and base level instruction sets. Is a complete listing available?
54
votes
7answers
39k views

How can I check if an Ethereum address is valid?

I've read many times that you should never input an address by hand unless you want to accidentally send Ether into no-mans-land. I'd like to know what those checksums might be. Is there a way to tell ...
23
votes
3answers
3k views

Concurrency patterns for account nonce

The account nonce is the only element in the transaction structure that prevents replay attack (as explained in this very good answer). It essentially forces sequentialisation of an account's ...
38
votes
1answer
9k 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 ?
29
votes
2answers
26k views

How can I store data in ethereum blockchain

I want to store pdf hash in blockchain I already read this post What are some proposed ways of storing data in Ethereum? But I'm beginner in this domain and I don't understand... Is it possible to ...
26
votes
3answers
21k views

How to convert a string to bytes32?

How can I convert a string to a bytes32? Does anyone has a magic function or library which does it? For example: This works since as input I gave 32-bits. But it won't work with "> 32-bit" chars. ...
28
votes
1answer
9k views

What are event topics?

I know that indexed arguments index the values for those arguments so that filtering will be faster. But what are topics? And what are they used for? I know that signature of an event is a topic. ...
29
votes
1answer
3k views

How do I make my DAPP “Serenity-Proof?”

When Serenity comes around, the network will undergo many changes, some of which may have unexpected consequences on existing Smart Contracts. How can I plan so that I am best prepared to take ...
20
votes
3answers
16k views

Calling function from deployed contract

I want to know how to instantiate an existing contract deployed on the blockchain using its address. e.g: contract A { function f1() {} } A is deployed on the blockchain, and in contract B I ...
6
votes
2answers
3k views

What elements of a Dapp's backend are usually stored in a decentralised location?

I'm unclear as to what elements of a Dapp's backend code are actually decentralised. The following link states that a Dapp's backend is stored entirely on the blockchain. However, if I was to create ...
40
votes
3answers
22k 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?
36
votes
5answers
25k 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?
16
votes
1answer
14k views

Steps to deploy a contract using MetaMask and Truffle [closed]

i'm noob, I want to deploy my contract on Ropsten network with MetaMask & Truffle, plz explain to me the steps to deploy it.
18
votes
2answers
15k views

How to estimate gas at contract creation/deployment to private ethereum blockchain

What I have done a) When I use web3.eth.estimateGas to estimate the cost of a contract creation constructor with no parameters, the estimate is correct. b) If the contract is already deployed then ...
14
votes
7answers
7k views

Block explorer running on private network

Is there any application out there that allows me to explore the Ethereum blockchain in a private network? (something similar to what blockchain.info does to bitcoin or etherchain does to ethereum ...
10
votes
1answer
6k views

What are some proposed ways of storing data in Ethereum?

I keep reading that swarm or ipfs would be used for storage, but how would that work exactly? Would an ethereum contract store its data in these data blockchains? I thought ethereum smart contracts ...
17
votes
6answers
13k views

How to set a different datadir in Mist?

With bitcoin and others, you can use --datadir option to specific where blockchain, keystore, etc are saved. But doesn't work with Mist. From the offical wiki: To configure the location of the ...
19
votes
1answer
18k views

What are the valuable benefits of having a node?

Supposedly I'd like to help Ethereum to expand (in terms of the World Computer), so I'd like to setup a Linux machine which can run smart contracts. What kind of benefits I can get from doing that? ...
19
votes
3answers
4k views

TheDAO hack FAQ: How did the attack happen on 17 June 2016?

Can anyone explain that how the DAO attack happened? Vitalik Buterin explained here that it was performed by splitting a DAO from the main DAO but calling the split function recursively. We know that ...
19
votes
1answer
6k views

What are *C*, *E* and *S* properties in message call return object?

(JS) var contract = web3.eth.contract(abiDefinition).at(address); contract.test(value, gotResult); function gotResult(error, result) { if(!error) { console.log(...
13
votes
1answer
5k views

Member function “transfer” not found or not visible after argument-dependent lookup in contract?

I am having a problem with my smart contract making value transfers. My current environment: Truffle v5.0.0-beta.2 (core: 5.0.0-beta.2) Solidity v0.5.0 (solc-js) Node v8.11.1 I created the ...
21
votes
5answers
16k views

Paying a transaction fee with an ERC20 token

As far as I understand, one of the ERC20 token's features is that you can pay a transaction fee with it. In other words, you can send them without having Ether. I transferred REP tokens to the ...
9
votes
4answers
968 views

What is ether? How is it different from other tokens such as bitcoin?

What is ether? How does it differ from past tokens such as bitcoin and litecoin? What are all the usages of ether?
19
votes
2answers
5k views

By what mechanism are ASIC-based miners made less favourable?

Bitcoin mining is dominated by miners that use ASIC-based mining equipment, thereby skewing the mining rewards in favour of those able to afford large numbers of ASIC mining rigs. Ethereum prevents ...
13
votes
2answers
2k views

Can a contract access another contract's storage?

I have a contract with numerous complex structs. Is it possible for a second contract to iterate over this data directly? I can't really use public accessor/getter methods as it's not possible to use ...
9
votes
2answers
5k views

Solidity functions - private visibility

Is the following function parameter (string name) only visible to the owner contract itself? function myFunction(string name) private returns (bool) { return true; } So nobody can read / see ...
9
votes
1answer
12k views

PHP Library for Ethereum

I am looking for a PHP library to interact with Ethereum. Are there any active open source projects of PHP libraries for Ethereum available? Thanks for your help
11
votes
1answer
4k views

Why isn't fast sync the default?

As I understand, fast sync has all the security guarantees of a full sync, but is faster. Is that correct? If so, why isn't fast sync the default?
60
votes
2answers
14k views

ELI5 How does a Merkle-Patricia-trie tree work?

I understand that Merkle tree are Hashes of Hashes, they have the advantage that you can verify only a subtree. But what about Patricia? What does a trie mean? And how is it used in Ethereum?
28
votes
3answers
10k views

What happens when a transaction nonce is too high?

From Design Rationale: One weakness of the account paradigm is that in order to prevent replay attacks, every transaction must have a "nonce", such that the account keeps track of the nonces used ...
32
votes
2answers
5k views

What are the steps to compile and deploy a library in Solidity?

I have several pieces of documentation about libraries, but I am not yet able to infer what steps are needed to compile and deploy a library and then a contract that uses it. The behavior of the ...
21
votes
3answers
18k views

How can I expose Geth's RPC server to external connections?

I want to set up a private network of applications which can connect to a single Geth node. What options do I have for exposing the RPC server? I'm running this: geth --rpc --testnet (sometimes I use ...
35
votes
2answers
10k 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 ...
34
votes
3answers
63k 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): $...
45
votes
7answers
6k views

How can I verify that a contract on the blockchain matches the source code?

Given the (Solidity) source code of a smart contract, is there a way to deterministically compile the code and compare it with the code on the blockchain? I want to verify that the contract does what ...
32
votes
2answers
3k views

What's a precompiled contract and how are they different from native opcodes?

The Yellow Paper states: These are four so-called ‘precompiled’ contracts, meant as a preliminary piece of architecture that may later become native extensions. The four contracts in addresses ...
62
votes
1answer
10k views

Why is the average block time 17 seconds?

The network stats show a constant average blocktime of around 17 seconds. Whenever you check it is around 16~18 seconds. Reading the blog post by vitalik buterin it states the block time should be 12 ...
22
votes
1answer
29k views

Geth node starts to sync from the beginning after fast sync

I have synced using the --fast command. Now how should I proceed? I tried stopping it, and then running geth --rpc but it says: Last Header #1311471 Last Block #0 Fast Block #1310224 What should I ...
21
votes
3answers
8k views

How does Solidity's sha3 / keccak256 hash uints?

This is not a question about the issue with Ethereum using a non-standard sha3. I have found the right JS hashing library, and am able to get matching hashes in JS and Solidity on byte strings. What I ...
9
votes
2answers
12k views

how to estimate gas cost?

I have a function that iterate through an array, which could cost a lot of gas. But I still want to test out the estimate gas cost, then decide if I should maintain the design or not. function ...
36
votes
6answers
32k 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 ...
30
votes
4answers
5k views

What is Olympic, Frontier, Morden, Homestead and Ropsten Ethereum blockchain?

I am studying Ethereum and have not been able to figure out the difference between Homestead and Morden. In some docs, it is written that Homestead uses a new algorithm which takes less time. I don't ...
19
votes
3answers
18k views

How is the Mining Difficulty calculated on Ethereum?

Having read various pieces of documentation, it's still not completely clear to me what dictates the difficulty rise, and how Ethereum difficulty levels differ to Bitcoin. In the past week ...
18
votes
2answers
4k views

How does Ethereum deal with blockchain scalability?

The Bitcoin community are currently trying to solve the problems of blockchain scalability. Some are advocating an increase in block size, others are talking about things like Segregated Witness. Lots ...
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 ...

15 30 50 per page