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

Always stem local txs if configured that way (unless explicitly fluffed) #2876

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@antiochp
Copy link
Member

commented Jun 6, 2019

We identify "our" txs as those with a tx src of push-api.

  • If wallet explicitly pushes with fluff then we fluff.
  • If node is configured as always_stem_our_txs=true then we will stem our txs, regardless of current epoch.
  • Otherwise we stem/fluff based on current epoch.
  • Stem txs (arriving via stem relay) will always stem/fluff based on current epoch.

Also cleaned up the dandelion_config to get rid of the unnecessary Option<> wrappers.

TODO -

  • Consider making TxSource an enum as part of this for better type safety
    (right now we are identifying our txs based on something called the debug_name ...)
  • rename "local txs" to "our txs" (local does not make much sense in wider context)

Default generated config as follows -

#########################################
### DANDELION CONFIGURATION           ###
#########################################
[server.dandelion_config]

#dandelion epoch duration
epoch_secs = 600

#fluff and broadcast after embargo expires if tx not seen on network
embargo_secs = 180

#dandelion aggregation period in secs
aggregation_secs = 30

#dandelion stem probability (stem 90% of the time, fluff 10% of the time)
stem_probability = 90

#always stem our (pushed via api) txs regardless of stem/fluff epoch (as per Dandelion++ paper)
always_stem_our_txs = true
always stem local txs if configured that way (unless explicitly fluff…
… from wallet)

this overrides current epoch behavior for txs coming in via "push-api"

@antiochp antiochp added the enhancement label Jun 6, 2019

@antiochp antiochp added this to the 2.x.x milestone Jun 6, 2019

@antiochp

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2019

cc @lehnberg

I took another look at what would be required to do this, to follow the spec as described in the Dandelion++ paper.
It was actually pretty striaghtforward to implement this.

We do want to be able to override this "always stem local" behavior to make Dandelion testing easier. Its really hard to test Dandelion behavior when "local" txs are handled differently.

@lehnberg

This comment has been minimized.

Copy link
Collaborator

commented Jun 6, 2019

Thanks @antiochp this is great! I saw your question in the docs ticket but didn't have a chance to reply yet. Yes - we want to always stem our own transactions - otherwise txos in a fluff can be attributed to the fluffing node to a predictable degree.

Show resolved Hide resolved config/src/comments.rs Outdated

antiochp added some commits Jun 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.