Skip to content

Commit

Permalink
btc++ hackathon
Browse files Browse the repository at this point in the history
  • Loading branch information
stratospher committed May 4, 2024
1 parent 900df95 commit a21cd3d
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
Binary file added images/transaction-analysis/.DS_Store
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/transaction-analysis/length.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions traffic-analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# I still see you!

## Problem

Sending transactions across the P2P network is sensitive data.

![show transaction tracking based on size](./images/transaction-analysis/length.png)

Global passive observers can differentiate whether it's this tx or that tx from the size of the packet!

## Statistics

### Common transaction size (in bytes) in the last 100 blocks
![show common transaction size in mempool](./images/transaction-analysis/100-blocks-tx-size.png)
- 96.7 % of transactions below 1000 bytes
- 99% of transactions below 3000 bytes

### Common transaction size (in bytes) in the mempool
![show common transaction size in mempool](./images/transaction-analysis/mempool-tx-size.png)
- 89.6 % of transactions below 1000 bytes
- 92% of transactions below 3000 bytes

## Solution

1. Pad transaction messages

| | pad to a fixed size=1000 | pad to a fixed size=3000 | pad to a dynamic size |
|--------------------------|--------------------------|--------------------------|-----------------------|
| how much padding? | 1000 | 3000 | Padmé algo |
| what is extra bandwidth? | 37 MB | 139.8 MB | 123 MB |

2. Broadcast decoy messages with size (transaction message)

## Code

branch - https://github.com/stratospher/bitcoin/tree/2024-05-tx-traffic
jupyter notebook - https://colab.research.google.com/drive/1q2fLkxuAiqr2hlAEQ4r6x2Lx9bTh4bN0?usp=sharing

0 comments on commit a21cd3d

Please sign in to comment.