Skip to content

Conversation

@furszy
Copy link

@furszy furszy commented Jun 8, 2020

Coming from bitcoin#6918 .

Changes the -maxsigcachesize argument from entries to megabytes
Change the default to 40 MiB (as opposed to ~10 MiB before), corresponding to over 500000 entries on 64-bit systems.
Store salted SHA256 hashes in the cache, rather than full entries.
Switch implementation from std::set to boost::unordered_set (smaller and faster)
Remove cache entries after having been validated inside a block, to keep the cache fresh.


This is the first step towards an up-to-date sigcache. Next one will be to back port the CuckooCache implementation.

@furszy furszy self-assigned this Jun 8, 2020
@random-zebra random-zebra added this to the 4.2.0 milestone Jun 8, 2020
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code ACK

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 6706c20

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 6706c20

@furszy furszy merged commit 7e65a82 into PIVX-Project:master Jun 18, 2020
random-zebra added a commit that referenced this pull request Jul 3, 2020
2749d0a build: Include cuckoocache header in Makefile (furszy)
791a51f Deduplicate SignatureCacheHasher (Jeremy Rubin)
7a5918a Decrease testcase sizes in cuckoocache tests (Jeremy Rubin)
8ef3cc9 Trivial: fix comments referencing AppInit2 (Marko Bencun)
f21b122 Ensure `-maxsigcachesize` is in valid range (John Newbery)
464b922 Add unit tests for the CuckooCache (Jeremy Rubin)
77e3b1e Add CuckooCache implementation and replace the sigcache map_type with it (Jeremy Rubin)

Pull request description:

  Built on top of #1668.

  Part of the back port series to get us closer to upstream's sigcache current state.

  The main ones are:

  * bitcoin#8895
  * bitcoin#9480
  * bitcoin#9393

ACKs for top commit:
  random-zebra:
    Really nice backport. Tested ACK 2749d0a
  Fuzzbawls:
    utACK 2749d0a

Tree-SHA512: 22f760edc928790f29a7bbd6e907a561b7ad266b6cc5e85f207206e0f39ae3e4328ec57c0be772c96036a15559b13f6956bea5762cace10f3a560090aeb6758b
@furszy furszy deleted the 2020_6918_backport branch November 29, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants