Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [go-ethereum]

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

1
vote
2answers
57 views

How does node discovery works? [duplicate]

I have customized the go-ethereum code a bit, compiled and running on 3 nodes (1 miner 1 bootnode 1 fullnode) in my private-net. I just wondered that why should I initialize genesis.json on each node? ...
2
votes
1answer
33 views

How to calculate token buy and sell prices?

I have a ERC20 token string public name = "Token ZIZ"; string public symbol = "ZIZ"; uint8 public decimals = 18; uint256 public totalSupply = 1000000 * 10 ** uint256(decimals); //...
0
votes
2answers
44 views

How can I (efficiently) programatically see if I am on an ETH or ETC chain?

if i have 2 nodes, one ETH and one ETC, and I am writing a program to use these nodes, how can i determine which node I am using at any given time? the best i can come up with is to check a known ...
0
votes
1answer
27 views

Golang Equivalent to list accounts on node - web3.eth.Accounts()

Does anyone know if its possible to get a list of the accounts on a node using golang, after Dialing to the node, basic PoC would be assuming the accounts are already unlocked via the CLI Basically ...
-1
votes
0answers
24 views

What is the difference between deploying smart contracts via geth and deploying via swarm?

The main purpose of the swarm is to disseminate Etherium's public records, but it does not make sense. Because Etherium has public records in the form of blocks? A swarm is just a distribution of ...
1
vote
0answers
23 views

How to connect REACT-NATIVE with whisper ethereum protocol using GETH or any light Client or API

is there any thing connect to whisper(web3.shh) protocol in react-native. How to connect REACT-NATIVE with whisper ethereum protocol using GETH or any light Client or API
0
votes
1answer
23 views

how do I know which node picks up my transaction? in general, how is a node assigned to broadcast a specific transaction?

How do I know what node is broadcasting my transaction to the network? how can i get more information about this node? for example, how do i know if the node is a geth or parity node? does it matter?
0
votes
1answer
50 views

How do smart contract communicate with other?

As we all know that an external account can send a transaction to smart contract. But I'm confused when it comes to how contracts talk with each other. Contracts that exist within the global scope ...
1
vote
1answer
29 views

Solidity keyword require (false) will run out of my gas, why?

I meet a strange problem when I test my contract in Remix-ide + geth 1、I run a private chain in geth 2、I connect to the node with web3provider in Remix-ide 3、I deploy the contract like this : ...
-1
votes
0answers
22 views

ethereum swarm - unknown version and genesis hash [duplicate]

I linked go-Ethereum with Swarm. The warning says unknown version and genesis hash. Because of this, I do not see the connection when connecting to another node. how can i fix the prob
-1
votes
0answers
19 views

What is Protocol stack in Geth client code?

I am looking into geth directory and want to understand what is protocol stack ?
-1
votes
0answers
17 views

IPFS name resolve error - No resolver found for codec

I'm getting an error "No resolver found for codec" while resolving the dag. Steps to reproduce: 1) add file into ipfs 2) add ipfs hash to dag(IPLD bundle) and get dag hash 3) create key and publish ...
1
vote
2answers
40 views

What is wrong with the 'sell' and 'buy' token functions in my contract? [closed]

