Skip to content

Instantly share code, notes, and snippets.

@cryptobender69
Created February 24, 2018 05:12
Show Gist options
  • Save cryptobender69/909dcc8b8b60dc38254a490dd5fbd8f5 to your computer and use it in GitHub Desktop.
Save cryptobender69/909dcc8b8b60dc38254a490dd5fbd8f5 to your computer and use it in GitHub Desktop.
genesis_tx
curl 'http://api.forknote.net:8090/genesis_tx/' -H 'Origin: http://forknote.net' \
-H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.9,pt;q=0.8' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' \
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/plain, */*' \
-H 'Referer: http://forknote.net/create/' -H 'Connection: keep-alive' \
--data '{"MoneySupply":"100000000000000000","EmissionSpeedFactor":21,"DifficultyTarget":60,"GenesisBlockReward":"1000000000","AddressPrefix":322560377,"Addresses":["imzt1vK1qVFNP5N4hMrgs96Fz4zvP9gJ5MTh1YpKVVVtBc54Co2K12J1sczeHe6DDQBsBkmfN37rxAWssaf7LU7eVmQWvRboxG31H"]}' \
--compressed
@cryptobender69
Copy link
Author

cryptobender69 commented Mar 21, 2018

Source: https://monero.stackexchange.com/questions/2886/how-can-i-create-a-new-monero-genesis-block
Follow the above and change the unlock time bits to 3c is you unlock time is 60.
Go https://github.com/monero-project/monero/blob/master/src/cryptonote_config.h#L133 and screw around with the genesis tx and nonce. You probably also want to change other stuff (network id) to avoid contacting live Monero nodes.

I've helpfully decoded the genesis tx so you know/can guess what to change:

version
01
unlock time (varint, height, 60 here)
3c
vin length (value in)
01
vin #1 (of 1) type (gen, 0xff)
ff
height for gen input
00
vout length (value out)
01
output #1 (of 1) amount (17592186044415 as varint)
ffffffffffff03
output #1 type (to key, 0x02)
02
output #1 key (32 bytes)
9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071
extra length in bytes (varint, here 33)
21
extra pubkey tag (0x01)
01
transaction pubkey (32 bytes)
7767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment