Thursday, 22 October 2015

managing the game wallet

it has just occurred to me the simple way to manage the game wallet.
(this is the bumba game where coins are regularly deposited into a publicly shared address)
every time the game address is updated, there is no need to keep that address, nor any wallet with that address.
the idea is, you have an address that you constantly send your coins to, and once you are in the game wallet you can send those coins there.
when the address is updated, delete the game wallet.dat and re-open with a fresh wallet. import the new privkey

however if you want to stake, then you will need to keep the wallet with your coins in it open.

REMEMBER all your coins are in these wallets. back them up and keep them safe.

simple version ...
one - generate a personal address
two - send coins to that personal address
three - create a new game wallet

making sure your wallet-qt is stopped.
go to your datadir and rename (or move) the current wallet.dat,
if there are no files called wallet.dat, the wallet-qt will create a brand new file on start up.

start up the wallet-qt, this will generate a brand new key pool which lives in the wallet.dat file,
get a new recieve address. copy this address somewhere handy so you can refer to it in a minute.
optionally dump the private key associated with this address for extra safe keeping.
stop the wallet-qt, go to your data directory.
the new wallet.dat is your new personal wallet. rename it to something obvious (eg wallet.datPERSONAL) and optionally back up externally.
rename the previously backed up wallet.dat and restart. this should now start with your previous transactions.
move all the coins to your new personal address.
shutdown the wallet-qt
rename (or delete) the now defunct wallet.dat
restart the wallet-qt (with another brand newly created wallet.dat file)
import the current game private key.

now whenever the game address is changed, you can now rename (or delete) the current game wallet.dat, create a new one, and import the new private key.
repeat everytime the address updates.

if you want to stake with this process.
whenever you create a brand new wallet, you can import both the game key AND your personal key, then your coins will be available to stake, and the game coins will show as well.

however you will need to use coincontrol to manage sending the game coins as otherwise you may just send your private coins.


note: when you boot off a wallet.dat backup. it can take a few minutes as it needs to scan the blockchain for address history.
an alternative option is to use a similar process of renaming with the entire data directory. you would duplicate the bumbacoin2 folder and then manipulate it's name and the internal wallet.dat.

the shortcomings of this process is an old backup of your data directory will need to sync the blockchain before it can be used.
also depending on the blockchain this folder can be a gigabyte or more each time.

i will dedicate a future post to this process.