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

[FEAT] Generate some empty blocks to make era-test-node work nicer with wallets like metamask #334

Open
mm-zk opened this issue Aug 19, 2024 · 1 comment
Labels
challenging 🏴‍☠️ Indicates a difficult item feature ➕ Feature item p2 🟡 Indicates moderately high priority item

Comments

@mm-zk
Copy link
Collaborator

mm-zk commented Aug 19, 2024

🌟 Feature Request

📝 Description

If you use your metamask wallet with era-test-node, the transactions might show up as 'pending'.
This is due to the fact that era-test-node is generating new blocks only when a new transaction shows up, and meta-mask is waiting (by default) for the next block before even checking if transaction was executed.

There are 2 solutions:

  • have era-test-node generate a block every couple seconds - it is simple solution, but will create potentially a bunch of noise in the logs etc.
  • or - have era-test-node create an empty block after couple seconds, only if the previous block was non-empty - while this is a little bit more complex, it means that if you send a transaction (and then do nothing), test node would still generate an empty block, which should help wallets like metamask to correctly mark the transaction as completed.
@MexicanAce
Copy link
Collaborator

I think this would require support of something like Mining Modes from Hardhat.

My preference would be to keep things simple and go with the first option: generate a block every couple of seconds and make this optional while keeping the noise in the logs to a minimum

@MexicanAce MexicanAce added p2 🟡 Indicates moderately high priority item challenging 🏴‍☠️ Indicates a difficult item feature ➕ Feature item labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenging 🏴‍☠️ Indicates a difficult item feature ➕ Feature item p2 🟡 Indicates moderately high priority item
Projects
None yet
Development

No branches or pull requests

2 participants