[BTC-dev] (EXPERIMENTAL) Mempool Jettison Trigger

Stanislav Datskovskiy stas at loper-os.org
Tue Aug 4 03:41:13 UTC 2015

Name: readme_s.txt
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150803/readme_s_2c6c5f547275397d153b4ad1fa656568949074af.txt>
Hash: SHA512

- ---

Very alert folks may have noticed that runaway RAM-guzzling in TheRealBitcoin does not begin until the initial blockchain sync reaches well into 'modern' times.

The reason for this is the TX orphanage removal! Until the sync is mostly complete, just about all incoming TX go straight into the garbage, on account of no antecedent being found for them in a block. This is precisely as it should be.

And it reveals precisely how much of the RAM bloat is accounted for by the mempool: virtually all of it! See also the experiment where we learn the intrinsic footprint of the blockchain indices [1].

- ---

Now, you can test hypothesis concerning the effect of mempool on total RAM footprint - experimentally!

1) Apply 'asciilifeform_jettison_mempool.patch'
   (Depends on 'eatblock' and 'dumpblock', but only because 'diff' is dumb as a brick. Can, if you
    wish, apply by hand)
2) Use RPC command,
       ./bitcoind zapmempool
3) debug.log will display the number of TX in the mempool at the time of the purge.

- ---

Why bother?

1) Experiment, as described earlier
2) For the brave:
   'Reactor scram' for long-running nodes. The jettison switch can be hooked to a low-RAM tripwire,
   and - though ugly - jettisoning the mempool is considerably less traumatic than crashing! In
   particular, the possibility of db corruption is avoided.

   This, of course, is until we get something like a rational mempool mechanism. [2]

[1] http://therealbitcoin.org/ml/btc-dev/2015-July/000107.html
[2] http://log.bitcoin-assets.com/?date=03-08-2015#1222814 and earlier
Version: GnuPG v2.0.19 (GNU/Linux)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciilifeform_jettison_mempool.patch
Type: text/x-patch
Size: 2283 bytes
Desc: not available
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150803/asciilifeform_jettison_mempool_195c600991e7306b0f21eddd834b38b9301cf12b.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciilifeform_jettison_mempool.patch.sig
Type: application/octet-stream
Size: 490 bytes
Desc: not available
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150803/asciilifeform_jettison_mempool_4ea10893ee0d98b3bb3fc4d73369cbaa3d5669e6.patch.sig>

More information about the BTC-dev mailing list