Questions tagged [go-ethereum]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
21 views

How to programmatically check the type of Ethereum node/backend that I'm connected to using Go?

I'm aware that I can do this using CURL like so: curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' https://the-node-ip-...
0
votes
1answer
21 views

Problems syncing small private net consisting of 2 PC miner nodes and 3 Raspberry Pi nodes

I've read countless posts referencing some form of "Synchronisation failed, dropping peer err='retrieved hash chain is invalid'" and of the few that had solutions, none of them worked for me. I ...
0
votes
1answer
36 views

How to get notification right after account has received eth by geth?

My server stores many accounts. How do i know when and what account has received eth or i have to check them manually one by one by looping many address to check the balance? account := common....
2
votes
1answer
100 views

Solidity Error Address / Address Payable

I'm currently learning solidity programming to create a basic smart contract based on a 2018 tutorial where solidity was using version 4. I'm currently using truffle v5.0.21. I understand that there ...
1
vote
1answer
45 views

web3 unlock account error

I have two geth nodes, each has an account: node1(IP:192.168.43.12): account1 node2(IP:192.168.43.39): account2 the two accounts are created using geth --datadir /root/chain/node1/data account new, ...
1
vote
2answers
51 views

Storage/Retrieval of mapped structure data

I want to store the structure data in a mapping i.e. if I have a student structure as described below, then I should be able to have a myriad of students and distinguish between them using wallet ...
0
votes
1answer
22 views

connecting geth to web3.go 1.0 via websockets or HTTP

Is there anyThing similar to web3.js written in go that allows me to communicate with the geth client ?
0
votes
1answer
54 views

How to test the fuctionality of a Bittrex-related smart contract?

I've got my hands on a smart contract related to the Bittrex exchange. I would like to deploy this smart contract to test the functionality but I don't know how to call the functions properly. My ...
4
votes
2answers
253 views

Offchain vs Sidechain vs StateChannel

What are the main differences between off-chain, sidechain and state channel? And what are the use-cases of all of these?
0
votes
0answers
15 views

Interoperability between different DLT/Blockchain

I read about Polkadot, Ion, Komodo, POA and many others projects. But my question is: are there any project to provide interoperability between public Ethereum and other blockchain/DLTs already ...
3
votes
1answer
19 views

Cipher Suites - open source?

Some time ago, a vulnerability was discovered in IOTA because the team implemented the cipher algorithm by themselves instead of using open source (more tested) implementation. I can conclude Ethereum ...
2
votes
1answer
58 views

Errors in when compiling the BLS signature in remix?

Etherum can verify BLS signatures, In this answer Does Ethereum support pairing operations? There is an example of how to verify BLS in solidity. However, when I tried to test the code in remix, ...
1
vote
1answer
72 views

How to measure size of stored data in the blockchain?

I know that remix can measure the execution cost and transaction cost. I want to measure the storage overhead ( Size of data in Bytes) on creating a contract on the etherum blockchain or calling a ...
0
votes
1answer
19 views

Is there any way to hide or encryt input data that sent to smartcontract? [duplicate]

After a While working with ethereum, I felt ethereum is not only public and also naked because whatever input data that we sent to contract function, it is visible to everyone when looked into the ...
0
votes
1answer
38 views

extract address of used library

Is there anyway or method to extract the address of a linked library from the contract bytecode (not a verified contract code) or deployment transaction? my question is about step 3: step 1. ...
0
votes
2answers
29 views

condition check of struct mapping in solidity?

struct User { string username; string password; address userid; bool isAdmin; } mapping (uint => User) users; function checkIfUserExists(address userid) public ...
0
votes
2answers
64 views

how to get contract address after its been mined with web3.js

I have tried to deploy a SmartContract from web3.js node library, I am getting a transaction hash from it but how would I get the contract address after It's been mined by a miner? here is my code ...
3
votes
2answers
164 views

Verifying Modular exponentiation operation in etherum

I have Alice who should do some cryptographic operations off-chain. Then a smart contact has to verify equality by performing Modular exponentiation operation. I attached an image of the off-chain ...
1
vote
1answer
78 views

