Skip to content

Commit

Permalink
feat: update only privatekey mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Planxnx committed Apr 8, 2023
1 parent 83e0584 commit df23d96
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand All @@ -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 <br/>
and got speed up to 6,468.58 wallet/sec.

Expand All @@ -111,6 +112,24 @@ Total Wallet Resolved: 60000 w
Copyright (C) 2023 Planxnx <[email protected]>
```

### 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 <br/>
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 <[email protected]>
```

## Examples

### **Simple usgae:**
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit df23d96

Please sign in to comment.