From df23d96556c322757b8bdea5a88e72be2f4b5a14 Mon Sep 17 00:00:00 2001 From: Planxnx Date: Sun, 9 Apr 2023 01:58:09 +0700 Subject: [PATCH] feat: update only privatekey mode --- README.md | 25 ++++++++++++++++++++++--- main.go | 4 +--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 65231ed..18a6ed5 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,7 @@ $ docker pull planxthanee/ethereum-wallet-generator:latest ## Modes - **[1] Normal Mode** - Generate wallets with mnemonic phrase. (default) -- **[2] Fast Mode** - Generate wallets with a mnemonic phrase, **but less secure**. Use cumulative entropy instead of generating new random entropy(changing only the first or second words of mnemonic phrases). It will generate new random entropy every 2048 wallets. -- **[3] Only Private Key Mode** - Generate wallets with private key only. **This mode is the fastest, but you will not get a mnemonic phrase.** +- **[2] Only Private Key Mode⚡️** - Generate wallets with private key only. **Increase speed up to 20x (+100k wallet/sec), but you will not get a mnemonic phrase.** ## Usage @@ -83,7 +82,7 @@ Usage of ethereum-wallet-generator: -db string set sqlite output file name eg. wallets.db (db file will create in `/db` folder) -c int set concurrency value (default 1) -bit int set number of entropy bits [128 for 12 words, 256 for 24 words] (default 128) - -mode int set mode of wallet generator [1: normal mode, 2: fast mode, 3: only private key mode] + -mode int set mode of wallet generator [1: normal mode, 2: only private key mode] -strict bool strict contains mode, resolve only the addresses that contain all the given letters (required contains to use) -contains string show only result that contained with the given letters (support for multiple characters) -prefix string show only result that prefix was matched with the given letters (support for single character) @@ -95,6 +94,8 @@ Usage of ethereum-wallet-generator: ## Benchmark +### Normal Mode + We've dryrun the generator on normal mode with 8 concurrents for 60,000 wallets on MacBook Air M1 2020 Memory 16 GB
and got speed up to 6,468.58 wallet/sec. @@ -111,6 +112,24 @@ Total Wallet Resolved: 60000 w Copyright (C) 2023 Planxnx ``` +### Only Private Key Mode + +We've dryrun the generator on only private key mode with 8 concurrents for 1,000,000 wallets on MacBook Air M1 2020 Memory 16 GB
+and got speed up to 11,2029 wallet/sec. + +```console +ethereum-wallet-generator -n 60000 -dryrun -c 8 -mode 1 +===============ETH Wallet Generator=============== + +1000000 / 1000000 | [███████████████████████████████████████████████] | 100.00% | 111778 p/s | resolved: 1000000 + +Resolved Speed: 111778.55 w/s +Total Duration: 8.94626016s +Total Wallet Resolved: 1000000 w + +Copyright (C) 2023 Planxnx +``` + ## Examples ### **Simple usgae:** diff --git a/main.go b/main.go index 4f4c45f..6e09555 100644 --- a/main.go +++ b/main.go @@ -56,7 +56,7 @@ func main() { regEx := flag.String("regex", "", "show only result that was matched with given regex (eg. ^0x99 or ^0x00)") isDryrun := flag.Bool("dryrun", false, "generate wallet without a result (used for benchmark speed)") isCompatible := flag.Bool("compatible", false, "logging compatible mode (turn this on to fix logging glitch)") - mode := flag.Int("mode", 1, "wallet generate mode [1: normal mode, 2: fast mode(reduce entropy random times, but less secure), 3: only private key mode(generate only privatekey, this fastest mode)]") + mode := flag.Int("mode", 1, "wallet generate mode [1: normal mode, 2: only private key mode(generate only privatekey, this fastest mode)]") flag.Parse() // Wallet Address Validator @@ -151,8 +151,6 @@ func main() { case 1: walletGenerator = wallets.NewGeneratorMnemonic(*bits) case 2: - panic("Fast mode is not supported yet") - case 3: walletGenerator = wallets.NewGeneratorPrivatekey() default: panic("Invalid mode. See: https://github.com/Planxnx/ethereum-wallet-generator#Modes")