Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tutorial about how to run a localhost testnet (maybe using metamask + remix) #6

Open
serapath opened this issue May 25, 2019 · 3 comments

Comments

@serapath
Copy link

I found your project through ethereum.org

  1. I tried to use ethnode and it is true, it installs easily and it downloads the node and runs it pretty much flawlessly and that is awesome :-)

  2. I also managed to connect to it via metamask while using remix, but all account addresses that were listed in metamask had 0 ether on it which gave me some headache.

  3. After copying one of the addresses shown in metamask when connecting to localhost and running ethnode again with --allocate=<paste adddress from metamask> it gave 100 ETH to that address.

...but when I tried to deploy a contract or do any kind of transactions, metamask ALWAYS responds with:

MetaMask - RPC Error: Error: Error: [ethjs-rpc] rpc error with payload {"id":9245888516496,"jsonrpc":"2.0","params":["0xf9182b808502e90edd008319a810808...b2b"],"method":"eth_sendRawTransaction"} Error: invalid sender

This might of course be unrelated to ethnode and a metamask or probably geth issue, but still - it would be cool to resolve this and maybe explain how to specifically run ethnode to make it work as a testnet on localhost :-)

@vrde
Copy link
Owner

vrde commented Jun 14, 2019

Hi @serapath, thanks for trying out ethnode! Sorry for my late reply, for whatever reason I missed the notification for this issue.

I'm able to reproduce the error with MetaMask, right now I'm trying to understand what's happening there. Will update you soon!

@vrde
Copy link
Owner

vrde commented Jun 15, 2019

TL;DR: when weird stuff happens, restart your browser.

Sounds pretty lame. But I've had problems while developing/testing smart contracts (using MetaMask as a Web3 provider) that were solved just by restarting my browser.

I was able to reproduce your error by restarting ethnode with and without --allocate. Every time you restart ethnode, it starts with a different networkId and chainId (they are both initialized by the same random number, seems to be a requirement for EIP155). Having a different networkId allows MetaMask to restart the incremental nonce that is required in a transaction.

But I've noticed that MetaMask has issues if you restart your test node (same happens with ganache-cli). By restarting ethnode with --allocate=0xmyaddress and restarting the browser, I was able to transfer funds from 0xmyaddress to another address without any error.

Can you please give it a shot and tell me if it works for you?

@serapath
Copy link
Author

Hey, sorry, i was a bit busy.

I think I did exactly everything you described but I did not restart my browser after running ethnode.
Actually I'm not completely sure what you are recommending. Restarting the browser would work for me personally, but to recommend this to users of the tool we are building is not a solution that would ever work for us.

Can this be solved differently?
I want to use ethnode so people can use it to develop locally with a little quick testnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants