Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Fun with Genesis Block Funds #247

Closed
wants to merge 1 commit into from

Conversation

scravy
Copy link
Member

@scravy scravy commented Nov 16, 2018

@Ruteri This one is for you (not meant to be merged, but feel free to use this branch)

united -printtoconsole -debug=1
01:36:55 [email protected]:~/Github/scravy/unit-e/build-osx (0)
$ src/unite-cli importmasterkey 'chef gas expect never jump rebel huge rabbit venue nature dwarf pact below surprise foam magnet science sister shrimp blanket example okay office ugly'
{
  "wallet": "wallet.dat",
  "language": "English",
  "language_tag": "english",
  "bip39_seed": "d1eea4b1ce1184d8677d75f3cf04f70d01c9e3be523f42f47be17ad3b70a6353cb7a21bb9aa108caac017ec558b6df8cd3ff4c12eb7cbe9b7965e23103d70ab3",
  "bip32_root": "xprv9s21ZrQH143K3HnfPXwHdEsomxKRDoy9JAxnHVeNfx74LeG8BpbKnjQkUTvaHGKK1pS6DdfJ3fwFJGR8WmM4RwPWk9XZXV5yKXiwwQJK6y2",
  "warnings": [
  ],
  "success": true
}
01:39:32 [email protected]:~/Github/scravy/unit-e/build-osx (0)
$ src/unite-cli getbalance
10000.00000000
01:39:46 [email protected]:~/Github/scravy/unit-e/build-osx (0)
$ src/unite-cli listtransactions
[
  {
    "account": "",
    "address": "bc1q06kznghzfstputgcmrgjfxnrylgc6wg0mnvuxl",
    "category": "generate",
    "amount": 10000.00000000,
    "vout": 1,
    "confirmations": 101,
    "generated": true,
    "blockhash": "eeb14b324f918c9ac837a3bb7a37f405e7d0919c410f0905f7b899fd1b0d40a7",
    "blockindex": 0,
    "blocktime": 0,
    "txid": "865048b0d1f14ac393717414ce88b7ffd6b60690092c41566cde84df672a184a",
    "walletconflicts": [
    ],
    "time": 1542328772,
    "timereceived": 1542328772,
    "bip125-replaceable": "no"
  }
]

The genesis block:

$ hexdump -C blk00000.dat
00000000  ee ee ae c1 72 01 00 00  04 00 00 00 00 00 00 00  |....r...........|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 4a 18 2a 67  |............J.*g|
00000030  df 84 de 6c 56 41 2c 09  90 06 b6 d6 ff b7 88 ce  |...lVA,.........|
00000040  14 74 71 93 c3 4a f1 d1  b0 48 50 86 00 00 00 00  |.tq..J...HP.....|
00000050  00 00 00 00 00 00 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  ff ff 00 1d 01 02 00 01  00 01 00 00 00 00 00 00  |................|
00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000090  00 00 00 00 00 00 00 00  00 00 00 00 00 00 36 35  |..............65|
000000a0  57 68 65 72 65 6f 66 20  6f 6e 65 20 63 61 6e 6e  |Whereof one cann|
000000b0  6f 74 20 73 70 65 61 6b  2c 20 74 68 65 72 65 6f  |ot speak, thereo|
000000c0  66 20 6f 6e 65 20 6d 75  73 74 20 62 65 20 73 69  |f one must be si|
000000d0  6c 65 6e 74 2e ff ff ff  ff 05 00 10 a5 d4 e8 00  |lent............|
000000e0  00 00 16 00 14 33 a4 71  b2 c4 d3 f4 5b 9a b4 70  |.....3.q....[..p|
000000f0  74 55 f7 d2 e9 17 af 5a  6e 00 10 a5 d4 e8 00 00  |tU.....Zn.......|
00000100  00 16 00 14 7e ac 29 a2  e2 4c 16 1e 2d 18 d8 d1  |....~.)..L..-...|
00000110  24 9a 63 27 d1 8d 39 0f  00 10 a5 d4 e8 00 00 00  |$.c'..9.........|
00000120  16 00 14 ca ca 90 11 40  bf 28 7e ff 2a f3 6e de  |.......@.(~.*.n.|
00000130  b4 85 03 ce c4 eb 9f 00  10 a5 d4 e8 00 00 00 16  |................|
00000140  00 14 1f 34 ea 7e 96 d8  21 02 b2 2a fe d6 d5 3d  |...4.~..!..*...=|
00000150  02 71 5f 8f 66 21 00 10  a5 d4 e8 00 00 00 16 00  |.q_.f!..........|
00000160  14 eb 07 ad 5d b7 90 ee  43 24 b5 cd d6 35 70 9f  |....]...C$...5p.|
00000170  47 e4 1f d8 67 00 00 00  00 00 00 00 00 00 00 00  |G...g...........|

Noteworthy:

  • Transactions are native P2WPKH transactions (as can be seen by the bech32 address in listtransactions output above)
  • confirmations: 101 is because of our hack to consider the first 100 blocks to have a mature coinstake... there are not actually a 100 blocks confirming the genesis block's transaction :-X
  • importmasterkey backs up the current wallet, even if that was just created and is empty (you'll end up with wallet.dat~something in your working directory), there is a ticket for that: detect empty wallet or create new wallet #40

This is not to be merged, it duplicates #212 (on purpose)

@scravy scravy closed this Nov 17, 2018
@scravy scravy deleted the genesis-block branch November 27, 2018 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant