MetaMask / MetaMask/metamask-extension
Detect when TestRPC changes & restart provider
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Here at EthWaterloo, I just saw a pair of hackers get stuck to the point of desperation because:
- They were getting wrong nonce errors
- They couldn't track the tokens they had published.
Both of those problems were actually related to restarting their TestRPC server, and MetaMask now being in a "wrong" state.
We could solve this by doing some kind of provider detection, for when the provider server (even if just localhost:8545) suddenly changes to a different blockchain. This could be as simple as periodically (every 5 minutes) checking if the genesis block has the same hash. Or recognizing if an old block no longer exists. I don't know, this issue is for solving the problem, let the solution PR have the solution.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests. Start by locating provider handling and the localhost:8545 connection path, then investigate how the extension could detect a changed genesis block or missing old block and what provider restart behavior is expected. Done means the changed TestRPC chain is detected and the provider state is restarted without leaving stale nonce or token-tracking state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- blockchain, typescript
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100