-
Notifications
You must be signed in to change notification settings - Fork 683
ganache-cli
doesn't really lock accounts
#996
Comments
Because you are using With that said, I think I agree with you that it shouldn't work this way. However, I'm not sure what the default password for accounts locked with |
Oh, I surely didn't expect that kind of default behavior. IMHO, It'll be less strange to add a command-line argument to set the password or use the seed to generate it (and display it) as for the private keys. |
Avoid ambiguity as explained in #688
For ganache v7, let's rename the We'll also add a Using Implementation detail: We store account private keys that were created by |
User-supplied passphrase is now used to encrypt wallet. If no passphrase is supplied and the `--lock` options is not specified, initial accounts are not encrypted to improve startup speeds. A keyfile record is now added for every account. Previously, this wasn't done, making it impossible to actually unlock initial accounts. This fixes #996. Updates api with the above changes to the wallet.
User-supplied passphrase is now used to encrypt wallet. If no passphrase is supplied and the `--lock` options is not specified, initial accounts are not encrypted to improve startup speeds. A keyfile record is now added for every account. Previously, this wasn't done, making it impossible to actually unlock initial accounts. This fixes #996. Updates api with the above changes to the wallet.
User-supplied passphrase is now used to encrypt wallet. If no passphrase is supplied and the `--lock` options is not specified, initial accounts are not encrypted to improve startup speeds. A keyfile record is now added for every account. Previously, this wasn't done, making it impossible to actually unlock initial accounts. This fixes #996. Updates api with the above changes to the wallet.
User-supplied passphrase is now used to encrypt wallet. If no passphrase is supplied and the `--lock` options is not specified, initial accounts are not encrypted to improve startup speeds. A keyfile record is now added for every account. Previously, this wasn't done, making it impossible to actually unlock initial accounts. This fixes #996. Updates api with the above changes to the wallet.
Expected Behavior
When using
--secure
,ganache-cli
should not allow transactions from locked accounts.Current Behavior
Transactions are done as if the accounts were not locked.
Possible Solution
Steps to Reproduce (for bugs)
npx ganache-cli --secure --deterministic -p 8000 -a 11
web3.eth.personal.sendTransaction({from: "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", to: "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1", value: web3.utils.toWei("1") }, '')
Context
Unless I wrongly understood how locked accounts should work, this seems like a pretty serious bug.
Please not that I figured a not so elegant workaround by using
--db
option and by relaunchingganache-cli
with a smaller-a
argument, causing it to initialize the 11 eleven accounts as expected but forbidding every transactions from an address that is not present in the second execution log.Your Environment
The text was updated successfully, but these errors were encountered: