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

tests: fix feature_pruning.py #3967

Merged
merged 2 commits into from
Feb 1, 2021

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jan 23, 2021

Requires #3963 #3965 #3966 if you want to test it locally (we do not run feature_pruning.py in CI because it's too heavy atm).

@UdjinM6 UdjinM6 added this to the 17 milestone Jan 23, 2021
@UdjinM6 UdjinM6 marked this pull request as ready for review January 23, 2021 15:07
Copy link

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

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

ACK, took ~1h25m here :)

@UdjinM6
Copy link
Author

UdjinM6 commented Jan 27, 2021

ACK, took ~1h25m here :)

Oh, wow, that's a lot... Thanks for testing! 👍

And btw...

TEST               | STATUS    | DURATION

feature_pruning.py | ✓ Passed  | 1816 s

ALL                | ✓ Passed  | 1816 s (accumulated) 
Runtime: 1816 s

Screenshot 2021-01-27 at 18 03 22

@xdustinface
Copy link

feature_pruning.py | ✓ Passed | 1816 s

Hmm how that... sure you didn't cheat? 😆

image

2021-01-27T08:39:30.777000Z TestFramework (INFO): Initializing test directory /var/folders/6b/sb101ygd0_xfxmbc_ljxybr80000gn/T/test29ta_egy
Warning: You are starting with governance validation disabled.
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
Warning: You are starting with governance validation disabled.
2021-01-27T08:39:32.830000Z TestFramework (INFO): Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours)
2021-01-27T08:39:32.830000Z TestFramework (INFO): Mining a big blockchain of 995 blocks
2021-01-27T09:11:29.548000Z TestFramework (INFO): Check that we haven't started pruning yet because we're below PruneAfterHeight
2021-01-27T09:11:29.549000Z TestFramework (INFO): Success
2021-01-27T09:11:29.550000Z TestFramework (INFO): Though we're already using more than 550MiB, current usage: 590
2021-01-27T09:11:29.550000Z TestFramework (INFO): Mining 25 more blocks should cause the first block file to be pruned
2021-01-27T09:12:37.971000Z TestFramework (INFO): Success
2021-01-27T09:12:37.972000Z TestFramework (INFO): Usage should be below target: 479
2021-01-27T09:12:37.972000Z TestFramework (INFO): Check that we'll exceed disk space target if we have a very high stale block rate
2021-01-27T09:12:37.972000Z TestFramework (INFO): Mine 24 (stale) blocks on Node 1, followed by 25 (main chain) block reorg from Node 0, for 12 rounds
2021-01-27T09:53:47.848000Z TestFramework (INFO): Usage can be over target because of high stale rate: 638
2021-01-27T09:53:47.925000Z TestFramework (INFO): Check that we can survive a 288 block reorg still
2021-01-27T09:53:56.464000Z TestFramework (INFO): Current block height: 1320
2021-01-27T09:53:56.490000Z TestFramework (INFO): Invalidating block 71861200f14bcf59bee66f7d3ea09c10c769193487935ba8001dc44476eadbbf at height 1033
2021-01-27T09:54:37.946000Z TestFramework (INFO): New best height: 1032
2021-01-27T09:54:44.815000Z TestFramework (INFO): Generating new longer chain of 300 more blocks
2021-01-27T09:55:10.581000Z TestFramework (INFO): Reconnect nodes
2021-01-27T09:55:40.935000Z TestFramework (INFO): Verify height on node 2: 1332
2021-01-27T09:55:40.937000Z TestFramework (INFO): Usage possibly still high bc of stale blocks in block files: 638
2021-01-27T09:55:40.937000Z TestFramework (INFO): Mine 220 more blocks so we have requisite history (some blocks will be big and cause pruning of previous chain)
2021-01-27T09:58:13.606000Z TestFramework (INFO): Usage should be below target: 495
2021-01-27T09:58:13.606000Z TestFramework (INFO): Test that we can rerequest a block we previously pruned if needed for a reorg
2021-01-27T09:58:13.609000Z TestFramework (INFO): Will need to redownload block 1033
2021-01-27T09:58:21.277000Z TestFramework (INFO): Rewind node 0 to prev main chain to mine longer chain to trigger redownload. Blocks needed: 233
2021-01-27T10:01:00.582000Z TestFramework (INFO): Verify node 2 reorged back to the main chain, some blocks of which it had to redownload
2021-01-27T10:01:50.918000Z TestFramework (INFO): Test manual pruning with block indices
Warning: You are starting with governance validation disabled.
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
2021-01-27T10:02:11.226000Z TestFramework (INFO): Success
2021-01-27T10:02:11.226000Z TestFramework (INFO): Test manual pruning with timestamps
Warning: You are starting with governance validation disabled.
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
2021-01-27T10:02:31.985000Z TestFramework (INFO): Success
2021-01-27T10:02:31.985000Z TestFramework (INFO): Test wallet re-scan
2021-01-27T10:02:31.985000Z TestFramework (INFO): Stop and start pruning node to trigger wallet rescan
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
2021-01-27T10:02:33.326000Z TestFramework (INFO): Success
2021-01-27T10:02:33.327000Z TestFramework (INFO): Syncing node 5 to test wallet
Warning: You are starting with governance validation disabled. This is expected because you are running a pruned node.
2021-01-27T10:06:13.955000Z TestFramework (INFO): Success
2021-01-27T10:06:13.955000Z TestFramework (INFO): Done
2021-01-27T10:06:13.956000Z TestFramework (INFO): Stopping nodes
2021-01-27T10:06:21.217000Z TestFramework (INFO): Cleaning up /var/folders/6b/sb101ygd0_xfxmbc_ljxybr80000gn/T/test29ta_egy on exit
2021-01-27T10:06:21.217000Z TestFramework (INFO): Tests successful

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

Wasn't able to test locally, but looks fine, if not we can fix later. After all, it's currently broken :)

utACK

@PastaPastaPasta PastaPastaPasta merged commit 2493d85 into dashpay:develop Feb 1, 2021
@UdjinM6 UdjinM6 deleted the fix_prune_test branch July 1, 2021 21:56
gades pushed a commit to cosanta/cosanta-core that referenced this pull request May 12, 2022
* tests: postpone dip3 and dip8 activation in feature_pruning.py

* tests: Mine one block before restart to avoid automatic recovery from forks
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.

3 participants