1
 geth version : 1.9.0-stable-52f24617,
 node version : v10.16.3,
 npm version  : 6.9.0,
 web3 version : -- [email protected].

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

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

1 Answer 1

1

I changed genesis.json now it is working

{
"config": {
"chainId": 9663080,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"ethash": {}
},
"nonce": "0x0",
"timestamp": "0x5d5cdc87",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x80000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0x0000000000000000000000000000000000000000": {
  "balance": "0x1"
},
"0x0000000000000000000000000000000000000001": {
  "balance": "0x1"
},
"0x0000000000000000000000000000000000000002": {
  "balance": "0x1"
},
"0x0000000000000000000000000000000000000003": {
  "balance": "0x1"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": 
"0x0000000000000000000000000000000000000000000000000000000000000000"
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.