Skip to content

Conversation

@codablock
Copy link

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.

@codablock codablock added this to the 15 milestone Dec 3, 2019
@UdjinM6
Copy link

UdjinM6 commented Dec 5, 2019

It looks like a similar patch with an early reconnection would have to be added to other places after #3221 but that would be incompatible with the logic in these tests I think. So I have a new idea now :) pls see #3222 + 253ba29853714c7143a9ddbc973288dbe8dc1750 + e514ad16c0b0078683f5a716334867bf8628fddf (it still builds on top of #3221)

@codablock
Copy link
Author

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

@codablock
Copy link
Author

@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

@codablock
Copy link
Author

Rebased on develop after merging in the other small fixes

@codablock
Copy link
Author

I cleaned up and squashed the PR so that it doesn't contain all the "fix" commits

@UdjinM6 UdjinM6 added the RPC Some notable changes to RPC params/behaviour/descriptions label Dec 5, 2019
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

LGTM :)

utACK

@UdjinM6 UdjinM6 merged commit 4c00d98 into dashpay:develop Dec 6, 2019
@codablock codablock deleted the pr_islock_resign branch December 6, 2019 09:07
codablock added a commit to codablock/dash that referenced this pull request Dec 6, 2019
…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
MIPPL pushed a commit to biblepay/biblepay that referenced this pull request Jan 1, 2020
…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
FornaxA pushed a commit to ioncoincore/ion that referenced this pull request Jul 6, 2020
…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 <[email protected]>
cryptolinux pushed a commit to cryptolinux/ion that referenced this pull request Feb 6, 2021
…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 <[email protected]>
ckti pushed a commit to ckti-gitian-ion/ion that referenced this pull request Mar 29, 2021
…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 <[email protected]>
panleone pushed a commit to panleone/PIVX that referenced this pull request Nov 15, 2024
…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
Fuzzbawls added a commit to PIVX-Project/PIVX that referenced this pull request Jan 11, 2025
a85b450 Merge pull request dashpay#3399 from codablock/pr_speedups2 (Alexander Block)
136f900 cherry-pick dashpay#2833 (Alexander Block)
d942439 Merge pull request dashpay#3389 from codablock/pr_concentrated_recovery (Alexander Block)
36790d2 cherry pick dashpay#3368 (Author Alexander Block)
dac01a9 cherry-pick dashpay#2780 (Alexander Block)
39d0ed9 cherry-pick dashpay#3367 (Alexander Block)
5084bbf Allow re-signing of IS locks when performing retroactive signing (dashpay#3219) (Alexander Block)
802c006 Only track last seen time instead of first and last seen time (dashpay#3165) (Alexander Block)
479b64b Avoid propagating InstantSend related old recovered sigs (dashpay#3145) (Alexander Block)
27fa2af cherry-pick dashpay#3117 (Pasta)
cf138e0 cherry-pick dashpay#3097 (Pasta)
23b140e Introduce getbestchainlock rpc and fix llmq-is-cl-conflicts.py (dashpay#3094) (UdjinM6)

Pull request description:

  as usual each commit backports a different PR

ACKs for top commit: a85b450
  Duddino:
    utACK a85b450
  Liquid369:
    uTACK a85b450
  Fuzzbawls:
    ACK a85b450

Tree-SHA512: e9024d180888d8a6cc300ba9df74fc15929e3ade1773e5d312bd8cc93f6c9fd3898c5bf2d14672abf4faba576575c33936708e6e1dfd01a393479d264d3f2c57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC Some notable changes to RPC params/behaviour/descriptions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants