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
0
votes
1 answer

Why my contract address after deplyment doesn't appear even though I have a Public State Variable (address public owner)?

The function setActivity always revert due to the address ? How can I get the contract address because it sounds that the address is always all zeros when I get the value fron the (address sate variable) ? Here is the Smart Contract : //…
0
votes
0 answers

Ganache unpredictably drop transactions

I use "go-ethereum/ethclient" to interact with ganache, for every second, a client will send several transactions (in several threads) to ganache by the API SendTransaction. All the transactions will call the same smart contract. Then I check the…
Myon
  • 1
0
votes
1 answer

Private network with QBFT stops mining after 1 validator ungracefully shut down

I have a private network running the GoQuorum client from Consensys (Version: 1.10.3-stable). The network runs within a K8s cluster. There used to be 6 validators, a bootnode and and 2 rpc nodes. As is typical for goquorum, there are no transaction…
Dvinubius
  • 453
  • 4
  • 8
0
votes
0 answers

Why does my Geth node "hang" and stop looking for peers after about 5 minutes?

I've upgraded Geth to 1.12, completely removed my Geth DB and started syncing. Each time, the terminal hangs (stops generating new "looking for peers" entries after a few minutes. Logs look like this: INFO [06-20|16:39:53.461] Looking for peers …
inexile
  • 35
  • 5
0
votes
2 answers

Generate storage slot and values dynamiclly from smart contracts for Ethereum

I have several smart contracts which needs to be added on genesis.json file. The smart contract contains arrays, and mappings (from uint and address to struct). The struct contains strings and several uint numbers. These contracts are regularly…
ashu
  • 1,197
  • 2
  • 14
  • 30
0
votes
1 answer

Is there a function in golang for reading information emitted inside the events?

I'm new to golang and can`t find the answer. I have a simple golang package that should parse the amount of blocks to find there emitted events and use information from those events later. I already have logs of type []ethTypes.Log returned by…
pastrn
  • 1
  • 2
0
votes
0 answers

I want to verify an EVM chain blockhash using the block header and its content

I am trying to verify the blocks without having the access to an RPC, I using blockheader and trying to generate a blockhash using the data in blockheader, cannot figureout the exact flow for it. Written multiple scripts like below but not able to…
lklsquare
  • 15
  • 4
0
votes
0 answers

blockscout unable to get block information on initial execution

I'm building a POA network in a local environment. After completing the connection to eth-netstats, I connected blockscout and checked http://localhost:4000, and I couldn't get the information about the blocks that were previously created. What's…
0
votes
0 answers

How do I subscribe to new full pending transactions

this is code(go-ethereum v1.12.0). but error" too many arguments, want at most 1". when postman tried, the error was still "too many arguments and wanted at most 1". How do I subscribe to new full pending transactions? package main import ( …
fryyyyyyy
  • 11
  • 2
0
votes
1 answer

Remix: Returned error: {"jsonrpc":"2.0","error":"invalid opcode: PUSH0", "id":2405507186007008}

After runing my private chain node in geth and Chainlink node in my Ubuntu, I would like to test the function of Chainlink Any API(https://docs.chain.link/any-api/get-request/examples/single-word-response, Single Word Response). I ran these commands…
Keike1
  • 3
  • 2
0
votes
0 answers

Rapidly Increasing Storage Usage During Geth Full Node Sync

I am currently synchronizing an Ethereum full node using Geth and have noticed that the storage usage is increasing too rapidly. According to my logs: age=5y6mo2d - 16 may 12:45 pm - 748 gb age=5y3mo4h - 17 may 3:16 pm 1.11 tb age=5y1mo2d - 18 may…
kakakakakakakk
  • 467
  • 10
  • 31
0
votes
1 answer

Unable to get env variable from docker compose in dockerfile

I am working on dockerfile for ethereum chain deployment. I finished dockerfile with hardcoded parameters, but when I reference this parameters as environment variables some unclear issues have been rose. Here is a Dockerfile: FROM…
Gleichmut
  • 5,953
  • 5
  • 24
  • 32
0
votes
1 answer

Field ... for tuple not found in the given struct Golang Abi Package

I want to send tuple as parameters to contract by using Abi Package type SingleSwap struct { poolId []byte kind *big.Int assetIn common.Address assetOut common.Address amount *big.Int userData []byte } type Funds…
Mr Wolf
  • 11
0
votes
1 answer

`go-ethereum` client.BlockByHash() gives error "not found"

I have the following code for subscribing to new blocks as they appear: package main import ( "context" "fmt" "log" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" ) func main() { …
Filipe Aleixo
  • 3,924
  • 3
  • 41
  • 74
0
votes
0 answers

On the geth Ethereum private chain, web3.eth.getPastLogs() always return empty array?

I created a geth Ethereum private chain and successfully committed the transaction through web3.js and saw the corresponding transaction in the specified block, but my web3.eth.getPastLogs() method always returns an empty array. I query the…
ATFWUS
  • 9
  • 3