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

Reimplement Dandelion Transactions #80

Merged
merged 5 commits into from
Jan 17, 2022

Conversation

barrystyle
Copy link

PR contains bug tested & pool trialed implementation of dandelion, with appropriate modifications to tests.

barrystyle added 3 commits December 8, 2021 15:18
@JaredTate
Copy link

Awesome work! Thanks for doing this. Will get it reviewed.

@JaredTate
Copy link

ACK. Thanks again Barry for the work on this. Compiling works fine & client has run for many hours smoothly without any errors I can see. Would be great to get this merged into 8.22 and then merged into develop.

Copy link

@JaredTate JaredTate left a comment

Choose a reason for hiding this comment

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

ACK

@JaredTate JaredTate requested a review from ycagel December 29, 2021 20:57
Copy link
Member

@ycagel ycagel left a comment

Choose a reason for hiding this comment

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

cACK

Lots of great work @barrystyle. Appreciate your efforts!

Copy link
Member

@gto90 gto90 left a comment

Choose a reason for hiding this comment

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

ACK

Fantastic work on this @barrystyle . This was a heavy lift and we really appreciate your hard work on this. I think we need to attack the failing GitHub actions before we merge 8.22 into develop, but I'll add my comments to that effect on the feature branch.

@gto90 gto90 requested a review from SmartArray December 30, 2021 18:24
@BouwmanR
Copy link

Thanks for all you do Barry! Much appreciated

@SmartArray
Copy link

This PR looks good to me.

I am having a hard time to understand why the wallet tests fail. Even with Dandelion disabled, the wallet transaction tracker now seems to process some mempool transactions twice, which results in an invalid check.

Currently, we have two ways to proceed:
1/ we alter the wallet_tests to resemble the dandelion implementation
2/ we disable dandelion for these tests and fix the behavior that was introduced by this PR

I am preferring the latter, because I am also working on the functional tests at the moment which will be validating Dandelion anyway. This will also help us to stay up to date with Bitcoin upstream changes.

Copy link

@SmartArray SmartArray left a comment

Choose a reason for hiding this comment

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

We are almost done with the dandelion stuff.

Once we have addressed these points, I can commit the updated wallet_tests and this PR can be merged eventually.

@barrystyle
Copy link
Author

I am having a hard time to understand why the wallet tests fail. Even with Dandelion disabled, the wallet transaction tracker now seems to process some mempool transactions twice, which results in an invalid check.

This. I thought it mightve been a preexisting failed test but I dont think thats the case.

@SmartArray
Copy link

SmartArray commented Jan 4, 2022

Had the same idea regarding that convenience function. Great job! 💪
Edit: I expect the CI to succeed now. We will see. Takes two hours though

@SmartArray SmartArray changed the title reimplement dandelion transactions Reimplement Dandelion Transactions Jan 10, 2022
@@ -79,15 +79,25 @@ static const bool DEFAULT_BLOCKSONLY = false;
static const int64_t DEFAULT_PEER_CONNECT_TIMEOUT = 60;
/** Number of file descriptors required for message capture **/
static const int NUM_FDS_MESSAGE_CAPTURE = 1;
/** The default setting for dandelion transactions */
static const bool DEFAULT_DANDELION = true;
Copy link

@SmartArray SmartArray Jan 10, 2022

Choose a reason for hiding this comment

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

One last thing before I ACK this PR:

We should consider having Dandelion disabled by default.
Otherwise we will lose DigiByte's instant transactions because all transactions will have to enter the stempool first. People can still enable the protocol by passing -dandelion 1 when launching their own nodes.
The iOS wallet supports this too by broadcasting protocol internal dandelion_tx transactions.
I know this was enabled before, but looking at it in the past, I thought that normal transactions entered the mempool and only 'special' transactions would enter the stempool.

@JaredTate @gto90 @barrystyle @ycagel
Would love to hear your thoughts about this.

By the way, this will fix the CI tests too.
Alternatively we can add gArgs.ForceSetArg("-dandelion", "0"); to the wallet_tests

Choose a reason for hiding this comment

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

Forget what I just said. It's fine when it's enabled by default.

@barrystyle Can you add another commit in wallet_tests.cpp at line 700?

gArgs.ForceSetArg("-dandelion", "0");

Choose a reason for hiding this comment

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

I think it is beneficial to leave Dandelion enabled by default, to grant new users extra privacy by default. Perhaps it could be added as a popup during the install process? Giving the user direct control. Not sure what all that would entail as it would take GUI work too. From my experience even with dandelion txs are still quick enough to seem fast.

@SmartArray SmartArray force-pushed the feature/dandelion branch 2 times, most recently from 8cc38c1 to 2b25c65 Compare January 17, 2022 03:23
Yoshi Jäger added 2 commits January 17, 2022 04:25
@SmartArray
Copy link

Sorry for the force push. I thought I did that to a local branch, but it turned out to be the remote branch.

I managed to add the missing commit in order to have this branch merged.

@SmartArray
Copy link

After some investigation it is clear that every test case succeeded. The benchmark tests on Mac caused a segfault. I don't think this is critical for this PR.

Merging this PR.

@SmartArray SmartArray merged commit b14a01d into DigiByte-Core:feature/8.22.0 Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants