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

Relay transactions with exponential decaying probability #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cpacia
Copy link
Contributor

@cpacia cpacia commented Sep 11, 2019

If we can relay txs we can increase our privacy. However, we can't validate txs so we don't know if we're relaying invalid txs or not. Bchd nodes do not currently ban for relaying invalid txs, however we open the possibility of an amplification attack if we relay everything.

To prevent this we relay with an exponentially decaying probability that resets every block.

If we ever implement banning in bchd for invalid txs we should allow a minimum number of invalid txs before a ban with the minimum set well above the expected number of relayed txs from neutrino nodes.

@cpacia cpacia force-pushed the relay branch 3 times, most recently from f9fe25d to 03f11ce Compare September 11, 2019 13:08
@zquestz
Copy link
Contributor

zquestz commented Sep 11, 2019

Is there any way we can try to validate these transactions first? Seems dangerous to relay transactions where we don't know the validity. Or maybe we offer it as an option in the settings so that this is not the default behavior and users must opt in?

@cpacia
Copy link
Contributor Author

cpacia commented Sep 12, 2019

There's no way to validate it. That's why this PR limits the number of txs relayed. But if we just used a fixed number of txs then it would be predictable. By using a decaying probability it retains plausible deniability while still limiting it.

@zquestz
Copy link
Contributor

zquestz commented Sep 12, 2019

What do you think about the toggle idea? Just in case people see bad behavior from it being enabled?

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.

2 participants