I've been running a geth light client to deploy smart contracts through Truffle Migrations to mainnet. I'm getting: "Error: No trusted canonical hash trie".
Any help in what this entails and how to resolve it?
I've been running a geth light client to deploy smart contracts through Truffle Migrations to mainnet. I'm getting: "Error: No trusted canonical hash trie".
Any help in what this entails and how to resolve it?
When starting geth make sure to have --syncmode "fast" rather than --syncmode "light" .
Since a light client doesn't hold full database, it needs to have a canonical hash to validate a newly received block.
If the node is pruned (or new), it needs to download block bodies and receipts on demand through an ODR interface, then make sure it's covered by a local checkpoint.
Basically it means your node needs to find peers to download data from, with time it should find some and proceed, unless there's a connectivity issue.
Can see the condition that produces this error here.
The error message "No trusted canonical hash trie" usually indicates that the Ethereum client you are using (in your case Geth light client) has not fully synchronized with the Ethereum blockchain.
To resolve the issue, you can try the following steps:
It's important to note that running a light client may not always be sufficient for deploying smart contracts to the Ethereum mainnet, as light clients have limited capabilities compared to full nodes.
For light clients and maybe more so for super light clients which don't have the state local a get_proof() RPC call will be needed for these use cases. There is some work being done here: ethereum/EIPs#1186