mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-30 04:51:13 +02:00
Merge bitcoin/bitcoin#29775: Testnet4 including PoW difficulty adjustment fix
6bfa26048d
testnet: Add timewarp attack prevention for Testnet4 (Fabian Jahr)0100907ca1
testnet: Add Testnet4 difficulty adjustment rules fix (Fabian Jahr)74a04f9e7a
testnet: Introduce Testnet4 (Fabian Jahr) Pull request description: To supplement the [ongoing conceptual discussion about a testnet reset](https://groups.google.com/g/bitcoindev/c/9bL00vRj7OU/m/9yCPo3uUBwAJ) I have drafted a move to v4 including a fix to the difficulty adjustment mechanism, which was part of the motivation that started the discussion. Conceptual considerations: - The conceptual discussion about doing a testnet4 or softforking the fix into testnet3 is outside of the scope of this PR and I would ask reviewers to contribute their opinions on this on the ML instead. However, I am happy to adapt this PR to a softfork change on testnet3 if there is consensus for that instead. - The difficulty adjustment fix suggested here touches the `CalculateNextWorkRequired` function and uses the same logic used in `GetNextWorkRequired` to find the last previous block that was not mined with difficulty 1 under the exceptionf. An alternative fix briefly mentioned on the mailing list by Jameson Lopp would be to "restrict the special testnet minimum difficulty rule so that it can't be triggered on the block right before a difficulty retarget". That would also fix the issue but I find my suggestion here a bit more elegant. ACKs for top commit: jsarenik: tACK6bfa26048d
achow101: ACK6bfa26048d
murchandamus: tACK6bfa26048d
Tree-SHA512: 0b8b69a621406a944da5be551b863d065358ba94d85dd3b80d83c412660e230ee93b27316081fbee9b4851cc4ff8585db64c7dfa26cb5148ac835663f2712c3d
This commit is contained in:
13
doc/files.md
13
doc/files.md
@@ -34,12 +34,13 @@ Windows | `%LOCALAPPDATA%\Bitcoin\` <sup>[\[1\]](#note1)</sup>
|
||||
|
||||
3. All content of the data directory, except for `bitcoin.conf` file, is chain-specific. This means the actual data directory paths for non-mainnet cases differ:
|
||||
|
||||
Chain option | Data directory path
|
||||
-------------------------------|------------------------------
|
||||
`-chain=main` (default) | *path_to_datadir*`/`
|
||||
`-chain=test` or `-testnet` | *path_to_datadir*`/testnet3/`
|
||||
`-chain=signet` or `-signet` | *path_to_datadir*`/signet/`
|
||||
`-chain=regtest` or `-regtest` | *path_to_datadir*`/regtest/`
|
||||
Chain option | Data directory path
|
||||
---------------------------------|------------------------------
|
||||
`-chain=main` (default) | *path_to_datadir*`/`
|
||||
`-chain=test` or `-testnet` | *path_to_datadir*`/testnet3/`
|
||||
`-chain=testnet4` or `-testnet4` | *path_to_datadir*`/testnet4/`
|
||||
`-chain=signet` or `-signet` | *path_to_datadir*`/signet/`
|
||||
`-chain=regtest` or `-regtest` | *path_to_datadir*`/regtest/`
|
||||
|
||||
## Data directory layout
|
||||
|
||||
|
Reference in New Issue
Block a user