diff --git a/cmd/cpu-burner/main.go b/cmd/cpu-burner/main.go new file mode 100644 index 0000000..d1f9e9e --- /dev/null +++ b/cmd/cpu-burner/main.go @@ -0,0 +1,111 @@ +package main + +import ( + "context" + "fmt" + "log" + "runtime" + "time" + + "hash-of-wisdom/internal/pow/challenge" + "hash-of-wisdom/internal/pow/solver" +) + +func main() { + fmt.Println("šŸ”„ Hash of Wisdom - CPU Burner Challenge šŸ”„") + fmt.Printf("Available CPU cores: %d\n", runtime.NumCPU()) + + // Create config with brutal difficulty + config, err := challenge.NewConfig( + challenge.WithDefaultDifficulty(30), // This will require ~1 BILLION hash attempts on average + challenge.WithMinDifficulty(25), + challenge.WithMaxDifficulty(32), + challenge.WithRandomBytes(8), + ) + if err != nil { + log.Fatalf("Failed to create config: %v", err) + } + + // Generate the brutal challenge + generator := challenge.NewGenerator(config) + ch, err := generator.GenerateChallenge() + if err != nil { + log.Fatalf("Failed to generate challenge: %v", err) + } + + fmt.Printf("\nšŸ’€ Generated BRUTAL challenge with difficulty %d bits\n", ch.Difficulty) + fmt.Printf("Expected attempts: ~%.0f\n", float64(uint64(1)<