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

Backport bitcoin#14897 and bitcoin#15834 and modify it to work with PIVX messages #2963

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Duddino
Copy link
Member

@Duddino Duddino commented Feb 4, 2025

Backport of dashpay#3397
This PR introduces ObjectRequests, and removes the dash-specific workarounds AskFor and RemoveAskFor

How does it work (Taken from bitcoin#14897)

This PR introduces bias toward outbound connections (they have higher priority when a node chooses from whom it should request a transaction) and randomizes the order.
GETDATA requests queue is created after processing all incoming messages from all nodes.

After this fix, if the incoming messages were [I1, I2, I3, O1, O2, O3, O4], the queue for GETDATA may look like [O2, O1, O3, O4, I1, I3, I2, ….].

If {I1, I2, I3} were significantly earlier (but the difference is less than TX_TIMEOUT=60 s) than others, the queue for GETDATA may look like [I2, O2, O1, O3, O4, I1, I3, ….].

naumenkogs and others added 4 commits February 4, 2025 13:41
If a transaction is already in-flight when a peer announces a new tx to us, we
schedule a time in the future to reconsider whether to download. At that future
time, there was a bug that would prevent transactions from being rescheduled
for potential download again (ie if the transaction was still in-flight at the
time of reconsideration, such as from some other peer). Fix this.
@Duddino Duddino force-pushed the tx_request_backport branch from 74dfda3 to 405a7b5 Compare February 12, 2025 13:19
@Duddino Duddino force-pushed the tx_request_backport branch from 405a7b5 to 8d68f12 Compare February 13, 2025 14:48
@Duddino Duddino self-assigned this Feb 13, 2025
@Duddino Duddino force-pushed the tx_request_backport branch from 33f6090 to 9d29659 Compare February 14, 2025 10:00
@Duddino Duddino marked this pull request as draft February 17, 2025 14:14
@Duddino Duddino force-pushed the tx_request_backport branch from 8b334ca to 488d34c Compare February 19, 2025 12:52
@Duddino Duddino force-pushed the tx_request_backport branch from f52d7c5 to 2ca6dd2 Compare February 20, 2025 10:36
@Duddino Duddino marked this pull request as ready for review February 20, 2025 10:36
Copy link
Member

@Liquid369 Liquid369 left a comment

Choose a reason for hiding this comment

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

ACK 2ca6dd2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants