Questions tagged [go-ethereum]

Go Ethereum (short: Geth) is a Golang implementation of the Ethereum protocol.

1,969 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
608 views

How come my geth require to sync blocks from beginning after update to geth 1.4.12

I was running geth under a user call 'ethereum' with this command: geth --datadir=/home/ethereum/.ethereum It was up to date until today there have a quickfix on geth so I compiled the source code ...
3
votes
0answers
194 views

Raspberry Pi: Geth slow sync every time reboot

Since the first sync (I copy the chaindata folder from my local machine to the RPI), every time I start the RPI it takes hours to just sync 20k blocks. I tried geth --cache=512, etc. I am using ...
3
votes
0answers
103 views

Contribute function of crowdsale is not working

I am having a crowdsale contract. I am trying to run contribute function using command: contractInstance.contribute.sendTransaction(101,{from:eth.accounts[0],value:200, gas:4000000}). It is creating a ...
3
votes
0answers
332 views

not able to mine transactions generated on remote node

i have connected two nodes locally on my private testnet using admin.addPeer() I0829 16:33:25.280649 eth/downloader/downloader.go:320] Block synchronisation started I0829 16:33:27.187839 core/...
3
votes
0answers
517 views

What is the max value of gaslimit in genesis.json?

What is the max number of gaslimit you can set in genesis.json? I'd like to put lots of data in one block, so I need to set max gaslimit in genesis.json.
3
votes
0answers
192 views

How can i detect the blockchain fork event?

How should I handle blockchain forks in my DApp? In this question, a module named reflux-tx is introduced, which can help to trace the transaction state and watch for the blockchain fork event. But ...
3
votes
0answers
588 views

Why I can not use ./geth --testnet --fast --cache=1024 --jitvm for geth 1.4.7?

I tried two times. Each time block count is for mainnet and there is no any chaindata for testnet
3
votes
0answers
449 views

geth client - cannot keep it in sync

I have an Ubuntu 16.04 instance on Amazon EC2 I can do: geth console 2>> ~/geth.log instance: Geth/v1.4.3-stable/linux/go1.6.1 > Everything looks fine: > eth.blockNumber 546120 > ...
3
votes
0answers
1k views

Any Idea Why Geth (1.4.1-rc-4b9de75) Is Such Heavy Disk I/O At Startup?

So I am trying to figure why geth is such heavy disk I/O at startup, even after the chain is fully synced? The problem is that on a normal non-SSD hard drive it doesn't matter how fast the CPU is, ...
3
votes
0answers
47 views

Why lastblockhash validation mismatch in integration tests but unit tests all pass

I have successfully built go-ethereum (release/1.3.5) and godep with go v1.5.1 on LINUX 14.02. When I run 'godep go test ./...' all of the existing unit tests pass beautifully. I can also run geth ...
3
votes
2answers
268 views

Geth v1.8.21 slow syncing on archival node

Geth Version v1.8.21+bionic - stable Machine - 16GB Ram, SSD, i7 processor I'm currently in the process of syncing a full archival node on Geth. Up until recently the chain was syncing fine, around ...
3
votes
1answer
2k views

What is the burn() and burnFrom() function in EThereum Token Creation contract?

Please find the below ethereum token creation contract. It has two burn functions. It is having redendent params also. Why it is placed, what is the importance of the functions. pragma solidity ^0.4....
2
votes
0answers
41 views

How to create web3.js which is used in geth?

I'd like to know how to create https://github.com/ethereum/go-ethereum/blob/master/internal/jsre/deps/web3.js file automatically. It seems like bundled by some tools but I cannot find any mention or ...
2
votes
0answers
129 views

"Head state missing, repairing" after private network crash. Any way to recover the blocks?

I'm running a small PoA private network (2 nodes, one signer, one for API purposes). Yesterday, the system both nodes are running on crashed due to an unrelated issue. As a result, both geth instances ...
2
votes
0answers
97 views

eth_getLogs and some missing logs

I have an indexing software that scans the blockchain for certain events. It works continuosly using eth_getLogs over my nodes. It works perfectly, but I'm seeing that sometimes I'm missing some ...
2
votes
0answers
111 views

How to use geth devp2p to find nodes on non-ethereum chains?

