Skip to content

Instantly share code, notes, and snippets.

View Rucknium's full-sized avatar

Rucknium Rucknium

View GitHub Profile
@Rucknium
Rucknium / adversary-controlled-decoys-DSA.R
Last active March 7, 2024 22:39
Monero adversarial spammer privacy impact
# When current.height = 3100144,
# start.spam.height = 3097308, and
# spam.share <- 0.75
# 59% of the probability mass function of the DSA are outputs created by the suspected spammer
# Formula for the exact Monero Decoy Selection Algorithm (DSA) probability mass function is based on:
# jeffro256 (2023) "Implementing Monero Decoy Selection"
# https://github.com/jeffro256/monero/blob/decoy_selection_md/docs/DECOY_SELECTION.md
# and
@Rucknium
Rucknium / Monero-output-number-parent-tx-in-rings.txt
Last active April 14, 2023 19:34
Monero-output-number-parent-tx-in-rings.txt
Below are tables about the number of outputs of parent transactions contained in each ring on the Monero
blockchain from April 3 to April 9, 2023. The number of outputs of parent transactions are arranged as
the row of the table. The number of times that each type of output appears in rings is arranged as the column.
For example, 55397 is the number of rings where exactly 2 outputs from 16-output parent transactions were
included in the ring.
When the parent transaction is a coinbase, they are put in their own category. Their row name is "CB".
@Rucknium
Rucknium / Monero-Mordinals-Coinbase-Outputs-PRELIMINARY.txt
Last active April 26, 2023 16:22
Monero-Mordinals-Coinbase-Outputs-PRELIMINARY.txt
Data on the share of outputs on Monero's blockchain that were produced by coinbase transactions,
Mordinal minting transactions, or Mordinal transfer transactions.
Based on some modifications to https://github.com/Rucknium/misc-research/tree/main/Monero-Effective-Ring-Size
My criteria for detecting mordinal minting transactions is:
height >= 2838965 & length(tx.json$vout) == 2 & i > 1 [not coinbase] & length(tx.json$extra) > 44 & tx.json$extra[45] == 16
My criteria for detecting mordinal transfer transactions is:
@Rucknium
Rucknium / Rucknium-PGP-public-key.asc
Last active September 22, 2023 16:01
PGP key (sign-only)
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGMpq0ABEAChYESXlM6m89PhlHh016lGFP24REvOHBdwRIYSesBlCfaPIvtX
F7WDL8xxf+rgidbQMNKHVzUBgzj7IIRKLQ5BgQcCIaL9l02yotdgjcRheXCAYbKY
7kZfzKM9lEH2OIFN3/1WFMFnYM7nqcxWghJuwzCg/lTia8obPBOVftEN6iGn2Agb
Wl5h/AV/AIAjwuylBZYmPSNZHCQK7Mjjn1QAJmeCM06KjYrodrEjadiGAJebtvNE
gRCBb+xkpWRKRq3lUrQyOU+p1KT7ffEfFmzZu5fKf5s3XX9h0QIywDsejp0+DZv6
8BeYUXzApGrVg2dqOWM0F3tygkYdKDn8xKHI3+CcNQ3HY/cYuubgTK1h0N1vwLTJ
uBnZgsiDghZnBnw5pyX4eLEr0A5rRHig2/CFphhKjo3B6bP7jH+hvB27kTNQ5FGg
JLCNer1DUAYAv6QwZTpmpkpFWxVlR+6oKVIyKTeINa+7HHyYgIqzMm6pQXU5vzCl
@Rucknium
Rucknium / simple-simulated-monero-black-marble-attack.R
Created August 14, 2022 14:22
Simple Simulated Monero Black Marble/Flooding Attack
set.seed(314)
black.marble.proportion <- 0.9
ring.size <- 16
outputs <- sample(c(TRUE, FALSE), 1000000, replace = TRUE,
prob = c(1 - black.marble.proportion, black.marble.proportion))
@Rucknium
Rucknium / prob-waiting-Monero-block.R
Created December 13, 2021 15:29
Calculates the probability of waiting at least X minutes for the next Monero block to be found
minutes.waiting <- 10
1 - pexp(minutes.waiting, rate = 1/2)
# [1] 0.006737947
@Rucknium
Rucknium / blockchain-attack-w-modified-target-time.R
Last active July 28, 2021 00:24
Simulates the probability of a double-spend attack succeeding over a 10 minute interval, with 10 minute vs 1 minute target block interval times
# Simulations carried out by the R statistical language: https://www.r-project.org/
set.seed(314)
# Set the random seed to make the results reproducible
current.target.block.time <- 10
modified.target.block.time <- 1
hashpower.honest.miners <- 0.70
hashpower.malicious.miner <- 0.30
n.simulations <- 1000000