forked from ElementsProject/elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reduce cache sizes so that default maxsigcache size is same as Bitcoin
Bitcoin allocates 32M for signature caching by default, split between a signature cache and a script validity cache (see Core #10192). Since 0.14 we have added an additional 32M for rangeproof caching *and* an additional 32M for surjectionproof caching. These cache entries cost a bit over 32 bytes, so these are room for a million entries....or 4Gb of rangeproofs and 300M of surjection proofs. Presumably we did not intend to triple memory usage relative to Core to deal with some champagne problem in which our mempool is overfilled ten times with pure rangeproofs. So put the total default cache size back to 32M. This should have no performance hit under realistic circumstances and should reduce CI OOM failures. On my system we now use 50M rather than 110M during the fedpeg test; we still use 18M that Core does not by having three additional global secp contexts (one in blind.cpp, one in pegins.cpp, one in confidential_validation.cpp) but we can settle that in a future commit.
- Loading branch information
Showing
2 changed files
with
8 additions
and
8 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