Non-ethereum chains: other chains use geth such as BSC or ethereum layer2 chains such as Polygon. I can find ethereum nodes with devp2p discv4 crawl -timeout 30m all-nodes.json But can't find Polygon ...
2
votes
0answers
149 views

Losing connection on Geth websocket subscription

I am trying to keep multiple WebSocket connections to my Geth node open at the same time (around 200 connections). My issue is that they keep closing with a timeout error. I can't seem to know if it's ...
2
votes
0answers
29 views

How to rebuild pruned data after prune-state?

Geth version 1.10.4 introduced a new feature prune-state It deletes all state from db except HEAD - 127 What happens if I try to retreive old data via jsonrpc after pruning? Can I rebuild the pruned ...
2
votes
0answers
53 views

how to estimate the gas cost of a contract function that will fail

I am trying to estimate the gas cost of a contract function that will fail. when i do that using standard web3.py's contract.function(args).estimateGas(txArgs) it ends up failing and raising an ...
2
votes
0answers
105 views

Smart contract function signature only 1 byte

I have noticed some contract calls only contain the function signature in the 1st byte of the input data. For example: ...
2
votes
0answers
91 views

Is there a way to filter pending txs?

I wrote a script to track unconfirmed transactions in the mempool, but my script is always triggered by txs, that are too long pending for like many hours or days because of not enough gas that was ...
2
votes
0answers
82 views

How to import accounts with mnemonic in web3 console

geth attach http://localhost:8545 How to import accounts with mnemonic in this Geth console... like web3.personal.importRawKey("XXXX")
2
votes
0answers
258 views

Running Geth full node + archiving on tiered storage possible?

I'm trying to run a geth full node with archiving for development\learning and custom analytics. I have a physical Windows server running HyperV where I carved out the following VM specs: 24 vCPUs ...
2
votes
1answer
354 views

Sending transaction directly to miner on private network?

I am trying to understand how one node can send a transaction to another node (miner or full) directly rather than waiting P2P network to distribute it? Say I have two non-miner nodes A and B and one ...
2
votes
0answers
66 views

Running a SPV wallet on Arduino/ESP32?

I want my ESP32 to make transactions and check for the details of blockchain using a secure method. Actually, I want to use make calls to the blockchain instead of relying on a single node. In my ...
2
votes
1answer
103 views

Problem when accessing variables in Storage geth

I found some contract that looks like this: // SPDX-License-Identifier: MIT pragma solidity 0.8.2; contract IceCream { address a; address b; bool public c = false; uint256 public d; ...
2
votes
1answer
26 views

Block data withing range of date

I need to get access to the blocks between 7000 and 8000 and since I plan to query the states I need archieve option. Do I need to run a arhieve node and wait until it downloads everything, or is ...
2
votes
2answers
125 views

why does it matter to sync nodes with time?

As we know, time gets set on a block's header as the miner's current local time. Each node while accepting a block, checks if the new block's time is more than parent 's time and is not also in the ...
2
votes
0answers
194 views

Can you run `geth inspect` while geth is running?

I'd like to get some of the info provided by geth inspect, but it complains about a lock when I try running it, presumably because geth is indeed currently running. $ geth inspect ... Fatal: Failed to ...
2
votes
0answers
85 views

Why do pending transactions appear to have a 3 hour cycle? (according to Etherscan data)

See: https://etherscan.io/chart/pendingtx There's clearly a 3 hour periodicity of txn volume. Now, I'm aware that Geth nodes have a parameter --txpool.lifetime which is set default to 3 hours. But ...
2
votes
0answers
156 views

GETH node maxpeers performance and benefit

I'm trying to optimize my node for transaction propagation speed. Expanding on this question: Can we improve the performance of Geth server by setting maxpeers to 0? Are there any data available ...
2
votes
2answers
813 views

Solidity - Proper way to Import Contracts

When importing one Solidity contract into another, what’s the difference between importing it and accessing it using the is keyword, vs. importing it and just instantiating an object of it? Here’s ...
2
votes
1answer
546 views

Solidity Integration of Multiple Contracts and a Library

I'm trying to understand the correct way to Deploy and then Import multiple Smart-Contracts and a Library when creating one big project. As an example, the project will have the following Library and ...
2
votes
0answers
52 views

