diff --git a/doc/developer-notes.md b/doc/developer-notes.md index eca281a0c..d8027f38e 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -113,6 +113,7 @@ CLI param for HSC's. * Add the new value to the end of the `ASSETCHAINS_ALGORITHMS` array in `src/hush_utils.h` * You cannot add it to the front because the first element is the default "equihash" + * You will also need to add a new constant, such as `ASSETCHAINS_FOOHASH` to `src/hush_globals.h` * Increase the value of `ASSETCHAINS_NUMALGOS` by one * This value cannot be automatically be determined by the length of the above array because Equihash has different supported variants of (N,K) values * Add the new PoW mining library to a subdirectory in src, such as RandomX official code being in `src/RandomX` @@ -125,6 +126,8 @@ CLI param for HSC's. * So code duplication is purposeful, because it isolates the risk of breaking one PoW by changing another. We tried very hard to not break Equihash mining when adding RandomX mining. * When adding a new mining class, copying the RandomXMiner class is best, since it's newer and does not contain various legacy code that still exists in BitcoinMiner * So copy RandomXMiner to your new FooMiner, delete all the randomx-specific stuff and add in the PoW mining code + * Some other changes to src/miner.cpp will be needed + * Update `GenerateBitcoins` function to start mining threads with your new algo with `else if(ASSETCHAINS_ALGO == ASSETCHAINS_FOOHASH) { minerThreads->create_thread(&FooMiner)}` # Coding