forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #2303: [Backport] 5.1.0 backports
50a5e84 GUI: if the custom fee is disabled, use the minimum required fee and not the stored value. (furszy) 1fc145c Automatically set the lowest possible Custom Fee when user type in fee that is too low. (MishaPozdnikin) 0d2555e net_processing: missing cs_main lock for chainActive.GetLocator() call (furszy) 64bd400 validation: Remove redundant request sync from ProcessNewBlock(). (furszy) c44b431 validation: missing cs_main lock for `CheckBlock` in `ProcessNewBlock` (furszy) 1f38b90 Removal of the `fAlreadyChecked` flag from the entire `ActivateBestChain` flow. (furszy) f53c824 Refactor: remove redundant `fAlreadyCheckedBlock` argument from `AcceptBlock` (furszy) 374f6c9 Refactor: move `CheckBlockSignature` function call inside `CheckBlock`. (furszy) a78dfbe Validation: Remove `CheckBlockSignature` now unneeded enableP2PKH flag. (furszy) 7f244b1 [Tests] Check last_processed_block in getwalletinfo Github-Pull: #2283 Rebased-From: a700fdf (random-zebra) b3a12b5 [RPC] `getwalletinfo`: Add last_processed_block return value. (furszy) e51dcee Add unit tests for signals generated by ProcessNewBlock() (furszy) c4dd07f Validation: rename one of the two instances using "bad-prevblk" to its correct description of "prevblk-not-found" (furszy) 39f6eaf Fix concurrency-related bugs in ActivateBestChain (Jesse Cohen) fb19c3a Do not unlock cs_main in ABC unless we've actually made progress. (Matt Corallo) fd79bb7 Optimize ActivateBestChain for long chains (Pieter Wuille) c2ae5ff Fix fast-shutdown crash if genesis block was not loaded (Matt Corallo) 7ab7112 Hold cs_main while calling UpdatedBlockTip() and ui.NotifyBlockTip (Jesse Cohen) c202bc1 Update ValidationInterface() documentation to explicitly specify threading and memory model (Jesse Cohen) f499e6e Update documentation for SingleThreadedSchedulerClient() to specify the memory model (Jesse Cohen) 9a9425f Add Unit Test for SingleThreadedSchedulerClient (Jesse Cohen) 4903f31 Removing blocksizenotify abomination. (furszy) c865148 [validation] Do not actively wait for cs_main lock in `ActivateBestChain()` (furszy) a582560 docs: add reduce-memory.md (fanquake) f806584 test: move sync_blocks and sync_mempool functions to test_framework.py (random-zebra) d902128 [Test] Fix intermittent sync_blocks failures (random-zebra) a1d6c0c Move g_is_mempool_loaded into CTxMemPool::m_is_loaded (Ben Woosley) 584bbba rpc: Expose g_is_mempool_loaded via getmempoolinfo and /rest/mempool/info.json (Ben Woosley) e10c1b6 Set fee to highest possible if input is too big #fixes 2234 (dnchk) 775e532 Fixes double fade-in animation when clicking the question mark next to the 'Available' label in the top bar (Volodia) 0cf4064 Make box of PIVX address return to purple when it's empty (Volodia) Pull request description: Backport the following PRs to the 5.1 branch: * #2237 * #2247 * #2249 * #2254 * #2262 * #2284 * #2290 Missing open PRs that need to get merged to move forward with v5.1.0: * [x] #2215 * [x] #2283 * [x] #2295 * [x] #2306 When every PR get merged, we can move forward with a new release candidate for the v5.1.0 release (rc3). Then one or two weeks of testing (depending on how many testers join the efforts) and we are ready for the production release. The heart of v5.1.0 has been already battle tested this past month with the v5.1.0rc2 testing phase. The only remaining point that needs a more broadly usage/testing is #2290 that it's solving a reported issue in the recent release candidate. ACKs for top commit: random-zebra: utACK 50a5e84 Fuzzbawls: ACK 50a5e84 Tree-SHA512: 1f77e1601c51f280b3de0d1de9e0b084871701c1af35ad817760ad55ec28c02e2423494b3d189273aacd367b41ba826d63beb73b0259a1c17f019d05711d54ea
- Loading branch information
Showing
66 changed files
with
741 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Reduce Memory | ||
|
||
There are a few parameters that can be dialed down to reduce the memory usage of `pivxd`. This can be useful on embedded systems or small VPSes. | ||
|
||
## In-memory caches | ||
|
||
The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, reducing these will usually have a negative effect on performance. | ||
|
||
- `-dbcache=<n>` - the UTXO database cache size, this defaults to `450`. The unit is MiB (1024). | ||
- The minimum value for `-dbcache` is 4. | ||
- A lower `-dbcache` makes initial sync time much longer. After the initial sync, the effect is less pronounced for most use-cases, unless fast validation of blocks is important, such as for mining. | ||
|
||
## Memory pool | ||
|
||
- In PIVX Core there is a memory pool limiter which can be configured with `-maxmempool=<n>`, where `<n>` is the size in MB (1000). The default value is `300`. | ||
- The minimum value for `-maxmempool` is 5. | ||
- A lower maximum mempool size means that transactions will be evicted sooner. This will affect any uses of `pivxd` that process unconfirmed transactions. | ||
|
||
- Unused memory allocated to the mempool (default: 300MB) is shared with the UTXO cache, so when trying to reduce memory usage you should limit the mempool, with the `-maxmempool` command line argument. | ||
|
||
## Number of peers | ||
|
||
- `-maxconnections=<n>` - the maximum number of connections, this defaults to `125`. Each active connection takes up some memory. Only significant if incoming | ||
connections are enabled, otherwise the number of connections will never be more than `8`. | ||
|
||
## Thread configuration | ||
|
||
For each thread a thread stack needs to be allocated. By default on Linux, | ||
threads take up 8MiB for the thread stack on a 64-bit system, and 4MiB in a | ||
32-bit system. | ||
|
||
- `-par=<n>` - the number of script verification threads, defaults to the number of cores in the system minus one. | ||
- `-rpcthreads=<n>` - the number of threads used for processing RPC requests, defaults to `4`. | ||
|
||
## Linux specific | ||
|
||
By default, since glibc `2.10`, the C library will create up to two heap arenas per core. This is known to cause excessive memory usage in some scenarios. To avoid this make a script that sets `MALLOC_ARENA_MAX` before starting pivxd: | ||
|
||
```bash | ||
#!/usr/bin/env bash | ||
export MALLOC_ARENA_MAX=1 | ||
pivxd | ||
``` | ||
|
||
The behavior was introduced to increase CPU locality of allocated memory and performance with concurrent allocation, so this setting could in theory reduce performance. However, in PIVX Core very little parallel allocation happens, so the impact is expected to be small or absent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.