Transforming random number into normal distrubution

I am looking to transform a random number into a normal distribution between 1-20. I have been looking to implement the box muller transformation to do so. But can someone point me an easy way to do ...
2
votes
0answers
83 views

How to convert geth arhive to full node without loosing intermediate state

We have a geth node that runs with --gcmode "archive". However, the recent growth of disk space is unsustainable and we want to change this to a full node. If I stop the node and just re-run ...
2
votes
0answers
51 views

Send raw transaction from geth when not synced (exceeds block gas limit)

I have a geth node which is not synced and I want to send eth. > TX={ from: FROM, to: TO, value: VALUE, nonce: NONCE, gas: GAS, gasPrice: GP } > personal.unlockAccount(...) > SIGNED_TX=eth....
2
votes
0answers
182 views

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 ...
2
votes
0answers
47 views

Connecting ethers.js to a light client

I'm trying to connect ethers.js to a geth light client. A connection seems to form, but with no indication that I'm able to receive the right data. Here's the geth command I'm using: geth --rpc --...
2
votes
0answers
253 views

How to get event from geth ethereum node using web3.js

I have created a simple contract where I am trying to write a value to a state variable in solidity smart contract, and emit that written value. I am using Truffle v5.1.28 (core: 5.1.28) Solidity - 0....
2
votes
0answers
62 views

Does Ethereum support just bilinear pairing calculation not the pairing check?

I need to implement bilinear pairing calculation on my contract. Specifically, I have uploaded some parameters and need other users to calculate the pairing for me and I will pay for them if their ...
2
votes
0answers
94 views

How to run instrumented EVM in go

I'm working on a project where I would like to catch internal transactions and figure out the stack trace. For this reason, I have been trying to define an EVM log collector as recommended here. ...
2
votes
0answers
345 views

Why does Ethereum use JSON-RPC and not gRPC?

I am fairly new to networking protocols especially JSON-RPC and gRPC as they are not nearly as common in web development as REST. I was reading around and seems like gRPC generally performs better. So ...
2
votes
0answers
38 views

How to determine the uniqueness of an internal transaction

How to determine the uniqueness of an internal transaction Example is this transaction: https://rinkeby.etherscan.io/tx/0xc756517a69239bddffe3e0cb07eba98d3ad0fae1b44fc936a0119dbaf7008942#internal ...
2
votes
1answer
2k views

Geth light keeps showing "Looking for peers"

My Geth server in light mode was running without any issue up to yesterday. But after that, I only receive these messages continuously! INFO [04-19|12:59:22.181] Looking for peers ...
2
votes
1answer
788 views

Token Swap From Ethereum Host Network To Different Blockchain

What is a good way to swap tokens from the Ethereum host network to a different network (i.e. the Tron blockchain)? Would the best way to do this be to have a smart contract where ERC20 token holders ...
2
votes
0answers
130 views

debug.traceTransaction returns empty structLogs

I have installed a private node using geth (1.9.11-stable). I have created a number of accounts, deployed some contract accounts and sent transactions from the accounts to the contract accounts. By ...
2
votes
0answers
829 views

get event logs and debug trace from eth_call

I am looking for a way to execute a transaction locally (using local geth/parity node) for simulation only, before actually submitting it to blockchain. I know that I can use 'eth_call' RPC call and ...
2
votes
0answers
189 views

How to find bottleneck in geth sync?

I'm trying to benchmark geth full sync. Here are my current machine specs: Google Cloud 16 vCPU 14 Gb RAM 700 Gb NVMe SSD RAID 0 772k read/258k write IOPS 6+ Gbps network Launching with following ...
2
votes
0answers
169 views

How to reduce block time for existing ethreum blockchain network?

I had deployed my private blockchain network back in 2018-08-12 16:12:48 +0600 (1 year, 167 days ago). Since then it is working. At that time the block time was 20-30 seconds which was acceptable for ...
2
votes
0answers
407 views

Script for opening a geth console for a node and running commands in it

I am trying to create a script running a couple of geth nodes, open a console for each of them and run a couple of commands such as admin.addPeer() and miner.start(). I read that i can use --exec to ...

1 2 3
4
5
40