Hello, I am having trouble connecting brownie to my local node. Although it seems to be connected, when I try to fetch a contract from the explorer it tells me there is no contract found...
ContractNotFound: No contract deployed at 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
This is the WETH contract. Works fine when I use infura. One thing to note, my consensus node is still syncing, but the execution node says it is synced.
This happens when your local node is not fully synced, because Brownie sends a `get_code` request via web3py to your endpoint.
I'd like you to check the geth status using `geth attach` or the docker equivalent `docker exec -it geth attach` and checking the result of command `eth.syncing` - if geth is in sync, it will return `false`
Another simple check is running `chain.height` after connecting directly to your node with Brownie. It should match the current Ethereum height which you can check via Etherscan or Infura.
If geth is reporting that you're in sync but Brownie is not finding the contract code, I'd suspect that you're connected to the wrong endpoint. Is that confirmed OK?
After running `geth attach` and then `eth.syncing`, this is the output:
> eth.syncing
{
currentBlock: 17075750,
healedBytecodeBytes: 0,
healedBytecodes: 0,
healedTrienodeBytes: 0,
healedTrienodes: 0,
healingBytecode: 0,
healingTrienodes: 0,
highestBlock: 17075815,
startingBlock: 0,
syncedAccountBytes: 73520478,
syncedAccounts: 468775,
syncedBytecodeBytes: 20440752,
syncedBytecodes: 7553,
syncedStorage: 1064943,
syncedStorageBytes: 227676717
}
The Prysm consensus is definitely still syncing, so I'll probably just wait until that is done. But running ` % curl http://localhost:3500/eth/v1/node/syncing` returns:
Well, it looks like it is fully synced, but I still get the "No contract deployed" error. I am not sure I have the network settings correct in brownie. I have tried many methods I found via google. One method had me try to fork the local node?
I found the project and documentation at eth-docker.net to be super useful here for running an ETH2 node using docker. After struggling with trying to get independent docker images running for geth and lighthouse - and trying to run directly on Ubuntu through native ppm resources - I found this all-in-one solution works incredibly well. Well documented. Comes with Grafana built in for monitoring performance and sync.
Just don't forget to move your docker volume location to a large SSD for performant and voluminous storage - don't let it fill up /var/lib!
NOTE: I don't work for this company, I have no affiliation with eth-docker.net - just a hobbyist with a red spot on his head from banging it into a wall for days trying to get a node running smoothly, saved by this package of containers to run an ETH2 node!
Many people run Ethereum nodes on Raspberry Pis, so yes. The performance under heavy load (high frequency botting and simulations) will suffer compared to PC, but the node will keep up with the network under typical operations.
Hello, I am having trouble connecting brownie to my local node. Although it seems to be connected, when I try to fetch a contract from the explorer it tells me there is no contract found...
ContractNotFound: No contract deployed at 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
This is the WETH contract. Works fine when I use infura. One thing to note, my consensus node is still syncing, but the execution node says it is synced.
This happens when your local node is not fully synced, because Brownie sends a `get_code` request via web3py to your endpoint.
I'd like you to check the geth status using `geth attach` or the docker equivalent `docker exec -it geth attach` and checking the result of command `eth.syncing` - if geth is in sync, it will return `false`
Another simple check is running `chain.height` after connecting directly to your node with Brownie. It should match the current Ethereum height which you can check via Etherscan or Infura.
If geth is reporting that you're in sync but Brownie is not finding the contract code, I'd suspect that you're connected to the wrong endpoint. Is that confirmed OK?
Thanks for the reply!
After running `geth attach` and then `eth.syncing`, this is the output:
> eth.syncing
{
currentBlock: 17075750,
healedBytecodeBytes: 0,
healedBytecodes: 0,
healedTrienodeBytes: 0,
healedTrienodes: 0,
healingBytecode: 0,
healingTrienodes: 0,
highestBlock: 17075815,
startingBlock: 0,
syncedAccountBytes: 73520478,
syncedAccounts: 468775,
syncedBytecodeBytes: 20440752,
syncedBytecodes: 7553,
syncedStorage: 1064943,
syncedStorageBytes: 227676717
}
The Prysm consensus is definitely still syncing, so I'll probably just wait until that is done. But running ` % curl http://localhost:3500/eth/v1/node/syncing` returns:
{"data":{"head_slot":"6595263","sync_distance":"506102","is_syncing":true,"is_optimistic":true,"el_offline":true}}%
Btw, just wanted to say that this resource you've created is unbelievably awesome!!! Unreal!
Yessir your node is still syncing, I expect the missing contract code will be resolved once that's done.
Thank you for the kind words, glad you're enjoying it ❤️👌
Well, it looks like it is fully synced, but I still get the "No contract deployed" error. I am not sure I have the network settings correct in brownie. I have tried many methods I found via google. One method had me try to fork the local node?
- cmd: ganache-cli
cmd_settings:
fork: http://127.0.0.1:8545
gas_limit: 10000000
mnemonic: brownie
port: 8545
host: http://127.0.0.1
id: geth-node
name: Ganache-CLI (Geth Mainnet Fork)
Otherwise I tried just copying mainnet, but point it to my localhost instead of Infura...
- chainid: 1
explorer: https://api.etherscan.io/api
host: http://127.0.0.1
id: mainnet-local
multicall2: '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696'
name: mainnet-local
I found the project and documentation at eth-docker.net to be super useful here for running an ETH2 node using docker. After struggling with trying to get independent docker images running for geth and lighthouse - and trying to run directly on Ubuntu through native ppm resources - I found this all-in-one solution works incredibly well. Well documented. Comes with Grafana built in for monitoring performance and sync.
Just don't forget to move your docker volume location to a large SSD for performant and voluminous storage - don't let it fill up /var/lib!
NOTE: I don't work for this company, I have no affiliation with eth-docker.net - just a hobbyist with a red spot on his head from banging it into a wall for days trying to get a node running smoothly, saved by this package of containers to run an ETH2 node!
Hope this helps...
Right on, cool project! I appreciate the link 👌
Can I use ARM devices to run a node with the same perf than a classic pc if Ì'm connected in ethernet ?
Many people run Ethereum nodes on Raspberry Pis, so yes. The performance under heavy load (high frequency botting and simulations) will suffer compared to PC, but the node will keep up with the network under typical operations.
Thanks knight !
Will a node setup in this way continue to work after the merge?
A post-merge node needs an additional service running alongside called a consensus client. There are instructions here - https://geth.ethereum.org/docs/interface/consensus-clients
I'll write an addendum on this lesson soon, but all the steps above still apply and will be necessary post-merge.
I see. Thanks for the speedy reply!
Great read
How do I install this on windows?
How do I install this on windows?
here you don't run validator as required 32 eth ?
Correct, these steps are for a non-validating node. The same steps are also required to run a validator, but there are extra settings for that.
running validator add any advantages to bot's ?
No