1

I decided to run my own ethereum/bsc fullnode. I downloaded geth-linux-amd64-1.1.0 and ran it like this: geth --syncmode "full" --http --http.port 8545 --http.corsdomain "*" --http.addr "127.0.0.1" --http.api "admin,debug,web3,eth,txpool,personal,ethash,miner,net" --cache 18000 --maxpeers 500 --datadir /someplace

geth attach and eth.syncing shows me

{ currentBlock: 9606766, highestBlock: 9606883, knownStates: 345833179, pulledStates: 345782057, startingBlock: 9604320 }

So i guess i'm synced. However, when i run w3.eth.getBalance(some_address), it returns 0. When i use Metamask or infura, i get a different value.

I'm also unable to interact with tether on ethereum (or any other token):

ERC20_ABI = [..] tether_contract = w3.eth.contract('0xdAC17F958D2ee523a2206206994597C13D831ec7', abi=ERC20_ABI) tether_contract.functions.balanceOf(that_address).call()

Result:

Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/web3/contract.py", line 1513, in call_contract_function
        output_data = web3.codec.decode_abi(output_types, return_data)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/codec.py", line 181, in decode_abi
        return decoder(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 127, in __call__
        return self.decode(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_utils/functional.py", line 45, in inner
        return callback(fn(*args, **kwargs))
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 173, in decode
        yield decoder(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 127, in __call__
        return self.decode(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 142, in decode
        start_pos = decode_uint_256(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 127, in __call__
        return self.decode(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 198, in decode
        raw_data = self.read_data_from_stream(stream)
      File "/usr/local/lib/python3.8/dist-packages/eth_abi/decoding.py", line 305, in read_data_from_stream
        raise InsufficientDataBytes(
    eth_abi.exceptions.InsufficientDataBytes: Tried to read 32 bytes.  Only got 0 bytes
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.8/dist-packages/web3/contract.py", line 957, in call
        return call_contract_function(
      File "/usr/local/lib/python3.8/dist-packages/web3/contract.py", line 1530, in call_contract_function
        raise BadFunctionCallOutput(msg) from e
    web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?

What am I doing wrong?

It's always ~64 block behind the network for a long time. (even with NVMe)

TylerH
  • 20,799
  • 66
  • 75
  • 101
spmzt
  • 86
  • 7

1 Answers1

1

{ currentBlock: 9606766, highestBlock: 9606883, knownStates: 345833179, pulledStates: 345782057, startingBlock: 9604320 }

So i guess i'm synced

Actually, this means your node is still syncing, eth_syncing will return an empty result when it is over.

https://eth.wiki/json-rpc/API#eth_syncing

An object with sync status data or FALSE, when not syncing

regcostajr
  • 170
  • 2