All Questions

Filter by
Sorted by
Tagged with
38
votes
6answers
35k 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 ...
33
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 ...
21
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 ...
16
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 ...
26
votes
2answers
3k 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 ...
18
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 ...
14
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 ...
16
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 ...
21
votes
2answers
6k 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 ...
18
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; ...
12
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?
11
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
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 ...
26
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, ...
17
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 ...
16
votes
4answers
18k 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.
16
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_) { ...
15
votes
2answers
7k views

Error: account unlock with HTTP access is forbidden when unlock an account in Geth console

personal.unlockAccount(eth.accounts[0],"") Error: account unlock with HTTP access is forbidden I run Geth in a Docker container and use docker exec -it bootstrap geth --datadir=~/.ethereum/...
9
votes
1answer
814 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, ...
10
votes
4answers
6k views

Can't do any integer division

I'm building a new smart contract but really can't figure out how to perform integer division. I know that fixed point haven't been implemented yet but damn it should be possible to perform 100/3 = 33 ...
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.
6
votes
3answers
6k views

Invalid JSON RPC response error for sendTransaction on Infura + Ropsten node + Truffle console

Calls work but transactions throw the error - Error: Invalid JSON RPC response: "" I am using web3 v0.19.0 & Truffle v3.4.9. Deploying contract using truffle, truffle migrate --network ...
17
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
1k views

Where does the number 21000 come from for the base gas consumption in Ethereum?

Can you break it down in terms of the cost of opcodes?
5
votes
2answers
1k views

best practice for airdrops and gas usage

I tried to write an airdrop contract which takes a list of recipients and a list of balances and then can be commanded to airdrop all at once. With code below I can launch a single transaction able to ...
4
votes
4answers
3k 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 ...
61
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?
34
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 ...
47
votes
2answers
29k 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",...
31
votes
5answers
24k views

How can I run go-ethereum as daemon process on Ubuntu?

The Installation Instructions for Ubuntu suggest running geth from the command line, how can I run it as daemon process / service on Ubuntu?
36
votes
6answers
27k views

How to get ether on public testnet?

I am a newbee to Ethereum and doing some research. I have installed the Ethereum Wallet app and synchronized the testnet. However, to deploy my first contract in testnet, it requires some Ether, so ...
43
votes
3answers
8k 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 ...
26
votes
3answers
20k 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 ...
23
votes
4answers
7k 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/...
20
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 ...
17
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 ...
36
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 ...
34
votes
2answers
26k 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.
16
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 ...
27
votes
2answers
16k views

What is the ethereum transaction data structure?

I'd like to know the detail of the Ethereum transaction data structure. What data is stored in transaction?
19
votes
1answer
3k 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 ...
25
votes
4answers
35k 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 ...
18
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: ...
16
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? ...
15
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 ...
11
votes
3answers
4k 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 ...
11
votes
5answers
7k views

How to convert an address to bytes in Solidity?

What is the recommended way to convert an address to bytes in Solidity?
39
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.
14
votes
3answers
3k views

What are State Channels and use case/code examples?

A previous Reddit post gave some indication: It's basically Lightning-network style payment channels but for arbitrary state updates. Participants in the Dapp send messages with transactions to ...
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 ...

15 30 50 per page