First challenge complete 🎉
It was a struggle at times, and I had to digest a mountain of new information to do it, but I successfully completed the first coding challenge! Debugging my code was challenging because the output of most of my functions was a hash, so there was no way of knowing how close I was to the right answer. Comparing output from the bitcoin crate and the code samples on Learn Me a Bitcoin were essential to debugging my own code. The bitcoin-cli gethdkeys command was also helpful in showing me more information about my wallet keys, and getaddressinfo about my addresses. I also later realized I could have used test vectors to check my code thanks to a helpful post on the Discord!
Writing my solution in Rust was a challenge and added more time, but I am starting to get the hang of some basic concepts. I was surprised to learn when using a function with optional parameters that null does not exist in Rust. This is an example of a difference with every other programming language I’ve used, but it’s easy enough to get used to, and the benefits are huge.
Parsing RPC response json was a challenge especially with nested data, but the serde_json crate does provide this handy way of mapping data to custom data structures.
Overall the first challenge was very difficult for someone new to bitcoin and required a deep technical understanding of many parts of taproot transactions and HD wallets. I love this hands on way of learning - there is a concrete objective I’m working toward and will learn any information needed to achieve it. Writing code is the ultimate proof of work - either it works or doesn’t. The autograder doesn’t play favorites.
The warnet challenge was interesting, but much of the low hanging fruit was disposed of very quickly, and I felt it would have been a tall order to find a more difficult exploit. Thus, I kept working on the coding challenge. Warnet seems like a great tool to test bitcoin node security, and maybe I will encounter it again.
On to the second challenge!
Write a comment