122
votes
Accepted
How to select a network id or is there a list of network ids?
May be there is a list of network ids? If not, let's create one.
Good idea.
0: Olympic, Ethereum public pre-release PoW testnet
1: Frontier, Homestead, Metropolis, the Ethereum public PoW main ...
Community wiki
92
votes
Accepted
What does each genesis.json parameter mean?
Genesis block Explanation
mixhash A 256-bit hash which proves, combined with the nonce, that a sufficient amount of computation has been carried out on this block: the Proof-of-Work (PoW).
The ...
83
votes
Accepted
What is Geth's "light" sync, and why is it so fast?
I'll take my shot. Experts, please correct me.
"Full" Sync: Gets the block headers, the block bodies, and validates every element from genesis block.
Fast Sync: Gets the block headers, the block ...
74
votes
Accepted
What is Geth's "fast" sync, and why is it faster?
There's a lot of detail on this PR on github. Here's a quote:
Instead of processing the entire block-chain one link at a time, and replay all transactions that ever happened in history, fast ...
74
votes
Common useful JavaScript snippets for geth
Script To Find Transactions To/From An Account
Usage
Find all transaction to/from eth.accounts[0] within the last 1,000 blocks:
> getTransactionsByAccount(eth.accounts[0])
Find all transaction ...
Community wiki
71
votes
Accepted
How to call a contract method using the eth_call JSON-RPC API
Summary
Your original contract code would not work correctly until I added a constant to the function definition to indicate that this function does not modify the blockchain.
I had to use the method ...
64
votes
Accepted
What are ipc and rpc?
IPC or Inter-process Communications generally works on your local computers. In the Ethereum space, IPC normally involves geth creating a IPC pipe (which is represented by the file $HOME/.ethereum/...
63
votes
How can I get a geth node to download the blockchain quickly?
Don't forget to use an SSD
If you're able to, using an NVMe SSD is even better.
If you have limited space on SSD see
Can chaindata be split across two (or more) locations?
That said, the Ethereum ...
59
votes
How to check my sync status on Geth 1.5.5, Raspberry Pi 3
Continuing to research, need to enter the geth node console to enter special commands. The following works:
geth attach
Sends user to the geth node console.
eth.syncing
Produces a result like ...
56
votes
Accepted
How to import a plain private key into geth or Mist?
Paste the key into a text file, save it to disk and use the path to that file with geth account import. Here are some example Windows instructions that might help:
Open Notepad
Paste key into notepad ...
56
votes
Accepted
how to unlock the account with geth?
By default, your accounts in Geth are "locked," which means that you can't send transactions from them. You need to unlock an account in order to send transactions from it through Geth directly or via ...
56
votes
Accepted
ecrecover from Geth and web3.eth.sign
I was stuck on this issue as well for a very long time.
So the solution is: Add this prefix string to your Solidity smart contract.
function verify(bytes32 hash, uint8 v, bytes32 r, bytes32 s) ...
49
votes
How to check my sync status on Geth 1.5.5, Raspberry Pi 3
After running your normal geth --fast command you can open a new window and run the "geth attach" command as this will attach you to the javascript interface
$ geth attach
Then you can use this ...
43
votes
Error: account unlock with HTTP access is forbidden when unlock an account in Geth console
Yes, this error is about some geth update. See more about it in this merged go-ethereum pull request.
Overall, to bypass this protection, If you want to enable unlocking accounts with unsecure http (...
41
votes
Accepted
How can I run go-ethereum as daemon process on Ubuntu?
Run as a systemd service
Create a file geth.service:
[Unit]
Description=Ethereum go client
[Service]
Type=simple
ExecStart=geth 2>%h/.ethereum/geth.log
[Install]
WantedBy=default.target
Enable ...
41
votes
Accepted
Understanding logs and log blooms
The first topic in the array is the sha3 hash of the hexadecimal representation of the canonical signature of the event. The remaining items in the topics array (there may be up to three) are the ...
41
votes
How long is the first sync supposed to last?
Do following steps to check the sync state:
1.) open a new geth instance and type in geth attach
2.) now type in eth.syncing
This shows you the "currentBlock" and the "highestBlock".
40
votes
How to delete or reset the blockchain in geth? (OSX)
You can also use geth removedb to remove the blockchain and state databases.
geth removedb
Remove local database? [y/N]
After removing the old databases, run geth --fast --cache=1024 (see answer to ...
38
votes
Accepted
How to find the date of an Ethereum transaction while parsing it with web3?
web3.eth.getTransaction({txhash}) will contain a blockNumber.
Use web3.eth.getBlock to retrieve the block details and you will find the following field:
timestamp: Number - the unix timestamp for ...
36
votes
What is Geth's "fast" sync, and why is it faster?
Don't forget to use an SSD
If you're able to, using an NVMe SSD is even better.
If you have limited space on SSD see Can chaindata be split across two (or more) locations?
That said, the Ethereum ...
eth♦
- 85.6k
36
votes
Accepted
How to make miner to mine only when there are Pending Transactions?
You can load this script to your geth console
Mine only when there are transactions!
var mining_threads = 1
function checkWork() {
if (eth.getBlock("pending").transactions.length > 0)...
36
votes
Accepted
What is a chainID in Ethereum, how is it different than NetworkID, and how is it used?
How is it different than networkID?
ChainID was introduced in EIP-155 to prevent replay attacks between the main ETH and ETC chains, which both have a networkID of 1.
It's basically just an ...
35
votes
Why is my node synchronization stuck/extremely slow at block 2,306,843?
Update Mar 5 2017
The state cleaning was announced by Vitalik Buterin in the tweet State clearing 100% complete dated 23:07 Nov 29 2016. This time corresponds to block 2,718,436.
The Clearing ...
33
votes
Accepted
Is there a way to find an account's current transaction nonce?
Your comment is correct: use web3.eth.getTransactionCount(accountAddress)
Note that the client (Geth) should be in sync with the blockchain.
If you don't have a node and want to trust a service, you ...
eth♦
- 85.6k
33
votes
Common useful JavaScript snippets for geth
1. Mine only when there are transactions!
var mining_threads = 1
function checkWork() {
if (eth.getBlock("pending").transactions.length > 0) {
if (eth.mining) return;
console....
33
votes
Accepted
Geth node starts to sync from the beginning after fast sync
Why Does Fast Sync Restart
As stated in Péter Szilágyi's comment above, you will have to wait for --fast syncing to complete, otherwise you will have to restart the process again. The message you ...
33
votes
Accepted
How to reduce the chances of your Ethereum wallet getting hacked?
(Please edit me. I'm a community wiki)
Summary
Don't allow TCP request on port 8545 from the Internet to be forwarded to your geth machine
Don't enable --rpc without checking that only your GPU ...
Community wiki
33
votes
Accepted
How to add new Sealer in Geth 1.6 Proof of Authority?
The protocol defines a voting mechanism to dynamically add new signers and remove existing ones. In Geth this can be controlled via the clique.propose(address, authorized) method (clique_propose for ...
32
votes
Accepted
How to delete or reset the blockchain in geth? (OSX)
For geth, delete $home/Libary/Ethereum/chaindata. That should wipe out the blockchain itself and let you sync from scratch. Also you probably want to do a fast sync afterwards to get back fast-ish on ...
32
votes
Accepted
Instrumenting EVM
To do this, you need to define a VM log collector, which implements StructLogCollector. This function gets called on every step of the VM, and is provided with copies of the memory, stack, and ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
go-ethereum × 6340solidity × 940
web3js × 753
blockchain × 630
private-blockchain × 532
contract-development × 363
synchronization × 313
transactions × 312
ether × 255
mining × 252
json-rpc × 227
truffle × 210
remix × 206
mist × 197
geth-debugging × 196
golang × 186
ethereum-wallet-dapp × 177
openethereum × 176
wallets × 165
nodes × 161
contract-deployment × 147
testnets × 141
tokens × 127
metamask × 124
accounts × 122