dataforge-labs commited on
Commit
e7a6439
·
verified ·
1 Parent(s): 893b3be

bitcoin-mempool-lifecycle: 2026-08-29

Browse files
Files changed (1) hide show
  1. README.md +103 -102
README.md CHANGED
@@ -19,117 +19,118 @@ size_categories:
19
 
20
  # Bitcoin mempool lifecycle
21
 
22
- What happens to a transaction between being broadcast and being mined: when we first saw it, how
23
- long it waited, what fee it paid, and whether it was ever mined at all.
24
 
25
- A confirmed transaction keeps its body forever but loses its timing, and one that is never mined
26
- leaves no trace at all. We checked this on Bitcoin before collecting anything: the public
27
- first-seen lookup answers while a transaction is unconfirmed and returns 0 once it is mined,
28
- whether that was a day ago or a year ago. So it gets recorded as it happens or not at all.
29
 
30
- Bitcoin is the point of this repo. Litecoin runs the same collector. Ethereum is included as a
31
- second observation, but if you want Ethereum specifically, the
32
- [Flashbots Mempool Dumpster](https://github.com/flashbots/mempool-dumpster) publishes the same
33
- measurement daily under CC-0, from a wider node network and going back to September 2023. Theirs
34
- is better than ours; use it.
35
-
36
- ## What is in here
37
 
38
  | name | one row is |
39
  |---|---|
40
  | `e8_btc_mempool_lifecycle` | a Bitcoin transaction: first seen, fee rate, mined height, blocks waited, fate |
41
- | `e9_btc_mempool_divergence` | one provider's pending-set size and overlap with another, at an instant |
42
- | `e11_ltc_mempool_lifecycle` | the same as e8, for Litecoin (single provider, no cross-check) |
43
- | `e15_fee_estimators` | one fee estimate from one of five providers, at one confirmation target |
44
- | `e1_mempool_minutely` | one minute of Ethereum mempool activity: arrivals, fates, dwell quantiles |
45
- | `e1_mempool_dropped` | an Ethereum transaction that was never mined, in full |
46
- | `e3_mempool_divergence` | one Ethereum node's pending view against three others |
47
- | `e0_run_manifest` | one collection window: polls, failures, coverage counters |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  ## Before you build on this
50
 
51
- Most of these came out of getting something wrong first.
52
-
53
- - `first_seen_ts` is when WE saw it, on our clock, from our own polling. The network saw it a
54
- little earlier. We never copy a provider's own first-seen field.
55
- - Rows with `pre_existing = true` were already pending when a window opened. Their real arrival
56
- time is unknowable, so `first_seen_ts` is null there rather than a made-up value.
57
- - Bitcoin `fate = "dropped"` starts 2026-08-26. Before that, a bug made drops impossible to
58
- record: the status endpoint reports `confirmed: false` for a replaced transaction exactly as it
59
- does for a waiting one, and we read that as proof it was still pending. Earlier partitions are
60
- kept as collected rather than rewritten.
61
- - We only call something dropped once it is missing from the chain, missing from two providers'
62
- pools, and missing for ten polls running. Weaker tests do not work: a plain poll-to-poll diff
63
- invented 642 "drops" in 200 seconds and every one we checked was still in the mempool.
64
- - `fee_rate_sat_vb` is PARTIAL, and its coverage IMPROVES over the life of the dataset. It is
65
- sampled from the recent-arrivals feed, which returns only the ten newest transactions per call,
66
- so coverage is bounded by how often we call it. It is never estimated for the rest, because a
67
- guessed fee rate would ruin the analyses the column exists for.
68
- Measured coverage, as a share of arrivals we actually observed (`pre_existing == False`):
69
- **2026-08-25 none, 2026-08-26 ~4%, 2026-08-27 ~14%, 2026-08-28 ~16% early, ~75% late.**
70
- Coverage of PRE-EXISTING transactions -- which is what dropped rows inherit -- moved from
71
- **~1% to ~93%** on 2026-08-28. Partitions from 2026-08-29 onward are far denser than anything
72
- earlier, and the gap is now large enough that pooling them unexamined would be a mistake.
73
- Four things held it down, all fixed on 2026-08-28: fee capture did not exist on the first day;
74
- the quote collectors shared a thread with the sampler and blocked it for ~40 minutes of every
75
- 4.5-hour run; the sampler's intended 2-second cadence never actually ran, because it was
76
- checked inside a loop that sleeps 5 seconds; and fees were fetched one transaction at a time
77
- when a full node returns its ENTIRE mempool, with an exact fee and vsize per entry, in a single
78
- request. That last one is what mattered, and the lesson is which node you ask: public Bitcoin
79
- RPC nodes hold wildly different mempools, and one with a 4 GB `maxmempool` covers 93% of our
80
- tracked set in a single call where a 256 MB node covers 34%.
81
- **Even repaired, 100% is not attainable, and the reason is worth understanding before you rely
82
- on this column.** The feed returns only the TEN NEWEST transactions per call, so capture is
83
- capped at 10 per poll however fast we ask. Measured Bitcoin arrival rates ran between 4.3/s and
84
- 11.0/s within a single hour. At a 2-second cadence the ceiling is 5/s, which is above the quiet
85
- rate and well below the busy one -- so coverage is itself a function of network congestion, and
86
- is LOWEST exactly when the mempool is most interesting. Treat the sampled set as a sample, and
87
- do not assume it is representative across congestion regimes without checking.
88
- DO NOT take these figures on trust -- they are computable from the data itself, and any
89
- analysis sensitive to coverage should compute them per partition rather than assume a constant:
90
- ```python
91
- obs = df[~df.pre_existing.astype(bool)]
92
- coverage = obs.fee_rate_sat_vb.notna().mean()
93
- ```
94
- Rows without a fee rate are complete in every other respect (first seen, dwell, fate, blocks
95
- waited), so they remain usable for lifecycle work; only fee-conditioned analysis is affected.
96
- - **`fee_rate_sat_vb` is effectively ABSENT on dropped rows (~1%), and this is structural.**
97
- Every dropped transaction observed so far was already in the mempool when its run began
98
- (`pre_existing == True`), which follows from the mechanism: a transaction we watch from arrival
99
- is mined or still pending within a 4.5-hour window, whereas eviction takes far longer, so only
100
- transactions that predate the run live long enough to be dropped. Fees come from the
101
- recent-ARRIVALS feed, which by definition never saw them.
102
- Recovering the fee afterwards does not work, and this was tested rather than assumed: a
103
- transaction that leaves the mempool unmined returns **HTTP 404 immediately** from `/tx/{id}`.
104
- A run's confirmed drops were probed and **0 of 147** were retrievable. The provider forgets
105
- them at once, so there is no window in which to ask.
106
- Related trap, worth knowing if you query the API yourself: `/tx/{id}/status` answers
107
- `{"confirmed": false}` for txids that CANNOT EXIST (all-zeros, all-f's were both tested), so
108
- that field distinguishes "not in a block" and nothing more. Our drop classification does not
109
- rest on it -- pool membership is the discriminator -- but a naive reading of it would be wrong.
110
- - Four columns come from a full Bitcoin node's mempool rather than an explorer API, and are
111
- **null for transactions that node did not hold** (~32% coverage, the node's share of the
112
- tracked set). None of them survives confirmation or eviction, which is why they are collected:
113
- `node_first_seen_ts` (that node's own first-seen clock, an independent check on ours),
114
- `rbf_signalled` (BIP-125 replaceability as live mempool state), and `ancestor_count` /
115
- `descendant_count` (unconfirmed chains, which is how CPFP fee-bumping appears).
116
- A caveat on `node_first_seen_ts` that we have not explained: on transactions where both clocks
117
- exist, ours is a median ~7,000s LATER than the node's. Some of that is our polling interval and
118
- some is rebroadcast, but not all of it, so treat the two clocks as different measurements
119
- rather than one corrected version of the other.
120
- - A fee rate of exactly 0 is real and rare, about 1 in 6,000 of the sampled arrivals, and most of
121
- those we have seen went on to confirm. Filter on `fee_rate_sat_vb > 0` if a zero would break
122
- your arithmetic, rather than treating it as a decode fault.
123
- - Mempools are node-local, and how long a node keeps things is its own choice rather than a
124
- protocol rule. Ours served 115-day-old entries where Bitcoin Core would have evicted after 336
125
- hours. `e9` tracks how far apart two providers are, usually several thousand transactions.
126
- - Bitcoin dwell times are long. Around 10 minutes for transactions that confirm quickly, but the
127
- pool also holds a standing backlog whose median age is over 100 days. That is Bitcoin's fee
128
- market, not a collection error.
129
- - Fee estimators disagree much more than their marketing suggests: one sample showed a 6.7x
130
- spread across five providers on the same six-block target. Targets are normalised to a block
131
- count and the raw payload field is kept per row, so you can check that rather than trust it.
132
- - Ethereum is stored as per-minute aggregates plus full rows for never-mined transactions.
133
 
134
  Partitions are parquet, one file per collection window, under `dataset/YYYY/MM/`. This repo carries a FIXED 7-day sample (2026-08-25 to 2026-08-31) so you can check schema, coverage and quality before asking for more. It does not advance, so there is nothing to gain by re-downloading it. The full history is held privately, available on request.
135
 
 
19
 
20
  # Bitcoin mempool lifecycle
21
 
22
+ Transactions from the moment they appear in the mempool to whatever happens to them: mined,
23
+ still waiting, or dropped without ever reaching a block.
24
 
25
+ A confirmed transaction keeps its contents forever but loses its timing. One that is never mined
26
+ leaves no record at all. Both are recorded here as they happen.
 
 
27
 
28
+ ## Contents
 
 
 
 
 
 
29
 
30
  | name | one row is |
31
  |---|---|
32
  | `e8_btc_mempool_lifecycle` | a Bitcoin transaction: first seen, fee rate, mined height, blocks waited, fate |
33
+ | `e9_btc_mempool_divergence` | one view of the pending set at one instant, sized and compared against the others |
34
+ | `e11_ltc_mempool_lifecycle` | the same, for Litecoin |
35
+ | `e15_fee_estimators` | one fee estimate from one provider at one moment, with its target |
36
+ | `e1_mempool_lifecycle` | an Ethereum transaction seen pending (ends 2026-08-26, see below) |
37
+ | `e1_mempool_minutely` | one minute of Ethereum mempool activity |
38
+ | `e1_mempool_dropped` | an Ethereum transaction that was never mined |
39
+ | `e3_mempool_divergence` | Ethereum pending-set comparison across views |
40
+ | `e21_btc_relay_floor` | one peer's own minimum relay fee, at the moment it announced it |
41
+
42
+ `e1_mempool_lifecycle` stops at 2026-08-26. Per-transaction Ethereum rows were discontinued
43
+ there: the Flashbots Mempool Dumpster publishes the same measurement under CC-0 from a wider
44
+ node set, so a duplicate was not worth the storage it took. `e1_mempool_minutely` and
45
+ `e1_mempool_dropped` continue. The earlier partitions are kept and keep their own name, so
46
+ nothing joins them to the newer tables and reads a change of population as a trend.
47
+
48
+ ## Fee rate coverage
49
+
50
+ `fee_rate_sat_vb` is present on a portion of rows and that portion changes over time. It is
51
+ sampled, never estimated: a guessed fee rate would ruin the analyses the column exists for.
52
+
53
+ Coverage by day, as a share of transactions observed arriving (`pre_existing == False`):
54
+
55
+ | date | coverage |
56
+ |---|---|
57
+ | 2026-08-25 | none |
58
+ | 2026-08-26 | ~4% |
59
+ | 2026-08-27 | ~14% |
60
+ | 2026-08-28 | ~16% early, ~67% late |
61
+ | 2026-08-29 onward | ~67% |
62
+
63
+ Coverage of transactions already pending when a collection window opened moved from about 1% to
64
+ about 99% on 2026-08-28. Dropped rows inherit that figure and reached 94% on 2026-08-29.
65
+
66
+ Partitions from 2026-08-29 are substantially denser than earlier ones. Compute coverage per
67
+ partition rather than assuming a constant:
68
+
69
+ ```python
70
+ obs = df[~df.pre_existing.astype(bool)]
71
+ coverage = obs.fee_rate_sat_vb.notna().mean()
72
+ ```
73
+
74
+ Rows without a fee rate are complete in every other respect, so they remain usable for lifecycle
75
+ work. Only fee-conditioned analysis is affected.
76
+
77
+ ## Reading the fate column
78
+
79
+ `dropped` means the transaction was confirmed absent from the chain, absent from every pending
80
+ view held, and stayed absent through a debounce period. It is not inferred from a single
81
+ observation. `unresolved` means it went missing but could not be confirmed, and is never counted
82
+ as a drop.
83
+
84
+ Bitcoin `fate = "dropped"` begins 2026-08-26. Earlier partitions contain no drops because a
85
+ defect made them impossible to record, not because none occurred.
86
+
87
+ ## Package fee rates
88
+
89
+ A transaction's own fee rate is not what decides whether it is mined. A miner sorts by the
90
+ ANCESTOR fee rate, so a transaction with an unconfirmed low-fee parent is worth less than it
91
+ appears, and a child paying a large fee lifts its parent with it.
92
+
93
+ `effective_fee_rate_sat_vb` is `ancestor_fees_sat / ancestor_vsize`. For a transaction with no
94
+ unconfirmed parents it equals `fee_rate_sat_vb` exactly; where they diverge, the effective rate
95
+ is the one that governs inclusion. One snapshot held a transaction paying 28.4 sat/vB whose
96
+ effective rate was 2.1.
97
+
98
+ `ancestor_count` above 1 marks membership in an unconfirmed chain, which is how fee bumping by
99
+ a child shows up. The descendant columns are the mirror: what is waiting on this transaction.
100
+
101
+ These come from a full node's own view, so they are null for transactions it never held, and
102
+ they are recorded as first observed. Package structure changes as parents confirm, so treat
103
+ them as the state at first sight rather than a running value.
104
+
105
+ ## Relay floors
106
+
107
+ A transaction below a node's minimum relay fee is not merely deprioritised: that node will not
108
+ forward it, so it never reaches the miners at all. Every peer announces its own floor on
109
+ connect and again whenever it moves, and those announcements are kept by nobody.
110
+
111
+ `e21_btc_relay_floor` is one row per announcement, so a peer appears repeatedly as its floor
112
+ changes. `min_relay_fee_sat_kvb` is the wire value; `min_relay_fee_sat_vb` is the same number
113
+ in the units fee tools quote.
114
+
115
+ Expect little variation while the mempool is quiet, because nodes then sit at whatever they
116
+ were configured with. The floor moves when a mempool fills and starts evicting, which is
117
+ exactly when it matters and exactly when it cannot be reconstructed afterwards.
118
 
119
  ## Before you build on this
120
 
121
+ - Pending sets are node-local. What one view holds is not what the network holds, and retention
122
+ is a configuration choice rather than a protocol rule. `e9` exists to size that disagreement,
123
+ and it is large: at one instant the views ranged from about 6,000 to about 87,000 pending
124
+ transactions, with only 7% common to all of them.
125
+ - Dropped rows carry a fee rate far less often than mined rows. Every drop observed so far was
126
+ already pending when its window opened, and fee sampling favours arrivals.
127
+ - A fee rate of exactly 0 is real and rare. Filter on `fee_rate_sat_vb > 0` if a zero would
128
+ break your arithmetic rather than treating it as a decode fault.
129
+ - Timestamps are ours, taken at observation. They are not consensus timestamps and carry our
130
+ network distance to whatever served the data.
131
+ - Ethereum rows are included for comparison. If Ethereum is your subject, the Flashbots Mempool
132
+ Dumpster publishes the same measurement daily under CC-0 from a wider node set and a longer
133
+ history. Theirs is better; use it.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
 
135
  Partitions are parquet, one file per collection window, under `dataset/YYYY/MM/`. This repo carries a FIXED 7-day sample (2026-08-25 to 2026-08-31) so you can check schema, coverage and quality before asking for more. It does not advance, so there is nothing to gain by re-downloading it. The full history is held privately, available on request.
136