Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Release v0.1.2
Implements high address mining mode (namely 2xx::), in an inefficient
yet working way.
  • Loading branch information
tdemin committed Aug 21, 2020
2 parents 5fd5c0f + e1cbb1c commit 6940f0a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
19 changes: 11 additions & 8 deletions README.md
Expand Up @@ -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
Expand All @@ -43,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
Expand Down
19 changes: 14 additions & 5 deletions main.go
Expand Up @@ -20,14 +20,15 @@ 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")
threads := flag.Int("threads", runtime.GOMAXPROCS(0), "how many threads to use for mining")
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)
Expand All @@ -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)
Expand Down

0 comments on commit 6940f0a

Please sign in to comment.