I have two nodes connected to the main net. On one I run geth 1.8.27, on the other geth 1.9.1. When I try to get the code of a smart contract, geth 1.9.1 will not return any code.


Version: 1.8.27-stable:

> eth.getCode("0x7717eFE25b65c8c0fcb97A170B086C17b025A1e1")


Version: 1.9.1-stable:

> eth.getCode("0x7717eFE25b65c8c0fcb97A170B086C17b025A1e1")

Any ideas why this is happening or what I could try to fix it?

Edit: maybe worth mentioning that the 1.8.27 node has been running for months while the 1.9.1 has been running for 2 days. Might this be a matter of synchronization? The blocks are fully synced on both.

Version: 1.8.27-stable:

 > eth.syncing

Version: 1.9.1-stable:

 > eth.syncing
  currentBlock: 8257358,
  highestBlock: 8257442,
  knownStates: 262464985,
  pulledStates: 262458955,
  startingBlock: 0
  • 3
    The problem is that you are not fully synced. The current number of states is more than 300M (mainnet) and the contract code is part of the state sync. – alberto Jul 31 '19 at 9:00
  • understood, thank you! – Nik Jul 31 '19 at 9:06

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.