Well that was funded far more aggressively than I had anticipated! Thanks to everyone for the support, I'll get started right away!
Documentation and cleanup of source code
What
Clean up and properly document (doxygen) the monero source code, and handle any merges necessary to do so seamlessly with other concurrent development efforts.
Who
I'm Thomas Winget, and I've been contributing to the Monero codebase since around June 2014. My largest contribution is the migration from storing the blockchain in a static, binary format to storing the blockchain using a database API, as well as two BlockchainDB implementations (LMDB and BerkeleyDB). Other contributions of mine can be found via the network graph on github or simply looking at my fork.
As a side effect of the work I've done already on Monero, I'm rather familiar with most of the codebase. This puts me in a good position to write down how everything works and fits together, as I've had to sort that out already for many parts.
As a side effect of this effort, I will further cement the knowledge I have of the codebase and gain knowledge in areas I'm less familiar with, enabling me to efficiently implement new features in the future and guide others who may have questions regarding a specific module. In addition, documenting the code will function as a sort of code review, allowing the possibility of spotting any bugs (minor or otherwise).
Why
In my time developing on Monero, there have been countless instances where I need to reference what another piece of code does in order to work with it, and having all the code documented properly in an easily accessible manner (doxygen) would be helpful for that for anyone working in Monero's codebase. I have also come across areas where the code could be made more efficient or clear without changing any functionality, as well as many typographical errors (though these are minor, I think we can all agree they're annoying if nothing else).
Documentation is by far not a glamorous task (probably why it's a bit sparse in Monero), but every development effort benefits immensely from properly documented code.
Proposal and Milestones
I would like to spend about 20 hours per week working on the above, at a rate of 45 XMR per hour (just over $20/hr USD at the time of writing this), paid out every week. I am unsure whether or not 80 hours of work will be enough to cover the entire codebase. There are over 70,000 lines of source in the src/ folder alone, and there is code in other folders that brings the total to over 100k, so this is no small task!
Milestones would be as follows:
- First 20 hours (900/3600 XMR)
- Second 20 hours (1800/3600 XMR)
- Third 20 hours (2700/3600 XMR)
- Fourth 20 hours (3600/3600 XMR)
After each milestone (and during), I will be available for comment, so anything that seems unclear in my documentation can be addressed and dealt with accordingly.
How could this possibly be tedious?
Your fighting the good fight sir. Thank you thank you.
Update #2:
Second 20 hours completed. Progress can be seen on the branch on my fork.
Rather than retype all of the commit messages here, you'll find a paste of "git log --stat" below, or at least hopefully you will, this preview thing hates me.
Please feel free to have a look through the generated Doxygen and let me know if anything seems unclear or incorrect (including Doxygen I haven't touched yet, it all needs to be correct eventually, and if you spot something I may as well know about it!)
commit 4adba9bf3b3de73c31f2c34eb6afa284935373d5 Author: Thomas WingetDate: Wed Oct 7 22:28:59 2015 -0400 Change Doxyfile, Blockchain not blockchain_storage Changes the Doxyfile to expand preprocessor macros, but only the ones defined in the Doxyfile. This way we can specify that BLOCKCHAIN_DB == DB_LMDB for the sake of documentation. Doxyfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 31896712c05a5bca63128a2a3061ba07935b913f Author: Thomas Winget Date: Wed Oct 7 22:28:54 2015 -0400 remove defunct code from cryptonote::core src/cryptonote_core/cryptonote_core.cpp | 13 ------------- src/cryptonote_core/cryptonote_core.h | 10 ---------- 2 files changed, 23 deletions(-) commit 9366319367e86f5802de30607f1f22772e171bda Author: Thomas Winget Date: Wed Oct 7 22:28:51 2015 -0400 cryptonote::core doxygen documentation src/cryptonote_core/cryptonote_core.cpp | 2 +- src/cryptonote_core/cryptonote_core.h | 612 ++++++++++++++++++++++++++++++-- 2 files changed, 588 insertions(+), 26 deletions(-) commit f2cc3a9eaf51bb91c3fa8aff2dc8c796872cfe42 Author: Thomas Winget Date: Wed Oct 7 22:28:43 2015 -0400 doxygen documentation for difficulty functions src/cryptonote_core/difficulty.cpp | 8 +++++--- src/cryptonote_core/difficulty.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) commit 37fa7b44d69225dfa855cb0e7fe10d53d515e402 Author: Thomas Winget Date: Wed Oct 7 22:28:37 2015 -0400 Move checkpoint functions into checkpoints class The functions in src/cryptonote_core/checkpoints_create.{h,cpp} should be member functions of the checkpoints class, if nothing else for the sake of keeping their documentation together. This commit covers moving those functions to be member functions of the checkpoints class as well as documenting those functions. src/cryptonote_core/CMakeLists.txt | 2 - src/cryptonote_core/blockchain.cpp | 8 +- src/cryptonote_core/blockchain_storage.cpp | 8 +- src/cryptonote_core/checkpoints.cpp | 226 ++++++++++++++++++++++++ src/cryptonote_core/checkpoints.h | 67 +++++++ src/cryptonote_core/checkpoints_create.cpp | 271 ----------------------------- src/cryptonote_core/checkpoints_create.h | 48 ----- src/cryptonote_core/cryptonote_core.cpp | 4 +- src/daemon/core.h | 1 - 9 files changed, 303 insertions(+), 332 deletions(-) commit 04055a0634c1794f1dd8c9e3d0728e3681253646 Author: Thomas Winget Date: Wed Oct 7 22:28:31 2015 -0400 doxygen documentation for checkpoints.{h,cpp} All functions in src/cryptonote_core/checkpoints.h are now documented in doxygen style. checkpoints.cpp has been reviewed, one function has been marked for discussion on correctness. src/cryptonote_core/checkpoints.cpp | 5 +- src/cryptonote_core/checkpoints.h | 100 +++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 6 deletions(-) commit 910bcc077d0eabe23af48fbed70024fd3783f2df Author: Thomas Winget Date: Wed Oct 7 22:28:26 2015 -0400 documentation updates to Blockchain Reviewed and updated or removed FIXME and TODO comments src/cryptonote_core/blockchain.cpp | 40 ++++++++++++++------------------------ 1 file changed, 15 insertions(+), 25 deletions(-) commit 6fe7aedae9e52cb98187a060d0633871468c47d9 Author: Thomas Winget Date: Wed Oct 7 22:28:11 2015 -0400 minor bugfixes and refactoring - Blockchain should store if it's running on testnet or not - moved loading compiled-in block hashes to its own function for clarity - on handle_get_objects, should now correctly return false if a block's transactions are missing - replace instances of BOOST_FOREACH with C++11 for loops in Blockchain. src/cryptonote_core/blockchain.cpp | 138 +++++++++++++++++++++---------------- src/cryptonote_core/blockchain.h | 12 +++- 2 files changed, 91 insertions(+), 59 deletions(-) commit 94f7615c573fbc4b9d476ba994cf290f90dc8bf4 Author: Thomas Winget Date: Wed Oct 7 22:25:06 2015 -0400 Remove unnecessary or defunct code src/cryptonote_core/blockchain.cpp | 49 -------------------------------------- src/cryptonote_core/blockchain.h | 21 ---------------- 2 files changed, 70 deletions(-) commit 3e3408eb455f168eb88bfc01c197186c2cb12b60 Merge: 3ba43b3 82d7e79 Author: Thomas Winget Date: Wed Oct 7 22:21:43 2015 -0400 Merge upstream changes into documentation branch