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
1
vote
1 answer

How do i connect to an Ethereum node?

I setup an Ethereum light node on a VPS using Geth, and i'm running it using: nohup geth --syncmode "light" --rpc --rpcapi "eth,net,web3" --ws --rpccorsdomain '*' --rpcaddr 0.0.0.0 --rpcport 8080 & Now from my local laptop i would like to use this…
JayK23
  • 287
  • 1
  • 15
  • 49
1
vote
0 answers

UnhandledPromiseRejectionWarning: Error: nonce generation function failed or private key is invalid in Ganache

In Go I am using go-ethereum to read data from the ethereum smart contract. My smart contract is maintained with truffle. I am trying to fetch candidate information based on candidate id. I have a modifier in the solidity that checks if given id…
NinjaMAN
  • 101
  • 7
1
vote
0 answers

Findenode failed using bootnode in local geth network: invalid IP in response record: loopback address from non-loopback host

I followed an "old" tutorial (from 2018) about Building a local Ethereum network with Docker and Geth which is great but "deprecated" for Geth/v1.9.17. So i tried to come up with a new version for my studies. The Dockerfile's and docker-compose.yml…
norym
  • 602
  • 2
  • 8
  • 18
1
vote
1 answer

go-ethereum ethclient - cannot get event logs data

Following this read to retrieve event logs from my contract: https://goethereumbook.org/event-read When I loop over the logs like below, I'm getting empty vlog.Data that triggers the error: abi: attempting to unmarshall an empty string while…
1
vote
3 answers

go-ethereum sign provides different signature than nodejs ethers

I need signatures made in golang verifiable in nodejs and conversely (with ethereum wallets/private keys). But the two libraries that I use provide different results for the signing of a message. I don't know if it is because I make a mistake…
Jon - LBAB
  • 928
  • 11
  • 20
1
vote
1 answer

Can't find package building go-ethereum

I am new to golang and I am compiling the go-ethereum. But it gave me some errors which I can't find the solution searching google. This is weird because it seems that only me has this problem. This is my environment export…
Xudong Shao
  • 199
  • 3
  • 12
1
vote
1 answer

geth does not persist trie node data from memory to disk on ungraceful system restart

Issue: geth 1.8.22 starts mining from one of the first blocks instead of the last one on system reboot. What we have We have 3 synced private geth nodes using PoA(clique). What happened One day(a week ago) we had issues with our hosting provider so…
ryzhak
  • 395
  • 5
  • 13
1
vote
0 answers

Ethereum [Geth PoA]: How to limit queued transactions in terms of waiting time and number?

I am trying to limit queued transactions in terms of waiting time (using --txpool.lifetime ) and in terms of number (using --txpool.globalqueue) but nothing works, I am using PoA with geth, I want to limit queued transactions (transactions with high…
maroodb
  • 1,026
  • 2
  • 16
  • 28
1
vote
3 answers

Python Ethereum Blockchain Transactions

I want to get ethereum block-chain transactions using python. I've imported the following libraries: import psycopg2 from web3 import Web3, HTTPProvider import sys import pprint When I run the.py file with python command with sudo like sudo python…
Bilal Ahmed Yaseen
  • 2,506
  • 2
  • 23
  • 48
1
vote
1 answer

Error while connecting from Remix via rpc to local blockchain

geth --datadir ./accnt1 --port 30306 --networkid 2018 --rpc --rpcport 8545 --rpccorsdomain=”*” --nodiscover --rpcapi “db,personal,eth,net,web3,debug” --rpcaddr="127.0.0.1" --rpcport 8545 console using the above command to start the console , to…
dileepVikram
  • 890
  • 4
  • 14
  • 30
1
vote
1 answer

eth.getBalance() and eth.getBlock("latest").number returning 0

Following is the console output of the geth: > eth.syncing { currentBlock: 3935087, highestBlock: 3935168, knownStates: 6020785, pulledStates: 6015769, startingBlock: 3935060 } The account address…
1
vote
0 answers

Ethereum nonce behaviour on invalid transaction

Given the state: Account X, nonce: 0 Account X sends a valid TX Account X new nonce: 1 Account X sends an invalid TX that doesn't pass a validateTx() check in mempool (msg too large, more than 32kb for example) Account X new nonce in the global…
Lukas Lukac
  • 7,766
  • 10
  • 65
  • 75
1
vote
1 answer

How to deploy ethereum smart contracts in Go SDK

I am trying to deploy ethereum smart contracts in go sdk but i am getting some error as ./inbox_test.go:20:44: not enough arguments in call to backends.NewSimulatedBackend have (core.GenesisAlloc) want (core.GenesisAlloc, uint64) I…
Savitri
  • 21
  • 4
1
vote
1 answer

Cannot use nil as type _Ctype_CFAllocatorRef in argument to func literal

I'm running the command below to install a package for unit tests written in go for Solidity. go install ./cmd/abigen But I'm receiving these errors: #…
Vikas Banage
  • 494
  • 1
  • 8
  • 25
1
vote
0 answers

Breakpoints ignored when debugging ethereum-go in Visual Studio Code with Rich Go extension

I am trying to debug go-ethereum code inside the Visual Studio Code. So far I was able to build debug version of binaries by modifying the Makefile and run the project inside the VS Code with "Rich Go" extension installed. Entry to the…