Updating ERC20 Contract from 0.4.0 to 0.6.0

Im updating some ERC20 contact code from solidity 0.4.0 to 0.6.0 and hitting some snags as it seems openzeppeling has changed its structure since then as can be expected. I cant access the balances ...
1
vote
0answers
33 views

Extra mining fees added in etherbase account

1st scenario - I have set miner.setEtherbase(eth.accounts[1]) and gasPrize is 0. 1 coin Transaction - And done transaction from 0th account to one random account. I expect 0 mining fees will add ...
1
vote
1answer
40 views

How to access Parity node's mempool with web3.py?

I'm running a Parity node with parity --jsonrpc-api all, then connecting to it in python3 with w3 = web3.Web3(web3.HTTPProvider('http://localhost:8545')). I can call print(w3.eth.getBlock('latest'))...
0
votes
0answers
35 views

React + Ethereum + Solidity. Private Blockchain ether mining issue?

I'm making an app using react, ethereum and solidity. I'm signing up the user using.. web3.eth.personal.newAccount(); Then all users need to do certain tasks on app. They need to do certain ...
0
votes
1answer
44 views

Block signer address question

I set up a private clique POA chain with 3 nodes, all of them are sealers. I launch two nodes only, the blocks can be signed by the two nodes. when I call clique.getSignersAtHash('block hash value'),...
0
votes
1answer
73 views

geth never completes syncing for rinkeby

My aim is to synchronise a full node for the Rinkeby network. It seems that geth does not finish synchronisation. I have had it run for over three days, but it is stuck at the last few blocks. > ...
0
votes
1answer
79 views

miner.start() is not a function?

