Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
1answer
27 views

Soldity RNG threat comparison between Tron and Ethereum

Would a function such as the following: function random(bytes32 seed) internal returns (uint) { nonce++; return uint(keccak256(abi.encodePacked(now, msg.sender.balance, nonce, block.coinbase, ...
4
votes
1answer
776 views

Error: account unlock with HTTP access is forbidden when unlock an account in Geth console

personal.unlockAccount(eth.accounts[0],"") Error: account unlock with HTTP access is forbidden I run Geth in a Docker container and use docker exec -it bootstrap geth --datadir=~/.ethereum/...
0
votes
0answers
14 views

When enabling Clique consensus, I get status 0x0 Transaction mined but execution failed

When enabling Clique consensus and try to deploy a contract using Remix, I obtain this error; status: 0x0 Transaction mined but execution failed Any idea? FYI, I am creating a private network ...
3
votes
0answers
83 views

VM revert on Scalar Multiplication in pre-compiled contracts

I tried to build a wrapper around the precompiled contracts as follows: https://gist.github.com/AlexXiong97/9c24bbd4541323a61fa63100860a5f89 If you paste it into Remix and deploy it, inputting any (...
0
votes
0answers
24 views

Can't catchup with Mainnet

16GB Linux, 512 GB SSD, mainly started for RPC purposes only. No mining activity. geth --datadir ./data --syncmode fast console --rpc --rpcport 8545 --rpcaddr "0.0.0.0" --rpccorsdomain "*" --rpcapi "...
1
vote
0answers
24 views

How to sign transactions offline via geth for a specific chain?

Is there a way to sign a transaction to be accepted on a specific chain? In other words, if I want to sign an offline transaction via geth, say 0.5 eth from external address A to external address B, ...
0
votes
0answers
28 views

Geth: admin.peers is empty array (another one!)

I have initialized two nodes on my local machine (Mac OSX) using the same genesis.json file. Node 1 started with: geth --datadir $ethereum_home/test --nodiscover --networkid 1234 --rpc --rpcaddr "...
0
votes
0answers
14 views

in what file and location using the algorithm Keccak1600 when checking the hash of the blockchain

help to find a file in Geth for ETH mining? https://github.com/ethereum/go-ethereum 1.In which places (go files) Sha-3 header is checked during mining. 2.in what file and location using the algorithm ...
0
votes
1answer
61 views

deploying simple contract on quorum 7nodes example

I am trying to deploy contract with privateFor tag in migration and for set function same as shown in truffle quorum 7node example. started nodes with these commands ./raft-init.sh ./raft-start.sh ...
0
votes
1answer
22 views

Find word in string solidity

How is it possible to look for if a certain word is part of a string in solidity? let's say someone upload a string to a smart contract, this string must contain the word "solidity" to be accepted by ...
1
vote
1answer
10 views

How do I list the running nodes with geth?

Is there a way to list the all nodes on my computer with geth command line, and maybe even see some status for them? (I'm new to go-ethereum, apologies if this is a noob question, but I cannot quite ...
0
votes
0answers
30 views

How to send a value from interface to smart contract function

I have the below contract to create document details: pragma solidity ^0.5.0; contract Documents { struct Document { uint256 creationDate; uint32 documentCreationTimestamp; ...
0
votes
0answers
12 views

Is there an RPC command to get the block header (or just the hash) directly from a light client?

I'm not sure if this is possible, but I would like to use a geth light client to make sure that my parity node is on the same chain as geth (in case one of the two implementations introduces a bug ...
0
votes
0answers
11 views

Quorum Geth block chain data uses multiple files for storing chain data or only one file(000002.ldb ) whatever is chain size

If blockchain size grows, does quorum adds more files to /geth/chaindata/ folder or number of files remain same. If i have to check the size of etherum/geth folder, can i enumerate all files and get ...
0
votes
1answer
19 views

RPC 's SendRawTransaction(increased nonce) many times ,only the first transaction in block

I am using infura node (rinkeby), php. There are 3 transactions I signed with custom nonce (like the solution here) then broadcasted them by sendRawTransaction and succeeded. After above I get 3 ...
0
votes
1answer
20 views

Use Ledger Wallet as etherbase for mining on private network

I would like to use my ledger as the wallet that will validate blocks on a private network with a geth client. I can have access to my ledger account from geth. But i can't start the mining process. ...
0
votes
0answers
27 views

Unable to Synchronize raspberry pi node my private network

I have created a private network with 3 nodes - two nodes in computer and one in raspberry pi I connected computer and raspberry pi to same network through LAN computer ip: 192.168.122.1 pi ip ...
0
votes
1answer
39 views

Reading genesis config on GoLang

In a custom fork of Ethereum my team is developing, we need to read a new config parameter from genesis block. At https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/runner.go#L100 the code ...
0
votes
0answers
13 views

Unable to unlock an account in my private network

I created two nodes node1 node2 and created two accounts for each node, one being the coinbase I have created a runnable script to start my nodes like startnode1.sh with the following commands geth -...
0
votes
0answers
17 views

How to backup and restore txpool data?

I'm using Geth to create a PoA Clique based private blockchain. I'm currently facing this problem and I'm looking for ways to backup and restore txpool data. From the problematic node, this is my ...
0
votes
0answers
25 views

Getting error when calling smart contract: 'abi: unmarshalling empty output'

Calling a method of a smart contract sometimes returns error 'abi: unmarshalling empty output' Has anyone run into same issue ?
0
votes
0answers
30 views

Problem sync test network

I have problems with networkid 3 (testnet). I installed Geth/v1.8.23-stable-c9427004/windows-amd64/go1.11.5 and run geth --networkid 3 --ipcdisable --maxpeers=25 --syncmode "light" --rpccorsdomain * -...
0
votes
0answers
34 views

Can read from smart contract but can't write

I have a app.js script that I am trying to use to interact with a smart contract. I can read from the contract however, I cannot write to it. The called method countMessages() returns the correct ...
0
votes
1answer
33 views

Automatically Run Contract

I have a private ethereum network made up of multiple nodes and I would like one of them to interact with the a deployed smart contract without my input. Is it possible for create a script that will ...
0
votes
0answers
22 views

IPFS - file stored by all users

Suppose one or many users used my fully decentralized app to store different files on IPFS. How can I keep track of all file hashes by using smart contracts?
-1
votes
1answer
30 views

Fully Decentralized Dapp [duplicate]

How can I build a fully decentralized dapp where the frontend code (.html,.css,.js) and ABI files (build/contracts/json) are stored in ipfs and contracts on test-network. But I am unable to do so ...
0
votes
0answers
27 views

NuCypher for storing file securely on IPFS

Please someone guide me how I can use NuCypher Algo for storing a file on IPFS such that only a set of people can open its ipfs-hash link. Can you tell the implementation because I am finding it ...
1
vote
0answers
98 views

Smart contract method error: 'abi: unmarshalling empty output'

I had a working Solidity contract, made a change to its function signature (to take in an array of addresses, instead of a single address), I compiled it, ran abigen and generated Go bindings. Below ...
2
votes
1answer
51 views

function input conditional check

I have a function which is accepting a string argument as input parameter. This string is an IPFS hash and I would like to check that the input is actually just that and not a malicious link or the ...
0
votes
0answers
7 views

Instance of sol file in browser

How do I get the instance of sol in browser using js. In React it happens like: import SimpleStorageContract from '../build/contracts/SimpleStorage.json' const simpleStorage = contract(...
0
votes
3answers
47 views

Limit the number of times a static function is called

As far as I am concerned, when a function in a smart contract is defined as pure or view it is possible to invoke it without being charged for the gas consumption that its execution requires. This ...
0
votes
0answers
8 views

Why all stateObjects are merged to the state trie in *StateDB.Finalise function?

In *StateDB.Finalise function, why stateObjectsDirty flags of stateObjects are not reset after merging to the state trie? This leads to handling all stateObjects including some stateObjects not ...
0
votes
0answers
20 views

Send Data into BlockChain Network using w3?

HI I want to store my bank information on ethereum network using w3. can anyone help me to send my data //Bank.sol pragma solidity >=0.4.21 <0.6.0; contract Bank { struct User {...
0
votes
1answer
34 views

EIP155. How chainId works?

I know signed transaction got v=37. now I am wondering how 'v=37' is used to check that the transaction is right one. nodes check v of every transaction they received?
0
votes
1answer
99 views

ethereumjs-wallet/hdkey is no more in npm

how to generate multiple addresses from single mnemonic? var hdkey = require("ethereumjs-wallet/hdkey") var bip39 = require("bip39"); // You can generate a mnemonic seed with bip39 library var ...
0
votes
1answer
23 views

Geth Node doesn't revert a transaction not satisfying a require

i'm testing my smart contract on remix with local ganache cli, when i try to test case that doesn't satisfy a require on the SC i correctly receive message "transact to Contract.function errored: VM ...
0
votes
0answers
79 views

Transaction receipt is always null in getTransactionReceipt in geth

Following is a promise that i use for getting transaction receipt: function getTransactionReceiptMined(web3Instance, txHash, interval) { const self = this; const transactionReceiptAsync = ...
0
votes
0answers
27 views

Why does my private network transaction use a different amount of gas than my mainnet transaction performed immediately after?

I am forking the mainnet from my own geth node with ganache-cli --fork option. Immediately after the fork, I simulate a transaction to a contract on the forked, private network. I then immediately ...
1
vote
2answers
199 views

Uploading files on IPFS Infura

I am trying to make a dapp to upload files on IPFS Infura. I am using IpfsHttpClient in web browser by including the script <script src="https://unpkg.com/ipfs-http-client/dist/index.min.js">&...
3
votes
0answers
27 views

Block Timestamps vs. Received Timestamp

I've been logging local timestamps when I receive blocks on two separate geth nodes to see which (if any) is consistently faster. But I just stumbled across something that I don't understand - in my ...
0
votes
0answers
50 views

IPFS dapp hosting

I have uploaded the dapp frontend folder along with contracts json files on the IPFS using ipfs add <path> ipfs name publish <hash> commands. I am running Ganache for in-memory virtual ...
2
votes
1answer
33 views

How can you deploy a contract using the non-interactive mode?

I have a contract written in remix, but I am trying to deploy it using Geth's non-interactive mode using geth attach ipc:<path> -exec "<contract deploy info>". When I am in interactive ...
0
votes
1answer
21 views

Monitor transactions on private chain

I have a consortium chain (I have access to all machines where the nodes are running, but can't stop or restart them), and want to monitor what's happening on a high level. Similar to what ganache ...
1
vote
1answer
57 views

state variable value not changing

I have very simple solidity code as below - pragma solidity ^0.5.6; contract SaveData { uint public salary; function setSalary(uint input) public { salary=input; } function ...
0
votes
1answer
47 views

Can't return string when function not pure? [duplicate]

See the below contract function of which return the string (Tested in Remix.org): pragma solidity >=0.4.22 <0.6.0; contract HelloWorld { function get() pure public returns (string memory){ ...
2
votes
1answer
79 views

Calling contract method internally from geth code

On developing a custom geth fork there is the need to call a specific hardcoded smart contract when ETH transfer occur. This is not an Ethereum normal behaviour but a new feature we want to implement ...
0
votes
0answers
19 views

Error while connecting from Remix via rpc to local blockchain

geth --datadir ./accnt1 --port 30306 --networkid 2018 --rpc --rpcport 8545 --rpccorsdomain=”*” --nodiscover --rpcapi “db,personal,eth,net,web3,debug” --rpcaddr="127.0.0.1" --rpcport 8545 console ...
1
vote
1answer
37 views

what is the role of merkle tree in ethereum? [duplicate]

I know the functionality of merkle tree, it makes a root hash from a group of data.My question is how merkle tree is act in ethereum blockchain,precisesly in the place of transaction hash,block hash,...
1
vote
1answer
79 views

Wrapping Cryptocurrencies for interoperability sake

How is it possible to standardize bitcoin and wrap it to the ERC20 format, creating smart contracts for Bitcoin. This should make it easier to write smart contracts that integrate bitcoin transfers ...
0
votes
1answer
158 views

Deploying and calling a contract works only with Ganache (not with Geth)

I deployed a HelloWorld contract using web3j and it worked awesome with Ganache. I was able to call my only function from the contract and it returns the desired result all the time. When I deploy ...