-
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
Allow re-signing of IS locks when performing retroactive signing #3219
Conversation
I pushed a fix for the failures on Gitlab. I have a loop of this test running since an hour and it didn't fail so far. @UdjinM6 You came to late with your changes :P But I'm looking into it now, looks like you found a better way to simulate mempool inconsistencies |
@UdjinM6 fyi, your fix is running on my machine since about 45 minutes without failure. I tend to throw away my fix and use yours instead |
This allows use of mocktime in tests.
6bacaf1
to
e5c0a99
Compare
Rebased on develop after merging in the other small fixes |
7de332e
to
7fcb76a
Compare
I cleaned up and squashed the PR so that it doesn't contain all the "fix" commits |
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.
LGTM :)
utACK
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to DashTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to DashTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5
…ttack vector) * commit '2ae1ce4800a22c717b67aea97680bbe1eeffa07b': [v0.14.0.x] Update release notes with notable changes and changelog (dashpay#3229) [v0.14.0.x] Make sure mempool txes are properly processed by CChainLocksHandler despite node restarts (dashpay#3230) [v0.14.0.x] Bump version and prepare release notes (dashpay#3228) More fixes in llmq-is-retroactive tests Make llmq-is-retroactive test compatible with 0.14.0.x Make wait_for_xxx methods compatible with 0.14.0.x Allow re-signing of IS locks when performing retroactive signing (dashpay#3219) Add wait_for_xxx methods as found in develop More/better logging for InstantSend Tests: Fix the way nodes are connected to each other in setup_network/start_masternodes (dashpay#3221) More fixes related to extra_args Tests: Allow specifying different cmd-line params for each masternode (dashpay#3222) Don't join thread in CQuorum::~CQuorum when called from within the thread (dashpay#3223) Merge bitcoin#12392: Fix ignoring tx data requests when fPauseSend is set on a peer (dashpay#3225) # Conflicts: # configure.ac # doc/man/biblepay-cli.1 # doc/man/biblepay-qt.1 # doc/man/biblepay-tx.1 # doc/man/biblepayd.1 # doc/release-notes.md # qa/pull-tester/rpc-tests.py # qa/rpc-tests/test_framework/test_framework.py # src/clientversion.h
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to DashTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to IonTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5 Signed-off-by: cevap <dev@i2pmail.org>
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to IonTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5 Signed-off-by: cevap <dev@i2pmail.org>
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to IonTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5 Signed-off-by: cevap <dev@i2pmail.org>
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to DashTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5
…hpay#3219) * Implement re-signing of InstantSend inputs when TXs come in via blocks * Use GetAdjustedTime instead of GetTimeMillis in CSigSharesManager This allows use of mocktime in tests. * Expose verifiedProRegTxHash in getpeerinfo and implement wait_for_mnauth * Allow to wait for IS and CL to NOT happen * Bump timeout for wait_for_instantlock * Implement tests for retroactive signing of IS and CLs * Add wait_for_tx function to DashTestFramework * Add -whitelist=127.0.0.1 to node0 * Use node3 for isolated block generation * Don't test for non-receival of TXs on node4/node5
This PR implements re-signing of IS locks, which however is only performed when a non-locked TX appears in a new block. This is required to make retroactive signing work in cases where parts of the network has already seen the TX via mempool and other parts only see it first via a block.
In such cases, the first part of the network (via mempool) might have run into a timeout for the signing sessions, which causes the session to never be completed even if the other part of the network does the signing when it finally receives the TX via a block.
With this PR, the first part of the network will re-sign the TX when necessary at the time it receives the block. This ensures that all necessary signature shares can be collected and the IS lock be formed.
This PR also implements a set of tests for retroactive signing. The tests performed in
test_single_node_session_timeout
are the ones that test the new behavior. All other tests are testing already existing behavior.