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

[don't merge] Hacky way to simulate attempts of get_outs #2

Closed
wants to merge 1 commit into from

Conversation

j-berman
Copy link
Owner

@j-berman j-berman commented Jul 16, 2021

Overview

The goal of this is to sanity check the gamma distribution the client's decoy selection algorithm produces by re-attempting get_outs a bunch of times. It's super hacky.

How to run

First, make sure you're running a node, and pause it (I called the command max_peers 0 so it would stop syncing with other nodes). Pausing it makes sure each run of get_outs will be consistent.

Second, make sure you have a mainnet wallet with a recent output, then run monero-wallet-cli and just attempt to make a transfer. It will run the simulation, and then automatically fail out of the transaction construction process and tell you to check the logs. Once complete, the logs will contain lines like the following:

2021-07-16 00:38:31.504	    7f963fe26a00	INFO	wallet.wallet2	src/wallet/wallet2.cpp:8167	Diff from current height: 1013, Frequency: 14
2021-07-16 00:38:31.504	    7f963fe26a00	INFO	wallet.wallet2	src/wallet/wallet2.cpp:8167	Diff from current height: 1014, Frequency: 210
2021-07-16 00:38:31.504	    7f963fe26a00	INFO	wallet.wallet2	src/wallet/wallet2.cpp:8167	Diff from current height: 1015, Frequency: 211

What to do with the logs

There's probably a way easier way to do this and automate it, but I just copy pasted the logs into LibreOffice calc, used the built-in delimiter, parsed the height diff and frequency into 2 separate columns, then made a chart:

get_outs 100k simulations results

- re-attempt get_outs num_attempts times, then output distribution results to log and fail out
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.

1 participant