Questions tagged [go-ethereum]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

Interface restrictions

Why are interfaces restricted to enums, events, structs and functions? Why are they restricted from containing state variable declarations if they can contain structs?
0
votes
0answers
12 views

when to use byte32 -> string conversion in events, functions etc

When is it a good practice to use string conversion from bytes32? i.e. in events, functions and similar. What does doing so bring in terms of cons to gas costs?
2
votes
1answer
43 views

node cannot be made up in private blockchain by using command line

I have created the genesis.json The genesis json content is { "config": { "chainId": 46860, "homesteadBlock": 1, "eip150Block": 2, "eip150Hash": "...
0
votes
0answers
17 views

Question about configuration of PoW ethash concensus

How to control PoW ethash mining difficulty by setting parameters in genesis.json? For instance, make the mining difficulty constant, increase slowly or fastly? The Geth version info: [root@...
1
vote
1answer
11 views

Geth — Is this possible to setup a private chain that only mining when accept TXs [duplicate]

If I do not use the options dev and dev-period , can I setup this kind of private chain
0
votes
2answers
25 views

Fetching stored values for use in function logic

Are there any benefits from fetching stored data into other functions by calling a function to call a private variable, instead of calling the private variable directly? What is best practices? ...
3
votes
2answers
27 views

Is there a way to simulate running a transaction on a geth instance?

I want to be able to see the state changes that would result from running a transaction without submitting the transaction to the network. Is there a straightforward way to do this with geth?
0
votes
1answer
32 views

Deploy contract didnt resolve the promise

im facing a problem deploying a simple smart contract. When i use ganacha-cli, the program enter in a loop of confimation event, counting from 1. Thats the first problem. Output: Account: ...
0
votes
1answer
23 views

When sending tokens from geth, how do I specify a different address to send gas from

When I am sending tokens, is there any way to specify a separate ETH address to send the gas transaction from in geth's web3? Boiler Plate var usdtAbi = [{"constant":true,"inputs":[],"name":"...
0
votes
1answer
38 views

I can't execute transaction from Dapp: Nounce too low

I'am trying to use go-ethereum on my local network: I have configured a 5-node quorum network on my local machine and I'am building Dapp. I created smart contract and generated go bindings. When I ...
0
votes
1answer
18 views

Eth.getTransactionReceipt sometimes shows 'root' value in response instead of 'status'. why?

I am using Geth 1.9.0. While fetching the value for eth.getTransactionreceipt, I am not getting 'status' in response. Instead i am getting 'Root' field in response. Why status is not getting ...
0
votes
0answers
13 views

What are the risks to considered of PoA in production mod [Geth]?

We are using poa clique with period = 0, and we will pass to production soon, so what are the risques to considered in prod mod ? is there a best practices checklist?
0
votes
1answer
17 views

Illegal transactions can also be mined on geth

I used web3 to call the contract method (I initialized web3 with metamask, then metamask listens for the geth node). I used to deploy the contract to ganache. When I used the illegal parameter to ...
-2
votes
1answer
25 views

Call my smart contract method which should be reverted ,but the transaction is still be send and mined

When i interact with my contract by web3,metamask and ganache-cli everything's going well .eg i called the contract method with inccorect parameters ,then the error was throwed. But when i deploy my ...
0
votes
1answer
24 views

How will I determine the number of nodes required to run my private Blockchain Network stable?

I am designing a use case where millions of users will be using it and is expecting a transaction rate of 50 per second. I am looking forward to have it on Azure.
0
votes
1answer
20 views

what will happen to transactions on smaller length chain when peered with longer length chain in private ethereum

what will happen to transactions on smaller length chain when peered with longer length chain in private ethereum? Below is the scenario Step 1: I have started Ethreum private chain in 2 different ...
0
votes
0answers
26 views

How Geth classify transaction as local or non-local? txpool validateTx skips gasPrice validation for local transactions

I see geth code skips the validation of the local transactions https://github.com/ethereum/go-ethereum/blob/master/core/tx_pool.go#L528 // Drop non-local transactions under our own minimal accepted ...
1
vote
1answer
19 views

How to add a custom JSON-RPC endpoint to geth?

I'm building an Ethereum private network and I want to make a custom JSON-RPC endpoint. I've been customizing and adding some things in the go-ethereum source code but I don't know yet where to look ...
2
votes
1answer
20 views

How use SSL between geth nodes communication?

I have a poa network contains 4 nodes, I want to secure the communication between those nodes, is it possible using SSL and reverse proxy ?
1
vote
0answers
13 views

Head of blockchain fall back to 0 after unsafe shutdown, how to reset it to the latest?

System information Geth version: 1.8.27 OS & Version: Linux Docker version: 18.09.0 Background gcmode is full, syncmode is fast. Single node in private network. datadir mount to docker volume. ...
1
vote
1answer
28 views

How to add custom precompiled contract?

I want to implement some features as precompiled contracts in Ethereum. I read some articles and the contract code, but I still don't know how to do this. Is there's a tutorial from scratch?
4
votes
1answer
27 views

Why does the `DoCall` function use the first account by default?

In this line, // Set sender address or use a default if none specified var addr common.Address if args.From == nil { if wallets := b.AccountManager().Wallets(); len(wallets) > ...
2
votes
1answer
22 views

Why does function GetEVM set the balance of from address to MaxBig256?

As you can see in this line, func (b *LesApiBackend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header) (*vm.EVM, func() error, error) { state.SetBalance(...
0
votes
0answers
19 views

I can see my ethereum but its not going to my wallet

My ethereum has been confirmed delivered but not in my wallet,fairly new but I have made successful transactions before,I can see my ethereum in etherscan.io 0x2ecc74c6e9c42eea14863fbc1e1d9656b339a6ec ...
0
votes
0answers
23 views

How to enable and use the accounting module?

I found the accounting module in this line and want to use them. i attached the accounting module to parameter --rpcapi accounting when run console node but could not found this module. run node: ....
0
votes
1answer
17 views

Tallying Majority Consensus From Nested Struct

How do I tally the votes of a nested struct to find out majority consensus? as an example, if we have following scenario below; I want to create a function which allows me to calculate whether ...
0
votes
1answer
25 views

What is the best combination of transactions to send to an Address for a given target amount?

Let's suppose I have 100 unlocked accounts with different balances and I want to have in a target account an amount X. Knowing that I have to make an individual transaction for every account, what ...
0
votes
0answers
29 views

What is meant by Ethereum instrumentation?

Some body please tell me what is meant by Ethereum instrumentation? I found this term in following two articles at: [EVM* From Offline Detection to Online Reinforcement for Ethereum Virtual Machine1 ...
1
vote
1answer
27 views

Connecting my Golang Backend server with Metamask

I'm trying to build a Ticket-Office project in one of my courses at the University. The project uses a backend server (which I'm writing in Golang) and it should be able to deploy and use smart ...
0
votes
1answer
29 views

Pushing A Struct Instance Into An Struct Array Of A Different Struct Mapping

How can I push a struct instance into a mapping which contains a distinct struct which contains a struct array of the attempted struct instance type? Example: contract NewBook { struct ...
0
votes
1answer
43 views

Mapping Multiple Struct Instances To One Address

How can I map multiple struct instances to one user without overriding the previous instance? I want to retrieve both instances through one mapping query. Should I use a multi-dimensional array here ...
0
votes
1answer
39 views

Incorrect Usage. flag provided but not defined: -emitcheckpoints

I'am trying to build this : PRIVATE_CONFIG=ignore nohup geth --datadir ./Node1/new- node-1 --nodiscover --verbosity 5 --networkid 31337 -- rpccorsdomain="*" --ws --wsorigins="*" --...
0
votes
0answers
21 views

How to attach a Logo to an ERC20 Token

I have created an ERC20 Token with MEW. However, when I send it to people who have different ERC20 wallets, the logo of my token is always Ethereum like How do I put my own logo on the token so that ...
1
vote
0answers
25 views

MAC OSX geth console error

I have installed Geth on my mac Mojave 10.14.3 by brew tap ethereum/ethereum and brew install ethereum Just the same as the instruction and everything goes well, but when I run geth console ...
3
votes
1answer
108 views

Is it possible to hard fork a private network to Constantinople?

I have a Proof-of-Authority private Ethereum network that has Byzantium EVM version and created by clique engine. I have a single miner that has Geth version: v1.8.27. { "config": { "chainId": ...
1
vote
1answer
34 views

Random Group Generation From Array

How can I form a random group of 5 people from an array of 100 people?
1
vote
0answers
36 views

syncing is never finish on geth fast

I have run geth --fast --cache=4000 for 8 days and I think I am almost complete: eth.syncing { currentBlock: 8123223, highestBlock: 8123315, knownStates: 309587058, pulledStates: ...
0
votes
0answers
11 views

geth: How to change the path to create `private` folder

In general, private folder used to created under the main directory now by default, on geth v1.8.27, it is created under the root directory and there is a already default /private folder on Mac. [Q] ...
1
vote
0answers
15 views

I want to make multi-node , not private network

I know how to make multi-node in private network, but I have a question how to make a multi-node with other machines. this picture shows independent two nodes, and you can see blank on admin.peers ...
4
votes
2answers
344 views

geth account creation Failed to enumerate USB devices

I'm trying to create a private Ethereum network on a Kubernetes cluster using ethereum/client-go docker image but getting bellow error while trying to create an account: ~/.ethereum # geth account ...
0
votes
2answers
23 views

Smart Contract Interfacing - Best Practices

what is a general rule of thumb for creating interfaces? Why would I want an interface i.e. IAugur.sol instead of the entire Augur.sol file? Can someone shed light on interface best practices and pros/...
1
vote
1answer
16 views

Find keyfile of an account

I have several accounts in my Geth wallet. I need to locate the keystore file of a given account but there doesn't seem to be any connection between the keystore file names and the accounts. How do I ...
0
votes
1answer
20 views

Commit-Reveal Sequence Design

Let's cook up a scenario to ease understanding: We have a group of 5 people (addresses) who must vote on a question. The people can only vote True or False i.e. a boolean. The result of the vote ...
0
votes
1answer
22 views

How to send a transaction with large data ethereum?

I am trying to send an array of object (tuple) to smart contract. function addManyUsers (User [] memory _users) public { for (uint i = 0; i < _users.length; i++) { bytes32 ...
1
vote
1answer
21 views

How can I make new account by JSON-RPC of Go

I'd like to make new account by JSON-RPC.I've checked the wiki of Ethereum, however I could not find out how to do that. I've found call existed accounts, but it isn't what I want. eth_accounts ...
0
votes
0answers
11 views

Can anybody help me with protocol development?

I have seen a lot of resources for dApp development but I don't know how to start learning more about protocol development. I have read whitepapers, some articles and started reading go-ethereum's ...
0
votes
0answers
11 views

Question about BFT-based consensus mechanism

Besides PoA,PoW, I found BFT-based consensus algorithms are also widely used. what's its main advantage of them compared to clique PoA which also require no extensive computation as PoW? What's ...
0
votes
0answers
16 views

web3j - getter for array of addresses

I have a contract which has a field registry which is an array of addresses, Also have a getter for this field: function getRegistry() view public returns (address[] memory){ return ...
0
votes
1answer
43 views

explanation of appending .selector in solidity smart contracts

I'm trying to understand what .selector means when appended to logic wrapped up inside of functions definitions. I've tried to read the section in soliditydocs, but it doesn't seem to answer my ...
0
votes
0answers
29 views

Geth returning balance 0 [duplicate]

I started my geth using fast sync first and then normal sync once it was almost synced. 'currentBlock' is not increasing since hour and 'highestBlock' keep on increasing. geth --testnet --rpc --cache=...