-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
backport bitcoin#16509 and add devnet test #3946
Conversation
… "regtest" faf3683 test: Avoid hardcoding the chain name in combine_logs (MarcoFalke) fa8a1d7 test: Adapt test framework for chains other than "regtest" (MarcoFalke) 68f5466 test: Fix “local variable 'e' is assigned to but never used” (Ben Woosley) Pull request description: This is required for various work in progress: * testchains bitcoin#8994 * signet bitcoin#16411 * some of my locally written tests While it will be unused in the master branch as of now, it will make all of those pull requests shorter. Thus review for non-regtest tests can focus on the actual changes and not some test framework changes. ACKs for top commit: jonatack: ACK faf3683, ran tests and reviewed the code. Tree-SHA512: 35add66c12cab68f2fac8f7c7d47c604d3f24eae9336ff78f83e2c92b3dc08a25e7f4217199bac5393dd3fb72f945bba9c001d6fbb8efd298c88858075fcb3d6
I am gonna close the PR as I wanna change the code to work with devnets |
If you are going to submit another one, pls add Dash specific code as a separate commit on top of the backport to make it easier to review (reopening this PR with a changed title and marking it as "draft' for now would be ok too btw). |
Agree with Udjin, would be good to mark this as a draft if you want to do the devnet stuff before we review, then add that as a separate commit |
Ok I will reopen it and add draft to the title, I will probably work on it for a few days then do like git fixup and will rename the "Dash specific code" commit edit: I didn't know you could change it to a draft xD, just did that |
ba1e1d4
to
6f5c130
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, seems to work. See comments
2ef9b45
to
0f6f62e
Compare
So you wanted me to add that? I did see that PR and did see it would make the original backport I wanted more complete but I didn't add it because I didn't need it for what I wanted to do. I will keep that in mind for the future, as I guess that PR does make the one I was backporting more whole. So next time I will keep that in mind well backporting, thanks for the insight. |
c76a0de
to
ef37c2f
Compare
Ah, I see. It makes sense I guess for some complicated set of backports with lots of things toughed at once but this one is relatively straightforward imo and we shouldn't leave tests in some inconsistent state in general. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Oh ok. I will keep that in mind. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…t' in almost all current tests, revert one TODO while at it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, force-push clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
This reverts commit e197f97 Signed-off-by: pasta <pasta@dashboost.org>
* Merge bitcoin#16509: test: Adapt test framework for chains other than "regtest" faf3683 test: Avoid hardcoding the chain name in combine_logs (MarcoFalke) fa8a1d7 test: Adapt test framework for chains other than "regtest" (MarcoFalke) 68f5466 test: Fix “local variable 'e' is assigned to but never used” (Ben Woosley) Pull request description: This is required for various work in progress: * testchains bitcoin#8994 * signet bitcoin#16411 * some of my locally written tests While it will be unused in the master branch as of now, it will make all of those pull requests shorter. Thus review for non-regtest tests can focus on the actual changes and not some test framework changes. ACKs for top commit: jonatack: ACK faf3683, ran tests and reviewed the code. Tree-SHA512: 35add66c12cab68f2fac8f7c7d47c604d3f24eae9336ff78f83e2c92b3dc08a25e7f4217199bac5393dd3fb72f945bba9c001d6fbb8efd298c88858075fcb3d6 * Add devnet support for tests * test: make sure devnet can connect to each other and start * Partial merge bitcoin#16681: Tests: Use self.chain instead of 'regtest' in almost all current tests, revert one TODO while at it Co-authored-by: MarcoFalke <falke.marco@gmail.com> Co-authored-by: Jorge Timón <jtimon@jtimon.cc>
, bitcoin#19972, bitcoin#20724, bitcoin#19884, bitcoin#21165, bitcoin#20721, bitcoin#21254, partial bitcoin#19829 (networking backports) 0d90465 merge bitcoin#21254: Avoid connecting to real network when running tests (Kittywhiskers Van Gogh) 2f672bd merge bitcoin#20721: Move ping data to net_processing (Kittywhiskers Van Gogh) 0d46acb merge bitcoin#21165: Use mocktime in test_seed_peers (Kittywhiskers Van Gogh) 8f40769 merge bitcoin#19884: No delay in adding fixed seeds if -dnsseed=0 and peers.dat is empty (Kittywhiskers Van Gogh) 446076d test: add missing `dnsseed=0` in configuration (Kittywhiskers Van Gogh) 081d8db mempool: remove stray boost::optional usage (Kittywhiskers Van Gogh) bcd383c merge bitcoin#20724: Cleanup of -debug=net log messages (Kittywhiskers Van Gogh) 8c63868 merge bitcoin#19972: Add fuzzing harness for node eviction logic (Kittywhiskers Van Gogh) 18f2dc0 partial bitcoin#19829: Move block inventory state to net_processing (Kittywhiskers Van Gogh) ec77bd3 net: move nLast{Block,TX}Time to match upstream location (Kittywhiskers Van Gogh) f635e4a merge bitcoin#20624: Remove nStartingHeight check from block relay (Kittywhiskers Van Gogh) 9f1a3e5 merge bitcoin#20477: Add unit testing of node eviction logic (Kittywhiskers Van Gogh) 2d838a6 merge bitcoin#20146: Send post-verack handshake messages at most once (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * [bitcoin#19884](bitcoin#19884) doesn't seem to play nice on its own and necessitated two more backports (namely [bitcoin#21165](bitcoin#21165) and [bitcoin#21254](bitcoin#21254)) before it did. * Trying to find why that is has been time consuming but there doesn't seem to be a concrete answer. If running the daemon normally (`dashd --regtest --dnsseed=1`), the functionality behaves as expected but the test still fails. * The closest explanation is that our OOO backports with relation to mocking time could explain why it isn't working as expected due to debug statements I added that always shown the time delta between each "enough time has passed" check was 0 seconds even when the log was advancing forward in time. * The usage of `dnsseed=0` stems from [bitcoin#16551](bitcoin#16551) (link to diff in commit comment), a backport that was skipped due to complexity. Though, some aspects of the PR have made it with [dash#3946](#3946). * [bitcoin#19829](bitcoin#19829) does away with `CConnman::ForEachNode` usage in `PeerManagerImpl::UpdatedBlockTip` ([source](https://github.com/bitcoin/bitcoin/pull/19829/files#diff-6875de769e90cec84d2e8a9c1b962cdbcda44d870d42e4215827e599e11e90e3R1318-R1328)). Dash cannot do the same and continues to use `ForEachNode` as we use the `CNode::CanRelay` check, which is not accessible through the `Peer` struct. * It would be valuable to find values that are Dash-specific (like `m_masternode_connection`) and migrate them to `Peer` to avoid Dash-specific patches and closer alignment with upstream. ## Breaking Changes Potential change in behaviour in the GUI and RPC. In RPC, `getpeerinfo` will now display `pingwait` and `startingheight` if `fStateStats` is true (earlier behaviour was unconditional). `startingheight` has been placed below `banscore` (earlier behaviour placed it above). In the GUI (Qt), `peerHeight` and `peerPingWait` are subject to similar conditionality as mentioned earlier. No changes in protocol or consensus. Changes are primarily related to refactoring, cleaning up, improving networking code and adding a new flag (`-fixedseeds`). ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: re-utACK 0d90465 Tree-SHA512: 79eedf47387a8715fc9f20c6bc051d4eae832266454445043e1478dc36daafc1679e002623917af43cf923735217622e3985f664123a1de23fadfdfece7e9b6b
Backport of bitcoin#16509
Allows tests to use networks other then regtest so we can add tests for devnet and solve issue #3550 Which I will probably make a PR for later today
This PR also adds a test to solve #3550