Aug 5, 2024 by Arnaud Stoz | 305 views
If you have already played with geth, you probably have already noticed the --dev
option. This option is very handy when you want to quickly start a node to test something. However, you might have found that the developer account which is automatically set is a random account. This randomness can be annoying when trying to automate some testing tasks. The good news is that there is a way to set this developer account. That’s what will be explained in this small blog post.
The first step is to create an account. (If you already have a keystore and want to use that account, feel free to skip to the next section).
We will use clef to create the account. The following command will prompt you for a password and create the account in the keystore
folder:
clef newaccount --keystore keystore
Once the account is created, we can now define it as the developer account when starting the dev node. To set the developer account we will use the two geth options:
--keystore
to specify the path to the folder created by clef.--password
to specify the password to unlock the account.Note that the --password
option does not read directly from stdin but takes a path to a file which contains the password to unlock the account.
The full command is given below but other flags can obviously be added:
geth --keystore keystore --password password.txt --dev
This blog post is licensed under CC BY-SA 4.0
Conference Blockchain Cyber Situation Awareness
Blockchain APT Detection
A few weeks ago, we had the opportunity to present a short webinar on two topics currently under research in our department:Blockchain golang
If you already research about web3 and decentralization, you probably stumbled on the Inter Planetary File System (IPFS). However if you wanted to use the API provided by the IPFS in one of your go program, you probably went crazy trying to understand how to use the API to finaly realize the documentation is not even up to date and refer to deprecated library. The IPFS-API module try to fill this gap and provide a basic yet simple to use package...