There is my solidity function buyTokens(uint256 _numberOfTokens) public payable { // Require that value is equal require(msg.value == multiply(_numberOfTokens, tokenPrice)); // Require ...
2
votes
1answer
49 views

about ethereum swarm download speed

Torrents also increase in speed as the number of peers increases. swarm Is the same? This is because dividing the data into chunks is the same.
1
vote
1answer
52 views

Estimate Gas For Smart Contract Always Fails

I have deployed a very simple contract to the Ethereum blockchain to be able to split a payment across two different outputs. pragma solidity ^0.5.0; contract MoonTrade { function multiSendETH( ...
2
votes
1answer
35 views

Where is the function that rewards the miner address for mining the block?

I have recently been digging into go-ethereum and have 'plugged' my own consensus mechanism which requires a node to solve a simple equation (2+2) etc to seal a block. However, even after letting it ...
3
votes
0answers
20 views

How to access txpool pending transactions using Netherum?

I want to get list of transactions which are in pending state & queued state in txpool. I can see these transactions in pool using txpool.inspect command. I tried code given in nethereum sample ...
0
votes
1answer
27 views

How to setup Testnet in Windows?

What are the commands for windows power shell to make a testnet. I require steps to set up testnet in private network in Windows OS.
0
votes
1answer
18 views

Relationship between Etherium block and Whisper

When a message is sent to another node with a whisper, it is immediately visible regardless of the block. If so, does the block have a record of using whisper?
1
vote
0answers
35 views

solidity state variables lost after web3 connection reset

I setup an Ethereum 2 node system using geth and implemented a web3 client that talks to the 2 nodes. what it looks like: Node A, Node B I have a EthereumClient JS file where I start 2 web3 clients ...
1
vote
1answer
30 views

How can I connect to a local geth node from docker container?

In this case, I run a geth node in local env, and A app in docker, How can I connect to geth from docker?
1
vote
0answers
26 views

Geth and Private Blockchain Mining

I am trying to set up a private blockchain for the first time with a Geth client. After initializing my custom genesis json file, running the networkid in the console and setting up a couple of ...
1
vote
0answers
36 views

How can I run smart contract locally on my computer?

We all know that Ethereum nodes can run smart contract. But I'm wondering whether can I setup contract run-time environment from Ethereum source code locally so I can run smart contract without ...
0
votes
1answer
24 views

Transaction cannot found when using debug.traceTransaction

I am trying to use the debug.traceTransaction API but got the following error: >debug.traceTransaction("0x3684f071b34da1116282ee88a106a8f2a266d273ef7d8964957f65128fb58d77") Error: transaction ...
0
votes
0answers
30 views

How to test bootnodes?

I have this - root@node1:~/devnet# bootnode -nodekey boot.key -verbosity 9 -addr :30310 INFO [11-28|14:31:45.298] New local node record seq=1 id=19e4b74a81b85d03 ip=nil udp=0 tcp=0 I expected to ...
2
votes
1answer
77 views

How to catch solidity contract revert message using web3j

Is there any way to catch solidity revert message like Remix Javascript VM in web3j Revert message(remix) transact to Erecruitment.issueNewAdmitCard errored: VM error: revert. revert The ...
-1
votes
0answers
45 views

Memory usage by geth is less

I have setup a four node etherum private network ( 8 core 32 gb ram). I could see 100% cpu utilization but geth is taking only maximum 22.6 % memory. Can anybody suggest why geth is allocating 22.6% ...
0
votes
0answers
25 views

Why is geth account list and eth.accounts different?

I am trying to sync Metamask accounts with a private geth installation. I imported the account from MM and that shows on geth list but on eth.accounts nothing for that account. Any reason for this ...
0
votes
1answer
27 views

Run testnet in a cluster

I have launched a blockchain testnet in a cluster with different nodes and I have some questions about how it works. If I run more than one geth client(a node in the blockchain) in one node of the ...
0
votes
1answer
66 views

IPFS versioning - How to get all files from the IPFS key?

Based on the below code, im able to add a file**(dataobj.txt --QmUUHKjR5ZdrrYmxpXyPrYP3eMyhv9FnRKo1Duv9stzmmw)** and publish a file and then assign to the key "myIPFSKey". Step 1: ipfs add -r ipfs/...
2
votes
1answer
43 views

How Can I call contract's function from Java?

There is BizzleTokenSale contract. pragma solidity ^0.4.2; import "./BizzleToken.sol"; contract BizzleTokenSale { address admin; BizzleToken public tokenContract; uint256 public tokenPrice; ...
1
vote
1answer
27 views

Is it possible for multiple geth processes to share chain data?

I would like to know if it is at all possible to have multiple geth processes share the same chain data. I currently have multiple nodes (for a private chain) connected to the same file system via ...
1
vote
1answer
21 views

How to keep track of a daily and yearly object

I need some help on what's the best way of implementing solidity code that keeps track of a user's daily data. Once the day passes it's stored in an array for every single day that passes and that ...
3
votes
0answers
56 views

Miner accepting 0 price transactions

I am hosting a private blockchain and I am testing out the Geth functionality. I have deployed a Solidity contract based on the Greeter example. The functionality is not important, but suffice to say ...
-1
votes
0answers
26 views

unable to use geth in fast mode

I am running a geth node in local ,the node start and sync without error but I cam't use it to send transaction or get past events in contracts. here is my command `geth --syncmode=fast --ws --wsaddr=...
1
vote
0answers
26 views

geth stops syncing

I am running geth via docker docker pull ethereum/client-go. It stops syncing after serval days. After I reboot the docker, it works fine again. This situation happened serval times. Here is the last ...
1
vote
1answer
27 views

How to get balances of all the accounts(~1000) in Geth node?

How can I get the balance of all the accounts in my Go Ethereum node? I have about 1000 accounts and it is too slow to use eth_getBalance to get balance for each address. Are there any ways to use ...
3
votes
0answers
57 views

How the Ethereum Swarm connects nodes and several related questions

Read everything after https://swarm-guide.readthedocs.io/en/latest/usage.html and leave an article. Some questions about etherium swarm Where is the uploaded data stored? And how do you find it? I ...
1
vote
1answer
28 views

Smart Contract To Send Multiple Outputs

I'm learning about smart contracts currently and a bit confused as to how they really work. My website allows users to send ETH from their wallet on site to another address off site. During which I'd ...
1
vote
0answers
35 views

I have connected two notes using bootnode in ethereum private blockchain but mining is not started why?

I have generated the enode from Bootnode in Ethereum private network and i connected three individual nodes using that enode through Bootnode, and i have checked whether that nodes are connected or ...
0
votes
1answer
20 views

Why the remote port connected by the geth node is not the initial port by remote node?

I deploy a ethereum private network by geth, And I running three node on my computer, connect them by bootnode. The private network is working, But I'm confused about the results of the operation. My ...
1
vote
2answers
35 views

transaction fails due to out of gas in mainnet

Transaction fails due to out of gas though gas used by transaction is 22.32 % . What might be the reason ? I have give enough gas : 203000 wei. Here is the link of the transaction
0
votes
2answers
22 views

How to access API's from smart contract deployed on Ropston network from local Machine?

I want to access API's from a smart contract deployed on Ropsten network. This smart contract is written and deployed by some external entity and they have exposed API's. I know the smart contract ...
2
votes
0answers
45 views

Private network: Using geth to mine for parity nodes

I want to set up a private Ethereum network using a parity client. Ideally, I want to resemble the "real" Ethereum network as close as possible. Thus, I want to set up a proof of work network. For ...
0
votes
1answer
21 views

Incorrect Usage. flag needs an argument: -rpcaddr = Ethereum private blockchain

I'm trying to make Ethereum private blockchain. But facing a error while running this "geth --nodiscover --networkid 42 --datadir .ethereum/ --unlock 0x526d8a6baa472da27215f748236af96bc9f256d7--mine ...
1
vote
1answer
29 views

Is there any period of custody for block rewards in Ethereum?

In Bitcoin, some block heights are required for spending coinbase transaction. But in Ethereum, there's no input/output. Then, is there any maturity time for using block rewards in Ethereum? If yes, ...
0
votes
1answer
27 views

Can I get geth.ipc if I use ganache-cli to deploy a default private test ethereum env

When I test my golang code which subscribes/filter/parse log from a local ethereum test env built by myself, The way I communicate with eth is by using geth.ipc. But another test env is based on ...
0
votes
1answer
38 views

How to avoid transactions getting queued due to one low gas transaction?

When executing a smart contract through one owner account, and if one transaction gets stuck( due to low gas price), all the other transactions submitted after that becomes pending. Is there any well-...
1
vote
1answer
36 views

IPFS Versioning for dynamic content

is it possible to keep versioning in IPFS? Like im saving one row of record like pid:1, mid:3, status: started --> v1 pid:1, mid:3 status;completed --> v1.1 is there any way to implement ...
1
vote
0answers
26 views

When locate a block with both the hash and block number?

In the go-ethereum code, I see functions use both the number and block hash to locate a block. Why is that? Isn't block hash enough? An example function: https://github.com/ethereum/go-ethereum/blob/...