1

I am trying to find a deployed contract via my fully synchronized local node, but I can't find it. it turns out that I can't find any contract in fact. I tried running eth.getcode("0x0eD7e52944161450477ee417DE9Cd3a859b14fD0") and it returns "0x" which means that there is no contract attached to that address.

that example is easily found on the BSC eth scanner
my eth.syncing result cleary show that the node is practically synchronized :

{
  currentBlock: 7465077,
  highestBlock: 7465150,
  knownStates: 168515734,
  pulledStates: 168475588,
  startingBlock: 7463977
}

what could be the problem ?

i am running the official config from the bsc tutorial

1 Answer 1

1

Your node is simply not synchronized. You have downloaded most blocks, but you are still not up-to-date on the states. This stage could take days to finish synchronizing.

eth.syncing should return false. If it does not, you are not synchronized and calling contracts will not work.

4
  • but the states are nearly identical, and the block too. this contract is part of a very old block compared to the current ones. shouldn't it be okay to call it? i think it is. May 16, 2021 at 18:31
  • 1
    New states are created at every block and your node does not yet know how many states there are in total, so the number that you see is meaningless. Blocks have been downloaded, but this is just the first stage of the sync. I don't think that you can call contracts until it is fully sync as far as I know.
    – Undead8
    May 17, 2021 at 0:29
  • it has been some days now and i honestly can't see it finishing at all. i am always behind 40k states and 150ish blocks. is there a real number for the states that i can check to know if i have to get better hardware to accelerate the state verification? bscscan only gives the block number. May 17, 2021 at 20:14
  • 1
    You can't know the total state number because it is specific to your node (the number of states are removed and added continuously and vary from node to node). All you can do is wait some more, and if it never syncs, you probably need better hardware.
    – Undead8
    May 17, 2021 at 20:30

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.