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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a deterministic address if none is provided in --dev mode #157

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

ferranbt
Copy link
Collaborator

馃摑 Summary

In dev mode (--dev), If no keystore is mounted in the client, geth generates a random address as the validator and funded account. geth does not provide the private key of this funded account to make transactions. Normally, this is not a problem because a user can send a non-signed eth_sendTransaction which uses that funded account.

However, the eth_sendTransaction method was disabled in #34. Thus, if a node runs in dev mode without a keystone, no transactions can be mined ever.

This PR fixes that issue by generating a deterministic address with a known private key as a validator/funded account. The address picked is the one generated by the mnemonic test test test test test test test test test test test junk which is the same one used by foundry for this use case.

馃摎 References


  • I have seen and agree to CONTRIBUTING.md

@ferranbt ferranbt merged commit 7e1db88 into main Jan 10, 2024
3 checks passed
@ferranbt ferranbt deleted the feature/deterministic-address-dev-mode branch January 10, 2024 19:45
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

Successfully merging this pull request may close these issues.

None yet

3 participants