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

Need solution to better decoy selection for non-rct #109

Closed
iamsmooth opened this issue Mar 29, 2019 · 6 comments
Closed

Need solution to better decoy selection for non-rct #109

iamsmooth opened this issue Mar 29, 2019 · 6 comments

Comments

@iamsmooth
Copy link

The existing code from upstream uses the old triangular distribution with recent zone method which is rather poor especially as the chain gets older, albeit slightly better than the even worse previous methods.

The gamma-distribution method is only used for rct, and in any case is a poor fit for AEON due to the lower chain usage (many empty blocks) and the overweighting of outputs (mostly coinbase outputs) from small blocks. Apart from that issue, attempting to implement it with non-rct would be complicated due to the presence of different size outputs in each block.

@iamsmooth
Copy link
Author

I believe this method is acceptable and better than what is already being done.

  1. Sample from existing implemented gamma distribution using the existing parameters (output is a timestamp or equivalently a block number)
  2. Rescale this time or block number by the number of outputs of the desired size, resulting in an output index. For example, a time 50% into the history would scale to an output index 50% into the list.
  3. Use output index from 2

@iamsmooth
Copy link
Author

I believe this is doing something similar with rct monero-project@f04b3a7

@stoffu
Copy link

stoffu commented Apr 3, 2019

monero-project#5389 computes the average of time intervals between outputs over the previous one year, which can be easily computed thanks to the cumulative distribution function of rct outputs stored in the daemon's database. Currently the database doesn't store such data for non-rct outputs IIRC, and doing so will require quite some coding and DB format changes which may not worth the bother (surely implementable though).

An easier alternative is to compute the average over the entire chain history which I think is reasonable.

@iamsmooth
Copy link
Author

iamsmooth commented Apr 3, 2019

@stoffu I believe get_output_distribution works for non-rct and takes a from_height argument. It is currently used for the 1.8 day recent zone but could be used to get the number of outputs in the past year (or some other interval).

This isn't all that efficient (runs linearly through the output list and counts) but it could be made more efficient if needed later. If I'm not mistaken it is already doing this linear scan anyway for the recent zone.

Using the entire history is somewhat okay (but has some undesirable effects for AEON specifically since there were a huge number of outputs in the first few months due to the very poor early pool implementation, I believe vastly higher than what has been typical since).

@stoffu
Copy link

stoffu commented Jun 17, 2019

#115

@BigslimVdub
Copy link

Can you please close this since the underlying code was merged to master?

@aeonix aeonix closed this as completed Jul 25, 2019
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

No branches or pull requests

4 participants