Skip to content

FastRandomContext improvements and switch to ChaCha20#4987

Closed
nuttycom wants to merge 10 commits into
zcash:backport/8173-siphash_node_evictionfrom
nuttycom:backport/9792-fastrandom_chacha20
Closed

FastRandomContext improvements and switch to ChaCha20#4987
nuttycom wants to merge 10 commits into
zcash:backport/8173-siphash_node_evictionfrom
nuttycom:backport/9792-fastrandom_chacha20

Conversation

@nuttycom nuttycom added C-upstream-port Category: Changes that are ported from the Bitcoin Core codebase. A-alert-system Area: The zcashd alert system labels Feb 16, 2021
@nuttycom nuttycom self-assigned this Feb 16, 2021
@str4d
str4d changed the base branch from master to backport/8173-siphash_node_eviction February 16, 2021 12:21
@nuttycom
nuttycom force-pushed the backport/8173-siphash_node_eviction branch from 7d71a23 to eb526ea Compare February 17, 2021 01:07
kazcw and others added 7 commits February 16, 2021 18:11
Fixes a bug in which pop_back did not call the deleted item's destructor.

Using the most general erase() implementation to implement all the others
prevents similar bugs because the coupling between deallocation and destructor
invocation only needs to be maintained in one place.
Also reduces duplication of complex memmove logic.

(cherry picked from commit 1e2c29f)
- add a swap operation to prevector tests (fails due to broken prevector::swap)
- fix 2 prevector test operation conditions that were impossible

(cherry picked from commit 4ed41a2)
swap was using an incorrect condition to determine when to apply an optimization
(not swapping the full direct[] when swapping two indirect prevectors).

Rather than correct the optimization I'm removing it for simplicity. Removing
this optimization minutely improves performance in the typical (currently only)
usage of member swap(), which is swapping with a freshly value-initialized
object.

(cherry picked from commit a7af72a)
(cherry picked from commit e04326f)
@nuttycom
nuttycom force-pushed the backport/9792-fastrandom_chacha20 branch from 19c3433 to b2d985e Compare February 17, 2021 01:12
@nuttycom
nuttycom force-pushed the backport/8173-siphash_node_eviction branch from eb526ea to 2f840b5 Compare February 17, 2021 15:07
@zkbot

zkbot commented Feb 17, 2021

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #4985) made this pull request unmergeable. Please resolve the merge conflicts.

@str4d str4d closed this Feb 17, 2021
@str4d
str4d deleted the branch zcash:backport/8173-siphash_node_eviction February 17, 2021 17:46
@str4d

str4d commented Feb 17, 2021

Copy link
Copy Markdown
Contributor

Ugh, I do not understand GitHub's logic for closing PRs vs changing their base. It definitely triggers when the base branch is deleted, but maybe only PRs created from branches on this repo can have their bases changed?

@str4d str4d reopened this Feb 17, 2021
@nuttycom nuttycom closed this Feb 17, 2021
@nuttycom
nuttycom deleted the branch zcash:backport/8173-siphash_node_eviction February 17, 2021 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-alert-system Area: The zcashd alert system C-upstream-port Category: Changes that are ported from the Bitcoin Core codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants