It would be cool to implement a vanity address generator for btczee, our Bitcoin protocol implementation in Zig. A vanity address is a Bitcoin address where part of it is chosen by the user, making it look less random. This feature will allow users to create personalised Bitcoin addresses.
Feature Requirements
Implement a new command vanity under the misc subcommand:
btczee misc vanity <prefix>
The generator should create a Bitcoin address that starts with the given prefix.
Output should include:
The generated vanity address
The corresponding private key
The extended public key
Example output format:
Address: 1ABDELZ4cAQgskfVfMdNFjhXv95JTHqiZ6
Private key: Kwn...8P
Extended Public key: 028...2a77
The implementation must be multithreaded for optimal performance.
Include benchmarks to measure and optimize the generation speed.
Technical Considerations
Use Zig's concurrency features for multithreading.
Implement efficient Bitcoin address generation and validation.
Ensure proper error handling for invalid inputs or generation failures.
Use cryptographically secure random number generation for creating private keys.
Implement a progress indicator or estimated time remaining for longer searches.
Performance Goals
The generator should be able to check at least 100,000 addresses per second on a modern CPU.
Implement adaptive difficulty estimation based on the prefix length.
Acceptance Criteria
The vanity command is properly integrated into the btczee CLI.
Vanity addresses are generated correctly and start with the user-provided prefix.
Private keys and extended public keys are accurately derived and displayed.
The generator utilizes multiple CPU cores effectively.
Benchmark results show significant performance improvements over a single-threaded implementation.
Code is well-documented and follows the project's coding standards.
Unit tests are implemented to ensure the correctness of the vanity address generation.
Additional Notes
Consider adding an option to save the generated address and keys to a file.
Implement a maximum prefix length limit to prevent unreasonably long search times.
Add a warning for users about the security implications of sharing or improperly storing the generated private keys.
Implement Vanity Address Generator for btczee
Description
It would be cool to implement a vanity address generator for btczee, our Bitcoin protocol implementation in Zig. A vanity address is a Bitcoin address where part of it is chosen by the user, making it look less random. This feature will allow users to create personalised Bitcoin addresses.
Feature Requirements
Implement a new command
vanity
under themisc
subcommand:The generator should create a Bitcoin address that starts with the given prefix.
Output should include:
Example output format:
The implementation must be multithreaded for optimal performance.
Include benchmarks to measure and optimize the generation speed.
Technical Considerations
Performance Goals
Acceptance Criteria
vanity
command is properly integrated into the btczee CLI.Additional Notes
Related Documentation and resources
Estimated Complexity
Medium
Priority
Low