Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [go-ethereum]

Go Ethereum (short: Geth) is a Golang implementation of the Ethereum protocol.

91
votes
2answers
83k 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 ...
76
votes
11answers
27k 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....
53
votes
6answers
183k 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 ...
52
votes
2answers
26k views

What does each genesis.json parameter mean?

I'm trying to setup genesis.json for my private network. What does each parameter mean and what value can I set in genesis.json? nonce: any data? timestamp: any time? parentHash: any hash? extraData: ...
48
votes
5answers
74k 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?
45
votes
3answers
20k 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 ...
43
votes
1answer
41k 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 ...
39
votes
3answers
32k 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 ...
33
votes
3answers
61k 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): $...
33
votes
2answers
21k 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 ...
29
votes
6answers
40k views

How long is the first sync supposed to last?

I've been running Geth (latest version) for around 12 hours and it's still not finished. The command prompt shows this : INFO [05-21|12:05:00] Imported new chain segment blocks=1 txs=...
28
votes
4answers
22k 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?
28
votes
2answers
44k views

how to unlock the account with geth?

when I use the web3 interface to sign on msgs, it tell me that the account should be unlocked, how can I manage this with geth and what exactly does unlocking mean?
27
votes
5answers
21k views

How to check my sync status on Geth 1.5.5, Raspberry Pi 3

Have a Geth 1.5.5 node running on a raspberry pi 3. When I type in sudo systemctl status geth I'll get ever changing time and block information. Neat, but how do I know when I am synced up? Is ...
27
votes
5answers
13k views

ecrecover from Geth and web3.eth.sign

I have tried to use ecrecover() to verify the signature of a message. I have looked at lots of references here and elsewhere, like: https://lab-blog.ey.com/2016/12/19/ecrecover/ How does one ...
27
votes
1answer
20k views

What are ipc and rpc?

The question is quite simple , I have only basic Idea of RPC but none of IPC. AFAIK, if I connect to ethereum node via ipc then the my geth should be running on same machine. and If I connect via ...
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 ...
23
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 ...
22
votes
2answers
44k 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.
22
votes
6answers
6k views

How to make miner to mine only when there are Pending Transactions?

As of now the geth miner running on my system mines even empty blocks. All i wanted is miner should mine only when there are Transactions to mine, after mining the miner should immediately sleep. ...
22
votes
9answers
33k views

How to get private key from account address and password?

What I have 1. I am able to create new account with personal.newAccount() method of web3 api. 2. I am working on my private blockchain. 3. geth node start with following command:- geth --datadir ~/...
22
votes
2answers
17k views

How to explore all transactions for a given account?

After beeing able to check account balances, I am looking for a method to list all transactions for a given Ethereum account through json-rpc protocol. I haven't found any method suitable for that on ...
21
votes
4answers
15k views

How can I empty the blockchain?

I am trying to do a fast sync using geth --fast but I am getting this message: blockchain not empty, fast sync disabled How can I empty the blockchain to allow for fast sync?
20
votes
3answers
17k 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 ...
20
votes
4answers
32k 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 ...
20
votes
2answers
6k views

Is there a way to stop the Geth console from printing syncing information?

Is there a way to stop the Geth console from printing syncing information? I start Geth with geth console. Actually, I do not want to see all that syncing information constantly. Can I turn it off ...
20
votes
2answers
22k views

Why is geth always returning a 0 balance?

I installed geth on a remote server (Ubuntu 14.04) and created an account. I transferred 0.01 eth to the account. From my local machine (OS X), I can view the transaction and account balance ...
19
votes
3answers
4k views

How to add new Sealer in Geth 1.6 Proof of Authority?

Hi there Ethereum experts, I'm trying out Proof-of-Authority in Geth 1.6 for my private network and got it to work on a few nodes using Puppeth. Now, I have two questions about maintain the private ...
19
votes
2answers
9k views

