Skip to main content

All Questions

Filter by
Sorted by
Tagged with
111 votes
4 answers
111k 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 ...
Richard Horrocks's user avatar
96 votes
12 answers
51k views

Common useful JavaScript snippets for geth

In Geth you can loadscript any javascript 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(&...
76 votes
2 answers
40k 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: ...
Satoshi Nakanishi's user avatar
64 votes
7 answers
214k 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 ...
q9f's user avatar
  • 33k
62 votes
5 answers
94k 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?
60 votes
1 answer
63k 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 ...
Richard Horrocks's user avatar
59 votes
5 answers
49k 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 ...
Igor Barinov's user avatar
  • 2,158
57 votes
4 answers
56k 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 ...
MethDamon's user avatar
  • 803
56 votes
3 answers
25k 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 ...
BokkyPooBah's user avatar
  • 40.4k
46 votes
3 answers
84k 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): $...
xpnimi's user avatar
  • 723
44 votes
1 answer
34k 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 ...
Prashant Prabhakar Singh's user avatar
43 votes
3 answers
78k 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?
Wang's user avatar
  • 2,426
42 votes
6 answers
54k 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 ...
Arthur D. Howland's user avatar
41 votes
5 answers
38k 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?
J-B's user avatar
  • 8,971
40 votes
4 answers
34k 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/...
Wayne's user avatar
  • 401
38 votes
6 answers
48k 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=...
J. Doe's user avatar
  • 383
38 votes
5 answers
35k 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 ...
Juan Ignacio Pérez Sacristán's user avatar
37 votes
4 answers
48k views

What is a chainID in Ethereum, how is it different than NetworkID, and how is it used?

Here it's described in Ethereum's go implementation. type ChainConfig struct { ChainId *big.Int `json:"chainId"` // Chain id identifies the current chain and is used for replay protection A few ...
AlwaysQuestioning's user avatar
37 votes
8 answers
78k 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:'...
John Heeter's user avatar
36 votes
11 answers
77k 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 ~/...
Imroz's user avatar
  • 871
36 votes
6 answers
76k 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 "...
Dan Sandberg's user avatar
36 votes
6 answers
48k views

How to find the date of an Ethereum transaction while parsing it with web3?

Is there a way to know the date of a transaction by looking at the raw blockchain data? I know that Etherscan and other blockchain explorers have dates for the transactions, but I couldn't find a way ...
user3498's user avatar
  • 745
35 votes
5 answers
49k 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 ...
Broseph's user avatar
  • 695
34 votes
6 answers
28k 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 ...
Daniel Mermelstein's user avatar
30 votes
2 answers
28k 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 ...
firescar96's user avatar
30 votes
6 answers
13k 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. ...
Subhod I's user avatar
  • 927
29 votes
4 answers
34k 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 ...
Karl Floersch's user avatar
29 votes
3 answers
11k views

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

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 network as the network grows ...
Pii's user avatar
  • 580
29 votes
2 answers
9k 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 ...
Vesa's user avatar
  • 1,322
29 votes
3 answers
22k 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 ...
Toshi's user avatar
  • 2,357
28 votes
2 answers
56k 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.
Ramsroyal's user avatar
  • 391
28 votes
4 answers
34k views

Possible to store the blockchain in a different directory?

I'm running geth on Linux within a Chromebook. The blockchain is being stored within ~/.ethereum, along with other important files. Problem is, the storage capacity on my Chromebook is quite limited ...
FugueWeb's user avatar
  • 457
27 votes
2 answers
15k 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 ...
migu's user avatar
  • 951
27 votes
5 answers
28k views

Truffle does not work - could not find suitable configuration file

I have searched some answers here and on google as well but none of them actually apply to my case. I tried on console and power shell to run truffle migrate but I keep getting could not find ...
EAzevedo's user avatar
  • 691
27 votes
1 answer
32k 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 ...
kostasps's user avatar
  • 373
25 votes
1 answer
7k 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 ...
Pablo Yabo's user avatar
  • 2,743
25 votes
2 answers
1k 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....
ligi's user avatar
  • 1,193
24 votes
7 answers
46k 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 ...
q9f's user avatar
  • 33k
24 votes
2 answers
8k 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 ...
user17499's user avatar
  • 241
24 votes
1 answer
9k 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('...
coeniebeyers's user avatar
23 votes
4 answers
17k 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?
Randomblue's user avatar
  • 2,620
23 votes
1 answer
18k views

What is the difference between a pending transaction and a queued transaction in the geth mempool?

I see the following on the wiki but I dont understand the difference pending: all processable transactions queued: all non-processable transactions
bamos's user avatar
  • 1,944
23 votes
1 answer
9k views

Can anyone explain what's the difference between mist/geth/parity in simple terms?

What's the difference between geth/mist/parity?
Krishna's user avatar
  • 251
23 votes
3 answers
9k 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: { ...
maheshmurthy's user avatar
  • 1,237
23 votes
1 answer
21k 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
TMOTTM's user avatar
  • 1,953
23 votes
5 answers
29k 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 ...
Imroz's user avatar
  • 871
22 votes
4 answers
16k views

Error "no key for given address or file" when unlocking coinbase account

Using json-rpc eth_unlockAccount() method I can unlock everyone of my node accounts except coinbase. When trying to unlock coinbase account, geth responds with the message: no key for given address ...
Juan Ignacio Pérez Sacristán's user avatar
21 votes
4 answers
46k views

Full list of geth terminal commands

Is there a comprehensive list of the commands available in the geth terminal anywhere? (eg. miner.start(), eth.accounts, admin.nodeInfo, etc.)
Kris Randall's user avatar
21 votes
2 answers
38k views

How to view latest block number of a geth node in the console? [duplicate]

How to get information about the state of the blockchain on a geth node? There are mentions of admin.chainSyncStatus in the documentation, but it is undefined on my 1.4.0 node. The admin.nodeInfo ...
redfish's user avatar
  • 497
21 votes
3 answers
7k 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?
Heisenberg's user avatar

1
2 3 4 5
134