Questions tagged [go-ethereum]

go-ethereum, also known as geth, is a Go implementation of the Ethereum protocol. Use this tag for questions about creating or writing code for a geth-based Ethereum service.

go-ethereum is the most widely used client implementation for Ethereum.

Command Line Options

Install on Mac

Install brew...

brew update
brew upgrade

Install Ethereum

brew tap ethereum/ethereum
brew install ethereum

Install on Windows

Download the latest stable binary, extract it, download the zip file, extract geth.exe from zip, open a command terminal and type:

chdir <path to extracted binary>
open geth.exe

Install on Linux

sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum
430 questions
16
votes
3 answers

What is the of use Web3.providers.HttpProvider("")

I want to interact with a smart contract using web3js. Every example will start with following var Web3 = require('web3'); var web3 = new Web3('http://localhost:8545'); // or var web3 = new Web3(new…
Divya Galla
  • 513
  • 1
  • 9
  • 31
12
votes
1 answer

The field extraData is 97 bytes, but should be 32. It is quite likely that you are connected to a POA chain

I deployed a private network via geth and posted a smart contract there. Accounts are set in the genesis block I'm creating a python function in which I want to call a smart contract function import web3 import json class Estate(): with…
Ilya
  • 343
  • 3
  • 10
12
votes
0 answers

Ethereum LES getProofsV2 Always Returns [] (Empty Nodes)

I'm unable to get an Ethereum LES getProofsV2 (or getProofs) request to produce a ProofsV2 (or Proofs) response with anything but an empty array of Nodes. This is for a request targeted to a GETH node open to LES connections. The request arguments…
GoZoner
  • 67,920
  • 20
  • 95
  • 145
10
votes
0 answers

How to fix 'write tcp 127.0.0.1:54917->127.0.0.1:8545: i/o timeout' error in golang code that listens to smart contract events

I am using golang to listen to the smart contract events. I deployed my contracts to ganache ui and ganache-cli ports. But I get the below error: ➜ sc_events go run main.go 2019/04/17 14:25:04 write tcp 127.0.0.1:54917->127.0.0.1:8545: i/o…
10
votes
1 answer

Geth ecrecover invalid signature recovery id

I'm trying to verify signature passed in from client using the geth golang library. I'm getting the sample data (signature / address) from one of my cryptokitties accounts (I can see it in the request). If I paste the blow credentials into…
Levon Tamrazov
  • 530
  • 2
  • 9
  • 20
10
votes
4 answers

How to authenticate and send contract method using web3.js 1.0

I am confused about how I should be executing a contract's method using the web3 1.0 library. This code works (so long as I manually unlock the account first): var contract = new web3.eth.Contract(contractJson, contractAddress); contract.methods …
Nick Young
  • 885
  • 1
  • 10
  • 21
9
votes
2 answers

Panic: max fee per gas less than block base fee: address 0xbc8153EE0b1E9B1f1E8153945400dc38EDbD8638, maxFeePerGas: 1 baseFee: 875000000

I found the following example for working with the SimulatedBackend. Until recently that worked fine, however this code now results in a panic (panic: max fee per gas less than block base fee: address 0xbc8153EE0b1E9B1f1E8153945400dc38EDbD8638,…
Arjan van Eersel
  • 119
  • 1
  • 1
  • 6
9
votes
1 answer

How can I convert a *big.Int into a byte array in golang

Im trying to do calculations on a big int number and then convert the result to a byte array, but I cannot figure out how to do so this is where Im at so far. anyone got any ideas sum := big.NewInt(0) for _, num := range balances { sum =…
Kravitz
  • 2,769
  • 6
  • 26
  • 53
9
votes
1 answer

Data on Private Ethereum blockchain lost/disappears after couple of days

I am deploying a private ethereum blockchain (geth) on a virtual machine on Azure. Upon deploying my Solidity contracts on the blockchain and launching my NodeJS application to it, I am able to add data normally through web apis of the nodejs…
Ghassan Zein
  • 4,089
  • 3
  • 19
  • 30
8
votes
2 answers

How can we get token holders from token?

I have created my own ERC-20 token (AJR) and deploy on Ethereum private node, Now I want to list all the transaction by Token name. Also, I need to list down all the token holders by using contract address or token name. I try to fetch using web3…
8
votes
1 answer

Can we get transaction information recorded in the past block using Solidity in the Smart contract?

I am studying blockchain with Ethereum, and I want to use past transaction data in the Smart contract using Solidity. If I use Web3.js module in the program written in javascript, I can get these data easily. But I can't get these data in the Smart…
i20gyawa
  • 83
  • 1
  • 4
8
votes
4 answers

Clique POA Signed recently must wait for others

This is my first time on this i hope somebody can understand my grammar and question. I have created 2 nodes using puppeth and choosing Clique for my private Ethereum. Both nodes are sealer (verify on both nodes using clique.getSigners()) and both…
qarina teal
  • 81
  • 1
  • 3
7
votes
1 answer

Unable to attach to remote geth: Invalid pipe address '/.rinkeby/geth.ipc'

I'm on Windows trying to connect to Ethereum Testnet via rinkeby. I downloaded geth 1.8.2 and Ethereum Wallet 0.9.3 I gave 1st command as: geth --rinkeby --fast --cache=1024 NOTE: after above command, I get the url on cmd…
PrashantNagawade
  • 426
  • 1
  • 6
  • 24
6
votes
1 answer

geth option "--allow-insecure-unlock", what exactly does it mean?

The doc on github says: --allow-insecure-unlock Allow insecure account unlocking when account-related RPCs are exposed by http And, I have to add the option when start geth, otherwise can't unlock the account. Questions What does…
Eric
  • 22,183
  • 20
  • 145
  • 196
6
votes
2 answers

Why is my Ethereum block number 0 in geth, even though the sync is nearly complete?

> w3.eth.syncing AttributeDict({ 'currentBlock': 5787386, 'highestBlock': 5787491, 'knownStates': 138355583, 'pulledStates': 138341120, 'startingBlock': 5787335, }) > w3.eth.blockNumber 0 I had done full sync but blocknumber is always 0.
pan12jian
  • 69
  • 1
  • 2
1
2 3
28 29