Get a peer list for my geth node

How can I use Geth (or any other client) to get a list of my peer nodes on the Ethereum network. I see there's a function to get the number of nodes using the web3 api, but I need a list of node IDs ...
19
votes
3answers
4k views

Why does ethereum creates a new block,without even a single transaction? [duplicate]

I'm running a private Ethereum blockchain. When I set one of the nodes to mine, that node continuously creates blocks, even if there are no transactions inside of it. What is the purpose of this?
19
votes
2answers
9k views

Is there a way to find an account's current transaction nonce?

I need to know my transaction nonce because I am doing fancy stuff with contract addresses (which are the keccak hash of my address + my transaction nonce). Is there a way to find this through the ...
19
votes
2answers
14k 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 ...
18
votes
5answers
24k views

How do you stop a running geth node?

I can not figure out how to stop a running geth node without killing the process. I tried to lookup geth help but there is no mention of stopping, halting or any shutdown command. How to shutdown ...
18
votes
5answers
10k views

How do I import my presale wallet?

I purchased ether during the presale. Is there an easy way to import those ether and start using them?
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" ...
18
votes
3answers
5k views

What is knownStates?

I am using geth client (VERSION: 1.4.12-stable-421df866) to sync to the Ethereum testnet. To check the status of the sync, I ran web3.eth.syncing in the geth console. This is the output I see: { ...
18
votes
0answers
412 views

E/Go: fatal error: thread exhaustion

I am experimenting with the geth-android library with light-client and in-process node from @karalabe. I could successfully sync with the testnet node from @phonikg, unfortunately this one is down now....
17
votes
1answer
5k views

The meaning/specification of “config” in genesis.json

As I tried to search from Google, there are some genesis.json example files to customize the parameter of genesis block in Ethereum private blockchain. In the file, there is a part called "config" "...
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('...
16
votes
2answers
6k views

Understanding logs and log blooms

I'm new to Ethereum and I'm struggling to understand how logs are stored and can be read using geth and plain JSON-RPC (not web3.js). There's a bit of documentation out there and some posts but I'm ...
16
votes
5answers
12k views

geth import vs copying chaindata

I'm trying to sync my RPi 2 with the blockchain. geth import runs quite slowly, as well as syncing from scratch. What would be the problem in just copying the .ethereum/chaindata folder from ...
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 ...
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 ...
16
votes
2answers
9k views

How do I remove accounts using the Geth console?

I have several accounts I've created in the Geth console using: personal.newAccount() I no longer use (nor have any intention of using) the first couple of accounts I created, meaning whenever I ...
16
votes
6answers
26k views

Insufficient funds for gas * price + value

Sending Address has over 1 Eth in current Balance. Using the Geth console, I can send many transactions of any amount less than .033 eth.sendTransaction({to:'...
16
votes
3answers
6k views

How to make Ethereum mining difficulty static for a private chain?

I have implemented private chain in ethereum but its difficulty level increases by time as a result the mining process slows down. Is it possible to make the difficulty static or disable it in testnet....
16
votes
2answers
10k views

In geth, `eth.syncing` gives `false` even when blocks are imported

I issue eth.syncing and get false even when at the same time blocks are imported. Is this correct behaviour? Using geth version 1.4.6
16
votes
1answer
12k views

Getting private keys of geth accounts

Just the opposite of this question How to import a plain private key into geth or Mist? I would like to know how can I obtain the private keys of the accounts created with geth in this way: $ geth --...
16
votes
4answers
7k views

Synchronisation failed, dropping peer

Whenever I attempt to run geth on the command line, it seems to have trouble syncing with the blockchain. I am absolutely a novice so I could be completely overlooking. I am getting these warnings ...
15
votes
4answers
33k views

How can I find my `chaindata` folder?

Someone referred me to the chaindata folder to troubleshoot a problem I am having with Ethereum-Wallet/Mist. How can I find it?