Skip to content

Multiple fixes for failing tests#3410

Merged
codablock merged 11 commits into
dashpay:developfrom
codablock:pr_fix_tests
Apr 14, 2020
Merged

Multiple fixes for failing tests#3410
codablock merged 11 commits into
dashpay:developfrom
codablock:pr_fix_tests

Conversation

@codablock

@codablock codablock commented Apr 12, 2020

Copy link
Copy Markdown

This includes multiple fixes to make tests pass. This also required to backport bitcoin#13298 and bitcoin#17243 so that bump_mocktim also has an effect of the trickle logic. bitcoin#15324 had to be backported to fix unit tests compilation.

This PR is currently based on #3409 and I'll rebase after it got merged.

Comment thread test/functional/test_framework/test_framework.py Outdated
codablock and others added 4 commits April 14, 2020 13:32
… MN connections

fMasternode connections don't even relay anything anymore.
…g connections to hide tx time

d45b344 Bucket for inbound when scheduling invs to hide tx time (Gleb)

Pull request description:

  It has been brought up to my attention that current random delays mechanism (originally intended to obfuscate transaction metadata) allows to easily estimate the time a transaction was received by a node.

  It may be done by connecting multiple observer nodes to the same node. Each of those nodes will generate its own schedule of delays. Combined metadata regarding those events from different sources allows an observer to estimate transaction time.

  After this patch a spy won't gain additional information by just creating multiple connections to a target.

Tree-SHA512: c71dae5ff350b614cb40a8e201fd0562d3e03e3e72a5099718cd451f0d84c66d5e52bbaf0d5b4b75137514c8efdedcc6ef4df90142b360153f04ad0721545ab1
…kable time

1a8f0d5 [tools] update nNextInvSend to use mockable time (Amiti Uttarwar)
4de6303 [tools] add PoissonNextSend method that returns mockable time (Amiti Uttarwar)

Pull request description:

  Introduce a Poisson helper method that wraps the existing method to return `std::chrono::duration` type, which is mockable.

  Needed for bitcoin#16698.

ACKs for top commit:
  ajtowns:
    ACK 1a8f0d5
  MarcoFalke:
    re-ACK 1a8f0d5
  naumenkogs:
    ACK 1a8f0d5, and let's merge it and come back to it later.

Tree-SHA512: 7e2325d7c55fc0b4357cb86b83e0c218ba269f678c1786342d8bc380bfd9696373bc24ff124b9ff17a6e761c62b2b44ff5247c3911e2afdc7cc5c20417e8290b
codablock and others added 7 commits April 14, 2020 15:16
This seems to have been wrong already in the backported PR.
And remove manual calls accordingly.
fae169c test: Make bloom tests deterministic (MarcoFalke)

Pull request description:

  non-deterministic tests are useless, since a failing test could not be reproduced unless the seed is known.

Tree-SHA512: 4f634ff0c6adf663444f1ac504f6dbceaa46b78d697b840531977ba30006453ac559d5c21cc3eaef6d92b87d46008a34b0db6331ea3318001987fcfaec634acf
When we bumped before the call, it sometimes happened that in the following
loop one of the early nodes which got the network reactivated tried to
connect to one of the latter nodes with still disabled network. Such
connection attempts were dropped by the latter nodes and the retry
throttling then prevented the connection to be retried later. Doing the
bumping after setnetworkactive(True) should fix this.

@UdjinM6 UdjinM6 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

utACK

@codablock codablock merged commit d032d02 into dashpay:develop Apr 14, 2020
@codablock codablock deleted the pr_fix_tests branch April 14, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants