[BTC-dev] (EXPERIMENTAL) Raw Block Extractor
Stanislav Datskovskiy
stas at loper-os.org
Mon Jun 29 00:50:47 UTC 2015
Name: readme_s.txt
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150628/readme_s_075b457dce967ced45ea61f164eb38fbb89fc129.txt>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
This patch adds an rpc function, 'dumpblock.'
It was written against my most recent set [1]
but ought to apply cleanly to just about anybody's 0.5.3.x tree. If I'm proven
wrong about this, please talk to me. I will help you merge.
Does precisely what is printed on the tin.
It may be possible to improve on the algo, but what is given ought to suffice
for just about any conceivable use.
Example:
$ ./bitcoind dumpblock 0 genesis.bin
$ hexdump -C genesis.bin
00000000 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 3b a3 ed fd 7a 7b 12 b2 7a c7 2c 3e |....;...z{..z.,>|
00000030 67 76 8f 61 7f c8 1b c3 88 8a 51 32 3a 9f b8 aa |gv.a......Q2:...|
00000040 4b 1e 5e 4a 29 ab 5f 49 ff ff 00 1d 1d ac 2b 7c |K.^J)._I......+||
00000050 01 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000070 00 00 00 00 00 00 ff ff ff ff 4d 04 ff ff 00 1d |..........M.....|
00000080 01 04 45 54 68 65 20 54 69 6d 65 73 20 30 33 2f |..EThe Times 03/|
00000090 4a 61 6e 2f 32 30 30 39 20 43 68 61 6e 63 65 6c |Jan/2009 Chancel|
000000a0 6c 6f 72 20 6f 6e 20 62 72 69 6e 6b 20 6f 66 20 |lor on brink of |
000000b0 73 65 63 6f 6e 64 20 62 61 69 6c 6f 75 74 20 66 |second bailout f|
000000c0 6f 72 20 62 61 6e 6b 73 ff ff ff ff 01 00 f2 05 |or banks........|
000000d0 2a 01 00 00 00 43 41 04 67 8a fd b0 fe 55 48 27 |*....CA.g....UH'|
000000e0 19 67 f1 a6 71 30 b7 10 5c d6 a8 28 e0 39 09 a6 |.g..q0..\..(.9..|
000000f0 79 62 e0 ea 1f 61 de b6 49 f6 bc 3f 4c ef 38 c4 |yb...a..I..?L.8.|
00000100 f3 55 04 e5 1e c1 12 de 5c 38 4d f7 ba 0b 8d 57 |.U......\8M....W|
00000110 8a 4c 70 2b 6b f1 1d 5f ac 00 00 00 00 |.Lp+k.._.....|
0000011d
You can checksum these [1], sign with GPG, cat them to your drum printer and make
ascii pr0n, whatever.
The next obvious step is to implement an 'eatblock <index> block.bin' - for the
truly adventurous.
But I'll leave that for another day.
- ---
[1] http://therealbitcoin.org/ml/btc-dev/2015-June/000102.html
[2] Note that such a checksum will differ from Bitcoin's header-only checksum!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQEcBAEBCgAGBQJVkJYLAAoJELmCKKABq//HhlEH/iucKkEUkRBGzmGP00iKFGpn
V1KAfkdqkbtG25iD0QVC+rGPw2kGjj1Mhi7+25uZsm/QLPDcklofK5mxv8OAs0ro
ligdk/OP0+1PLeRx3cVXF6bwnhmxaNyMhuALP8or10Xvfft4teKM0/4fkJlACQCZ
ZUZKvF44ryptKBKsRyoDs8ExVC4XLjcfSI7XWA4upmNmjEJHjbfec3gyhkg5MP9y
iEz55aoBeC2JqS56E98iygjj4fV2fFivpAYSMQmuo4J8AxlOA4/199BIw7zm/I4U
CGyux7nSA35wK4Z1D5yS3DsRBBUWnpn9d5UxT3XU87AKzWR7KD7qhoGZNVgRmM4=
=rkoc
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciilifeform_and_now_we_have_block_dumper.patch
Type: text/x-patch
Size: 2535 bytes
Desc: not available
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150628/asciilifeform_and_now_we_have_block_dumper_c75bcfbe8878a3f3387d7ed9bb4c2eca16c838ad.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asciilifeform_and_now_we_have_block_dumper.patch.sig
Type: application/octet-stream
Size: 490 bytes
Desc: not available
URL: <http://therealbitcoin.org/ml/btc-dev/attachments/20150628/asciilifeform_and_now_we_have_block_dumper_0418fac466502c0fa67efba7a681e65690c8b13f.patch.sig>
More information about the BTC-dev
mailing list