1
 geth version : 1.9.0-stable-52f24617,
 node version : v10.16.3,
 npm version  : 6.9.0,
 web3 version : -- web3@1.0.0-beta.36.

genesis.json:

{
"config": {
"chainId": 9663080,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"Ethash": {
  "period": 15,
  "epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x5d5769ad",
"gasLimit": "0x7FFFFFFFFFFFF",
"difficulty": "0x1",
"mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
"alloc": {
"0x02731Eb61f258C104F1BB4191cF715d8D1014CD3": {
  "balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
 },
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
  1. In geth deployment of the smart contract is working, while calling functionalities I am facing some issues.

2.both web3 code and solidity codes are working in public ethereum but the same codes are not working in private network(geth).

  1. Is there any problem with my geth or genesis.json.

Web3js error:

    Error: Returned values aren't valid, did it run Out of Gas?
at ABICoder.decodeParameters (/home/nithin/project/ConnectedVehicles/node_modules/web3-eth-abi/src/index.js:226:15)
at Contract._decodeMethodReturn (/home/nithin/project/ConnectedVehicles/node_modules/web3-eth-contract/src/index.js:465:22)
at Method.outputFormatter (/home/nithin/project/ConnectedVehicles/node_modules/web3-eth-contract/src/index.js:818:46)
at Method.formatOutput (/home/nithin/project/ConnectedVehicles/node_modules/web3-core-method/src/index.js:163:54)
at sendTxCallback (/home/nithin/project/ConnectedVehicles/node_modules/web3-core-method/src/index.js:473:33)
at /home/nithin/project/ConnectedVehicles/node_modules/web3-core-requestmanager/src/index.js:147:9
at XMLHttpRequest.request.onreadystatechange (/home/nithin/project/ConnectedVehicles/node_modules/web3-providers-http/src/index.js:91:13)
at XMLHttpRequestEventTarget.dispatchEvent (/home/nithin/project/ConnectedVehicles/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
at XMLHttpRequest._setReadyState (/home/nithin/project/ConnectedVehicles/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
at XMLHttpRequest._onHttpResponseEnd (/home/nithin/project/ConnectedVehicles/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
at IncomingMessage.<anonymous> (/home/nithin/project/ConnectedVehicles/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)

I connected to the private(geth) from the remix and I deployed the smart contract and(1) while calling functionality data is not coming. and (2)in the hash column, it is showing call+transaction hash

remix status bar

  • can you add the error – Sanjay S B Jul 29 at 12:06
  • Which version of web3 and node are you using ? – Samuel Dare Jul 29 at 15:27
  • Try Downgrading node. There are a lot of bugs/ compatibility issues with node 12z – Samuel Dare Aug 5 at 7:29
  • does it work if you deploy it on ganache private network? – haxerl Aug 13 at 12:44
  • @haxerl yes, It is working in ganache-cli – Nithin TD Aug 16 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.