From 694bf9708b7b993e2d27a3686380ad54c4866ad9 Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Wed, 12 Aug 2020 23:50:27 +0500 Subject: [PATCH 1/3] Add a notice on SimpleYggGen-C++ --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6baa191..726b308 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,20 @@ code for generating keys and utilizing multiple CPU threads for mining. ### History -SimpleYggGen is originally a project by [@acetone](https://notabug.org/acetone), -who wrote a bash [miner](https://notabug.org/acetone/SimpleYggGen-Bash) for +[SimpleYggGen](https://notabug.org/acetone/SimpleYggGen-Bash) is originally a +project by [@acetone](https://notabug.org/acetone), who wrote a Bash miner for getting "magic" Yggdrasil addresses following a pattern. The main problem with his implementation was that it ran grep and yggdrasil as separate processes, -making mining very slow. Even though acetone later made a C++ implementation, it -still relies on running Yggdrasil as a separate process. +making mining very slow. Even though @acetone later made a C++ implementation, +it still relied on running Yggdrasil as a separate process. -### Performance +As of now (2020-08-12) @acetone reworked his C++ miner implementation, and +[SYG-C++](https://notabug.org/acetone/SimpleYggGen-CPP) is even more performant +than this program (making, like, 15% more iterations within the same time). -Obviously far superior to the [original SimpleYggGen][dokuygg] -(Yggdrasil link, you might need to install Yggdrasil to open this link). +### Performance -[dokuygg]: http://[300:529f:150c:eafe::6]/doku.php?id=yggdrasil:simpleygggen +Obviously far superior to the original SimpleYggGen. With multiple threads it takes SimpleYggGen **a month** to run through a few million cycles and find keys for `200::c84:77b0:f66d:b47e:64c7` (targeting From 5963aa0d68beda03588d634a4d1a3ef265dd84f1 Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Sat, 22 Aug 2020 00:54:46 +0500 Subject: [PATCH 2/3] Implement high address mining mode --- README.md | 2 ++ main.go | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 726b308..d68615b 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,8 @@ flag. ``` % syg_go -help Usage of syg_go: + -highaddr + high address mining mode (2xx::), excludes regex -iter uint per how many iterations to output status (default 100000) -original diff --git a/main.go b/main.go index 54b96be..5e96526 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,7 @@ func main() { iterationsPerOutput := flag.Uint("iter", 100000, "per how many iterations to output status") displayVersion := flag.Bool("version", false, "display version") origCode := flag.Bool("original", false, "use original Yggdrasil code") + highAddressMode := flag.Bool("highaddr", false, "high address mining mode (2xx::), excludes regex") flag.Parse() if *displayVersion { println("syg_go", version) @@ -42,10 +43,18 @@ func main() { addrForNodeID = AddrForNodeID } - regex, err := regexp.Compile(*rxflag) - if err != nil { - log.Printf("%v\n", err) - os.Exit(1) + var ( + regex *regexp.Regexp + err error + ) + if !*highAddressMode { + regex, err = regexp.Compile(*rxflag) + if err != nil { + log.Printf("%v\n", err) + os.Exit(1) + } + } else { + regex = regexp.MustCompile("^2..::$") } newKeys := make(chan keySet, *threads) From e1cbb1c2d9e634dd1fa81af101ea7618c20059d7 Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Sat, 22 Aug 2020 00:54:59 +0500 Subject: [PATCH 3/3] Bump v0.1.2 --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 5e96526..94e3f6f 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ import ( "github.com/yggdrasil-network/yggdrasil-go/src/crypto" ) -var version = "v0.1.1" +var version = "v0.1.2" func main() { rxflag := flag.String("regex", "::", "regex to match addresses against")