Taking a break for warnet
It’s been a very busy few days learning the details of deriving private keys, transaction structures, taproot, tweaked public keys, witness programs, and bitcoin RPC. Mastering Bitcoin and Learn Me a Bitcoin have been invaluable resources as I work through the first challenge.
I’ve managed to connect to my local test bitcoin chain using the bitcoincore_rpc Rust crate. I also used the bitcoin-cli tool to make a wallet locally with my test extended private key.
The more challenging part has been writing code to generate new private and public keys from an extended private key. Being new to bitcoin development, a lot of terminology doesn’t mean a whole lot to me at first glance. For example, the purpose of the ‘witness program’ is not obvious by its name. But reading chapters 6 and 7 of Mastering Bitcoin made it a lot more clear. This part of the transaction output contains a script with conditions that must be satisfied before the funds can be spent. This could mean a valid signature for a public key, or something more complex.
It’s been interesting to learn the technical details of the taproot upgrade, which I had heard of, and new concepts like a ‘tweaked’ public key, which was totally new to me. Translating all of this to Rust has been a challenge, but not insurmountable. I have a lot of working code in place but not a solution yet, so more debugging lies ahead.
But now I’ll be participating in a ‘warnet’ challenge to attempt to exploit real and fake bitcoin vulnerabilities in a test network. Again this is new territory for me since the coding is in Python, which I also am new to, but I’m going in with the attitude that I’ll learn a lot one way or another. And who knows, maybe I’ll score some points, stay tuned!
Write a comment