-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: bury v20 fork - fire up test chains by first block - 4/n #6225
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
Conversation
f8a4893 to
318df9e
Compare
| if (!DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_V20)) { | ||
| return state.Invalid(TxValidationResult::TX_CONSENSUS, "mnhf-before-v20"); | ||
| } |
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.
dcab562: a devnet or something like that could have a mnhf tx get mined before v20 is active though right?
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.
dcab562 it would not affect mainnet, testnet, indeed.
UPD: dropped
| if (!DeploymentActiveAfter(pindexPrev, consensusParams, Consensus::DEPLOYMENT_V20)) { | ||
| return state.Invalid(TxValidationResult::TX_CONSENSUS, "assetlocks-before-v20"); | ||
| } |
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.
4afc853: I mean, this is kinda a breaking change no? Wouldn't affect mainnet but...
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.
4afc853 it would not affect mainnet, testnet, indeed.
UPD: dropped
| if (!Params().IsValidMNActivation(mnhfTx.signal.versionBit, pindexPrev->GetMedianTimePast())) { | ||
| return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-mnhf-non-ehf"); | ||
| } |
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.
6c69808: could probably be it's own distinct PR?
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.
could not, because it's impossible (or very hard) to implement this functionality in functional tests within v20 buried.
src/evo/mnhftx.cpp
Outdated
| signals.insert({versionBit, mined_height}); | ||
| } | ||
|
|
||
| signals.insert({versionBit, mined_height}); |
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.
3cd7a42: how's this duplicated?
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.
see lines 222...225
This condition already checked for each signal in new_signals above and if it fails for any signal this function will return std::nullopt as a result
| consensus.DIP0024QuorumsHeight = 1738698; // 000000000000001aa25181e4c466e593992c98f9eb21c69ee757b8bb0af50244 | ||
| consensus.V19Height = 1899072; // 0000000000000015e32e73052d663626327004c81c5c22cb8b42c361015c0eae | ||
| consensus.MinBIP9WarningHeight = 1899072 + 2016; // V19 activation height + miner confirmation window | ||
| consensus.V20Height = 1987776; // 000000000000001bf41cff06b76780050682ca29e61a91c391893d4745579777 |
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.
what's the minimum set of commits needed in this PR to merge in 47def13?
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.
test/functional/feature_block.py
Outdated
| # Must set '-dip3params=2000:2000' to create pre-dip3 blocks only | ||
| self.extra_args = [[ | ||
| '-dip3params=2000:2000', | ||
| '-dip3params=2000:2000', # Must set '-dip3params=2000:2000' to create pre-dip3 blocks only |
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.
why not use testactivationheight?
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.
it's out of scope this PR, I will do that in PR where I set DIP3 activation from block 1
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.
clang-diff format is not happy
…locks during re-index
Relevant crash dump:
Assertion failed: detected inconsistent lock order for 'cs_main' in node/blockstorage.cpp:778 (in thread 'main'), details in debug log.
Posix Signal: Aborted
0#: (0x62349D233974) stl_vector.h:115 - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_copy_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data const&)
1#: (0x62349D233974) stl_vector.h:127 - std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data::_M_swap_data(std::_Vector_base<unsigned long, std::allocator<unsigned long> >::_Vector_impl_data&)
2#: (0x62349D233974) stl_vector.h:1959 - std::vector<unsigned long, std::allocator<unsigned long> >::_M_move_assign(std::vector<unsigned long, std::allocator<unsigned long> >&&, std::integral_constant<bool, true>)
3#: (0x62349D233974) stl_vector.h:768 - std::vector<unsigned long, std::allocator<unsigned long> >::operator=(std::vector<unsigned long, std::allocator<unsigned long> >&&)
4#: (0x62349D233974) stacktraces.cpp:777 - HandlePosixSignal
5#: (0x71E435442990) libc_sigaction.c - ???
6#: (0x71E435499A1B) pthread_kill.c:44 - __pthread_kill_implementation
7#: (0x71E435499A1B) pthread_kill.c:78 - __pthread_kill_internal
8#: (0x71E435499A1B) pthread_kill.c:89 - __GI___pthread_kill
9#: (0x71E4354428E6) raise.c:27 - __GI_raise
10#: (0x71E4354268B7) abort.c:81 - __GI_abort
11#: (0x62349D239956) basic_string.h:390 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check_length(unsigned long, unsigned long, char const*) const
12#: (0x62349D239956) basic_string.h:1461 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)
13#: (0x62349D239956) basic_string.h:1365 - std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(char const*)
14#: (0x62349D239956) sync.cpp:114 - potential_deadlock_detected
15#: (0x62349D2403DE) sync.cpp:188 - push_lock<std::recursive_mutex>
16#: (0x62349D2403DE) sync.cpp:212 - void EnterCritical<std::recursive_mutex>(char const*, char const*, int, std::recursive_mutex*, bool)
17#: (0x62349CAA8B72) unique_lock.h:150 - std::unique_lock<std::recursive_mutex>::try_lock()
18#: (0x62349CAA8B72) sync.h:162 - UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::Enter(char const*, char const*, int)
19#: (0x62349CAA8B72) sync.h:183 - UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::UniqueLock(AnnotatedMixin<std::recursive_mutex>&, char const*, char const*, int, bool)
20#: (0x62349CE349CD) chain.h:225 - CBlockIndex::GetBlockPos() const
21#: (0x62349CE349CD) blockstorage.cpp:778 - operator()
22#: (0x62349CE349CD) blockstorage.cpp:778 - ReadBlockFromDisk(CBlock&, CBlockIndex const*, Consensus::Params const&)
23#: (0x62349D102F82) mnhftx.cpp:284 - CMNHFManager::GetForBlock(CBlockIndex const*)
24#: (0x62349D103E9B) mnhftx.cpp:58 - CMNHFManager::GetSignalsStage(CBlockIndex const*)
25#: (0x62349D07F0E9) versionbits.cpp:222 - SignalHeight
26#: (0x62349D07F90D) versionbits.cpp:37 - AbstractThresholdConditionChecker::GetStateFor(CBlockIndex const*, Consensus::Params const&, std::map<CBlockIndex const*, ThresholdState, std::less<CBlockIndex const*>, std::allocator<std::pair<CBlockIndex const* const, ThresholdState> > >&) const
27#: (0x62349D080D93) sync.h:199 - UniqueLock<AnnotatedMixin<std::mutex>, std::unique_lock<std::mutex> >::~UniqueLock()
28#: (0x62349D080D93) versionbits.cpp:260 - VersionBitsCache::State(CBlockIndex const*, Consensus::Params const&, Consensus::DeploymentPos)
29#: (0x62349CC06C73) deterministicmns.cpp:227 - CDeterministicMNList::GetProjectedMNPayees(gsl::not_null<CBlockIndex const* const>, int) const
Aborted (core dumped)
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.
generally LGMT; time for Udjin to review. I'll wanna reindex it, but I'll do that later
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.
reindexed with -assumevalid=0 on both mainnet and testnet, no issues
ACK 2381255
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 2381255
…y first block - 7/n 906c2d7 refactor: add annotation gsl::not_null for ConstructCreditPool (Konstantin Akimov) f1905ca fix: intermittent missing of PoSe ban in feature_llmq_simplepose.py (Konstantin Akimov) cf84dff fix: bump time for all nodes during mine_quorum in feature_llmq_rotation.py test (Konstantin Akimov) efd4701 fix: intermittent error for feature_llmq_simplepose due to rotating quorums (Konstantin Akimov) 2bafadf feat: put DIP0024 activation to block 1 on RegTest (Konstantin Akimov) 632c4c4 feat: re-bury DIP0024 with new height when quorums actually appeared (Konstantin Akimov) 343c74b fix: intermittent error in feature_index_prune due to DKG influence (Konstantin Akimov) de821b9 refactor: remove command line argument -bip147height, -dip8params (Konstantin Akimov) d8ce0a7 docs: updated comment for DIP0003 activation on RegTest (Konstantin Akimov) 4dafec8 fix: add check that DIP0003 activated before retrieving CbTx for CreditPool (Konstantin Akimov) 26e9813 fix: assertion in Credit Pool validation during connecting blocks (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented This PR is 7th in the achieving ultimate goal to activate old forks from block 1. It helps to run unit and functional tests faster; it helps for platform's dev-environment to start faster. ## What was done? Prior work: #6187, #6189, #6214, #6225, #6269, #6275 This PR: - simplify DIP0024 activation and activate it from block 1 at RegTest - removes command lines arguments: -bip147height, -dip8params - fixed intermittent errors in feature_index_prune.py and feature_llmq_simplepose.py - fix assertion crash on Regtest if using strange combination of -testactivationheight and -dip3params ## How Has This Been Tested? Run unit, functional tests. ## Breaking Changes [regtest only] -dip8params, -bip147height are removed. ## 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 - [x] I have assigned this pull request to a milestone ACKs for top commit: UdjinM6: utACK 906c2d7 PastaPastaPasta: utACK 906c2d7 Tree-SHA512: fab8a9bc03bb7f220c19dd952a03f8fec0b6ef1362d7308eb77c90e0ba814a241bb2bf36beccf78bb285ede1b6d85ec52fa19b3729ac9b643b420d13fbb63b47
Issue being fixed or feature implemented
V20 is activated on mainnet: time to bury it!
#6186
What was done?
Hard-fork v20 is buried and it requires to implement multiple fixes, simplifications, refactoring:
CMNHFManager::GetSignalsStageHow Has This Been Tested?
Some unit and functional tests to succeed.
Done reindex (just in case):
Breaking Changes
N/A
Checklist: