geth --testnet --syncmode=light) doesn't sync well, the error it gives me is
Synchronisation failed, dropping peer peer=ab04dbb7a5762182 err="retrieved ancestor is invalid".
geth --testnet removedb
Geth version = 1.8.19-unstable O.S = Ubuntu 16.04.5 LTS Disk = SSD 250GB RAM = 10GB CPU = Intel Core i5-3320m
I am implementing a light client for Ethereum and I cannot find any way to call smart contract method via LES protocol. For example I need to call "balanceOf" for ERC20 token. RPC provides "eth_call" api for this and I can get balance of ERC20 token using it.
LES protocol on the other hand does not provide any way to call smart contract methods.
I was able to get balance of some ERC20 tokens by requesting storage value, but every ERC20 token has different storage key, and moreover, some ERC20 tokens even redirect to another contract when "balanceOf" method is called.
Shortly, I need an alternative for "eth_call" RPC method for light client (LES protocol)
@fjl thank you for your reply. The idea is quite interesting and challenging.
We are developing iOS and Android light clients for Ethereum network, and use swift and kotlin accordingly. Are there any implementations of EVM on these languages?
And on more point. Am I right that in order to call some contract I need to: