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

Merged

Conversation

antiochp
Copy link
Member

@antiochp antiochp 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

@antiochp antiochp added this to the 2.x.x milestone Jun 6, 2019
@antiochp
Copy link
Member Author

antiochp 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
Copy link
Collaborator

lehnberg 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.

config/src/comments.rs Outdated Show resolved Hide resolved
@antiochp antiochp force-pushed the always_stem_local_txs branch from 2bfef61 to d19b3b3 Compare June 28, 2019 09:16
@antiochp antiochp changed the base branch from master to milestone/2.x.x July 4, 2019 10:30
antiochp added 2 commits July 4, 2019 11:30
… from wallet)

this overrides current epoch behavior for txs coming in via "push-api"
rename "local" to "our" txs
@antiochp antiochp force-pushed the always_stem_local_txs branch from d19b3b3 to 2e8584b Compare July 4, 2019 10:31
@antiochp antiochp merged commit f4eb3e3 into mimblewimble:milestone/2.x.x Jul 4, 2019
@antiochp antiochp deleted the always_stem_local_txs branch July 4, 2019 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants