Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txscript: Proactively evict SigCache entries. #2358

Merged
merged 3 commits into from
Sep 24, 2020

Commits on Sep 24, 2020

  1. txscript: Add shortTxHash.

    This defines a shortTxHash method that generates a short 64-bit hash
    from the standard 128-bit hash.  It accomplishes this by using the
    SipHash-2-4 hash function.
    
    This is being introduced to track the transaction associated with a
    signature cache entry at a reduced memory overhead.
    rstaudt2 committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    9f621e8 View commit details
    Browse the repository at this point in the history
  2. txscript: Store short tx hash in sigcache.

    This adds a uint64 short transaction hash to sigcache entries.  This can
    be used to proactively evict entries from the sigcache based on the
    transaction that they are associated with.
    rstaudt2 committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    602f4a2 View commit details
    Browse the repository at this point in the history
  3. txscript: Proactively evict SigCache entries.

    This adds functionality to proactively evict SigCache entries when they
    are nearly guaranteed to no longer be useful.  It accomplishes this by
    evicting entries related to transactions in the block that is 2 levels
    deep from a newly processed block.
    
    Proactively evicting entries reduces the likelihood of the SigCache
    reaching maximum capacity quickly and then relying on random eviction,
    which may randomly evict entries that are still useful.
    rstaudt2 committed Sep 24, 2020
    Configuration menu
    Copy the full SHA
    c8e946d View commit details
    Browse the repository at this point in the history