"web3": "^1.0.0-beta.37" "web3": "^1.0.0-beta.55" import {Miner} from 'web3-eth-miner'; then const options = { defaultAccount: "0x78dB3e2129D58685444989dD9682DDDC70dd3C82", ...
0
votes
0answers
21 views

What's the block header's difference between POW and POA chain?

I want to simulate the processing procedure, from block generation to header verification, on private POA chain, and look into the variables during process. What nodejs modules can be used(not ...
0
votes
1answer
43 views

which port I use when I want to connect remix to my local quorum network?

I want to deploy a smart contract on my local network. I executed a local node via PRIVATE_CONFIG=ignore nohup geth --datadir ./Node1/new- node-1 --nodiscover --verbosity 5 --networkid ...
0
votes
0answers
30 views

What way there is to implement a new signing scheme in Ethereum?

I want to deploy a new signing scheme for the Ethereum transactions as an alternative to the currently implemented ECDSA. This will be for future research purposes on post-quantum signing schemes. The ...
0
votes
1answer
36 views

getTransactionCount return different response

geth version 1.8.27 The pending nonce is 8 at first, then I send a transaction and use eth.getTransactionCount to get the next pending nonce. > eth.getTransactionCount("...
0
votes
2answers
59 views

Public key validation through private key

What is a good way to validate that the public key claimed to belong to a particular user really belongs to him without revealing the associated private key? Can this be done with zero-knowledge ...
0
votes
0answers
45 views

Solc complier error “TypeError: Cannot read property 'TestToken.sol' of undefined”

I set up a contract with three files referring to Token Factory. I make a test on remix online tool, they can be successfully compiled. when I'm tring to compile them by solc module in a .js file, ...
1
vote
1answer
88 views

Sending a raw transaction

I'm trying to send ether from one address to another. I have a valid generated address and a private key for that. I have a node is working on Linux in fullmode and RPC server listening on the default ...
0
votes
1answer
17 views

How to specify nonce value of ERC token transfer?

I use the code lines below to set nonce and transfer ERC20 token from account to another: var count = await web3.eth.getTransactionCount(myAddress); await contract.methods.transfer(destAddress,amount)...
0
votes
1answer
45 views

web3 call contract function problem

I use latest version stable geth: [root@localhost ~]# geth version WARN [05-30|06:27:22.750] Sanitizing cache to Go's GC limits provided=1024 updated=612 Geth Version: 1.8.27-stable Git Commit: ...
0
votes
1answer
24 views

Initialize an array of struct within a struct

I am working on a use case of "Purchase Order" wherein there will be multiple Products listed/ordered under one Purchase Order(PO) by a buyer. 1 PO : N Products struct Product{ bytes32 ...
1
vote
0answers
45 views

My wallet got hacked - I do not know what do to

Someone hacked my eth wallet and when ever I deposit ethereum to the wallet my deposited ethereum is sent directly to his wallet automatically.. Pls how can I stop this issue because my wallet has my ...
3
votes
1answer
82 views

How to get an evm reference inside go-ethereum GetBalance function?

In order to modify GetBalance function to fork go-ethereum, I find difficulties to get a reference of the running evm. The function has a reference for self *StateDB: func (self *StateDB) GetBalance(...
0
votes
0answers
18 views

How include Nethereum in an existing C# project as library

I try to include nethereum as a library in my C# project, so I have access to the appropriate functions (create transaction data, sign transaction data and so on...) for communicate to an arbitrary ...
1
vote
0answers
25 views

Can I run a javascript file using geth attach?

I want to automatize one thing. Aftert installing the Quorum nodes, I have to run: docker exec -it quorum_node1_1 geth attach /qdata/dd/geth.ipc Then I am pasting the JS code But I want to ...
1
vote
1answer
40 views

Database version problem

I found geth built from the latest master branch(git clone https://github.com/ethereum/go-ethereum.git) uses new database version different from Geth & Tools 1.8.27(latest stable excutable version ...
0
votes
0answers
27 views

It is an error to execute ERC20 contract token using ganache / go-ethereum

I use go-ethereum.Error: nonce generation function failed or private key is invalid [Execution environment] ・node:11.6.0-alpine ・ganache-cli@6.3.0 Please tell the person who understands the cause. ...
0
votes
1answer
49 views

What is the difference between create and newAccount in web3js?

There are two ways to create account one is web3.eth.accounts.create() and web3.eth.personal.newAccount(); function, When I use newAccount() function account is created in my local geth client but ...
1
vote
1answer
47 views

How create transaction raw data for using “eth_sendRawTransaction” in C#

My IoT device connects to another computer via Wi-Fi on which Ethereum (Truffle/Ganache) is running which receive a RPC from the IoT. My task is to create raw transaction data on this IoT Device, so ...
0
votes
0answers
26 views

How to handle password for unlock Account in web3?

In web3 there is function web3.eth.personal.unlockAccount(address [, callback]) to unlock the account so whenever we call the smart contract function we need to unlock the account in geth client ...
0
votes
1answer
53 views

Gas limit and transaction fee in clique POA chain

I set a private POA private chain using default setting of Puppeth tool. The gaslimit in genesis.json is: "gasLimit": "0x47b760" The decimal number of gasLimit is 4700000 then I start node by ...
0
votes
0answers
20 views

invalid genesis file: invalid character ',' after object key

I am trying to created ethereum private network. platform - Windows , geth 1.8.27-stable I created C:\myeth\genesis.json. genesis.json { "config": { "chainId": 0, "...
0
votes
1answer
37 views

How to modify geth node configuration after launch

Is it possible to modify geth configuration when the node is running? For instance, open a port, add more parameter flag to control geth node functions. I think maybe there are two ways: One is stop ...
0
votes
0answers
20 views

How to handle floating point number in Solidity? [duplicate]

I read that there is no support for floating point number in solidity, So how we can handle it. If I want to store 12.23 or something like that.
0
votes
0answers
13 views

Testing a Smart Contract on two different devices at the same time

So the goal is to have two computers each owning one account or just different addresses on MetaMask for example and connecting them to the same Smart Contract that is deployed on Rinkeby. Now how ...
0
votes
0answers
22 views

how much structure variable does solidity support? [duplicate]

Error: "UnimplementedFeatureError: Variable inaccessible, too deep inside stack" code: contract create{ struct s{ string s1; string s2; string s3; string s4; ...