Fix 7 stale references in docs and comments after codebase restructuring
- doc/DEVELOPING.md: src/main.cpp → src/tx_validation.cpp / block_processing.cpp - doc/CHANGELOG-randomx-validation.md: src/main.cpp → src/block_processing.cpp (×2) - doc/release-process.md: checkpoint instructions now reference src/chainparams_checkpoints_hush3.h instead of src/chainparams.cpp - src/hush_defs.h: ./contrib/block_time.pl → ./contrib/scripts/block_time.pl (×3) - src/cc/dapps/dappstd.c: commented hush_cJSON.c → hush_cJSON.cpp
This commit is contained in:
@@ -46,7 +46,7 @@ A malicious miner could put arbitrary bytes in `nSolution`, iterate nonces until
|
||||
- Compares the computed hash against `pblock->nSolution`.
|
||||
- Caches the RandomX VM and cache between calls (protected by mutex), re-initializing only when the key changes.
|
||||
|
||||
### `src/main.cpp`
|
||||
### `src/block_processing.cpp`
|
||||
|
||||
- In `CheckBlockHeader()`: added `CheckRandomXSolution()` call inside the `fCheckPOW` block, after the existing `CheckEquihashSolution()` call. Invalid RandomX solutions are rejected with `DoS(100)`.
|
||||
|
||||
@@ -89,7 +89,7 @@ A malicious miner could put arbitrary bytes in `nSolution`, iterate nonces until
|
||||
| `src/hush_defs.h` | 1 | 0 |
|
||||
| `src/pow.h` | 9 | 0 |
|
||||
| `src/pow.cpp` | ~105 | 0 |
|
||||
| `src/main.cpp` | 2 | 0 |
|
||||
| `src/block_processing.cpp` | 2 | 0 |
|
||||
| `src/hush_bitcoind.h` | 6 | 0 |
|
||||
| `src/miner.cpp` | 5 | 5 |
|
||||
| `src/hush_utils.h` | 10 | 0 |
|
||||
|
||||
@@ -121,7 +121,7 @@ The chain magic value is the CRC32 checksum of every non-default consensus
|
||||
option the HAC uses.
|
||||
|
||||
Also make sure to actually validate the new consensus option! That is probably
|
||||
going to happen in `src/main.cpp` . If you don't, a malicious node can just
|
||||
going to happen in `src/tx_validation.cpp` or `src/block_processing.cpp` . If you don't, a malicious node can just
|
||||
modify `src/miner.cpp` to do whatever they want.
|
||||
|
||||
## Updates to this document
|
||||
|
||||
@@ -76,10 +76,10 @@ Install deps on Linux:
|
||||
- There is a hack in the script where you can hardcode a version number if hushd isn't running.
|
||||
- Comment out the HUSHVER line and uncomment the line above it with a hardcoded version number
|
||||
- PROTIP: Man page creation must be done after updating the version number and recompiling and before Debian package creation
|
||||
- Update checkpoints in src/chainparams.cpp via util/checkpoints.pl
|
||||
- Update checkpoints in src/chainparams_checkpoints_hush3.h (or src/chainparams_checkpoints_dragonx.h for DRAGONX) via util/checkpoints.pl
|
||||
- Run "./util/checkpoints.pl help" to get example usage
|
||||
- hushd must be running to run this script, since it uses hush-cli to get the data
|
||||
- Look for line which says "END HUSH mainnet checkpoint data" near line 560 in chainparams.cpp , that is where checkpoint data ends
|
||||
- The checkpoint data is in src/chainparams_checkpoints_hush3.h, which is #included at line 559 of chainparams.cpp. Add new entries at the end of that header file.
|
||||
- Find the highest block height of checkpoint data, let's call it HEIGHT
|
||||
- Run `./util/checkpoints.pl 1000 HEIGHT &> checkpoints.txt` to generate the latest checkpoint data
|
||||
- To copy the new data from checkpoints.txt into the file, one way in Vim is to type ":r checkpoints.txt" which will read in a file and paste it as the current cursor
|
||||
|
||||
@@ -246,7 +246,7 @@ int32_t safecopy(char *dest,char *src,long len)
|
||||
#define true 1
|
||||
#define false 0
|
||||
//#ifdef STANDALONE
|
||||
//#include "../hush3/src/hush_cJSON.c"
|
||||
//#include "../hush3/src/hush_cJSON.cpp"
|
||||
//#else
|
||||
#include "../../hush_cJSON.cpp"
|
||||
//#endif
|
||||
|
||||
@@ -43,19 +43,19 @@
|
||||
#define NUM_HUSH_SEASONS 7
|
||||
#define NUM_HUSH_NOTARIES 64
|
||||
|
||||
// $ ./contrib/block_time.pl 166250
|
||||
// $ ./contrib/scripts/block_time.pl 166250
|
||||
// Hush Block 166250 will happen at roughly:
|
||||
// Wed Jan 29 08:14:12 2020 Eastern # 1580303652
|
||||
// Wed Jan 29 13:14:12 2020 GMT # 1580303652
|
||||
const uint32_t nHushHardforkHeight = 166250;
|
||||
// $ ./contrib/block_time.pl 245555
|
||||
// $ ./contrib/scripts/block_time.pl 245555
|
||||
// Hush Block 245555 will happen at roughly... now
|
||||
const uint32_t nHushHardforkHeight2 = 245055;
|
||||
|
||||
// This height begins Hush DPoW from Hush notaries
|
||||
const uint32_t nHushHardforkHeight3 = 340420;
|
||||
// This height begins Hush Decentralized Devtax
|
||||
// ./contrib/block_time.pl 1605555
|
||||
// ./contrib/scripts/block_time.pl 1605555
|
||||
// Hush Block 1605555 will happen at roughly:
|
||||
// Sat Dec 16 10:30:42 2023 Eastern # 1702740642
|
||||
// Sat Dec 16 15:30:42 2023 GMT # 1702740642
|
||||
|
||||
Reference in New Issue
Block a user