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

How do I recover ECDSA public key correctly from hashed message and signature in R || S || V format?

I have used the following code to generate an ecdsa key-pair(privKey and pubKey), encode them and then decode them back: https://stackoverflow.com/a/41315404/1901320. Next I create a hash for a message (txnData.Payload() is of type []byte) using…
2
votes
0 answers

Get actual gas cost from a method call in a private node by modifying geth's code

I have a private ethereum network and using Geth, to speed things up, I want to modify how the gas estimation is done. Using RPC call for eth_estimateGas is too slow when it comes to multiple concurrent operations. I see this is done in function…
CristiC
  • 22,068
  • 12
  • 57
  • 89
2
votes
1 answer

Why does my Ethereum transaction cost 21000 more gas than I expect?

Somehow I am getting insanely high gas costs compared to what I think I should be seeing. I have a function in solidity: function setMessage(uint8[] _fMessage) public returns (uint256){ emit Message(_fMessage); } And my event: event…
Cal W
  • 167
  • 1
  • 14
2
votes
3 answers

Pass parameter as bytes32 to Solidity Smart Contract

I am using this Ethereum Go Client and trying to pass a string / bytes32 to Solidity. The function in the smart contract is very simple (for testing now): function vote(bytes32 id) { //id has the value…
bergben
  • 1,385
  • 1
  • 16
  • 35
2
votes
0 answers

solidity cannot access member variable from another contract on private chain, works fine on remix javascript vm

I have the following solidity code. pragma solidity ^0.4.21; contract Parent { uint public childCount; Child[] public children; function makeChild(string name) external { children.push(new Child(address(this), childCount,…
3tbraden
  • 667
  • 1
  • 10
  • 21
2
votes
1 answer

Ropsten network connection with web3.js(Version 1.0.0-beta.34)

I have an serious issue, I'm trying to figure out since two days but not succeeded. I want to connect testnet ropsten using web3.js which I guess I'm successful but issue is I have some balance on ropsten network but web3.js displaying only 0. You…
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
2
votes
0 answers

HTTP Basic Authentication in Web3js

I have geth running in remote server and is protected using HTTP Basic Auth. I tried the below two methods. both don't work: let web3 = new Web3( new Web3.providers.HttpProvider( 'http://' + "username" + ':' +…
Narayan Prusty
  • 2,501
  • 3
  • 22
  • 41
2
votes
0 answers

JSON RPC api or steps to get ETH transaction on particular address

I am using php. I want to get all deposit transaction by user on it's ETH address. I am using "geth" client. I am not able to get any json rpc api for get transaction. As per search on internet I have tried "eth_newFilter", "eth_getFilterChanges",…
kishan
  • 138
  • 1
  • 3
  • 11
2
votes
1 answer

Web3.py transactions are not broadcast on Ethereum Rinkby testnet

I am using the web.py code below to try and send a transaction with 1 ETH on the Rinkeby testnet via a local geth node. I can see the transactions as submitted in live local ethereum node log stream, but they don't ever seem to be broadcast to the…
Initial Commit
  • 497
  • 3
  • 14
2
votes
0 answers

What happens when an entry in an array of fixed entry size is smaller than the fixed entry size?

Let’s say you have an array with a fixed size for each entry (ex: a string or some bytes). What happens if you store a smaller entry? Does the entry get padded with some empty value (zeroes) or does it simply get stored? Edit: Sorry for the error,…
Coalited
  • 99
  • 3
2
votes
0 answers

Ethereum: What's a good way to retrieve a large amount of old smartcontract log data from a RPC service for a backfill?

The problem I'm posed with is backfilling a specialized database, using data from the event log of a given smartcontract on an Ethereum blockchain. The question is however: how to do so without reaching the limits of eth_getLogs (also without…
2
votes
1 answer

Etherrum geth command shows "retrieved hash chain is invalid" in windows 10 powershell

While running geth command on powershell, I am getting Error : "WARN [02-19|02:44:45] Synchronisation failed, dropping peer peer=5dac192c404506a0 err="retrieved hash chain is invalid" And after that no more node packets are downloaded. Can…
piyush daftary
  • 241
  • 1
  • 10
2
votes
0 answers

Ethereum private chain resets back to block 0 when restarted

I am currently running the latest Geth 1.8.1 Iceburg version. I setup a private Ethereum network following a tutorial and everything including mining works fine, but every time I restart Geth, the chain resets back to block number 0 all the mining…
2
votes
2 answers

How to get the data of an ethereum block using geth

How can i get a block info from a running ethereum node using geth or nodejs or any other language? For example to get a block data from bitcoin, there is a config file which run a blocknotify.sh file when a transaction is confirmed and in that…
Farhan
  • 751
  • 1
  • 9
  • 17
2
votes
1 answer

How to Import Private key with Public Address

I made several accounts with some commands personal.newAccount() and the accounts created were push to the list. What I want to do is, get private key with public key that I've got with getAccount() function because of security reason. I don't want…
rachel_hong
  • 471
  • 2
  • 6
  • 15