Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: ArpFlush on August 19, 2015, 02:19:34 PM



Title: Testnet wallets for classroom
Post by: ArpFlush on August 19, 2015, 02:19:34 PM
Hi all,

Can I copy some contents of my Appdata folder /bitcoin/testnet and paste it in the directories of other pc's that have a fresh install of Bitcoin Core (Testnet)? It's just that I want to avoid waiting the whole day before the blockchain has been downloaded.

Many thanks  ;)


Title: Re: Testnet wallets for classroom
Post by: ArpFlush on August 20, 2015, 11:57:02 AM
*BUMP*


Title: Re: Testnet wallets for classroom
Post by: domob on August 20, 2015, 12:08:35 PM
Can I copy some contents of my Appdata folder /bitcoin/testnet and paste it in the directories of other pc's that have a fresh install of Bitcoin Core (Testnet)? It's just that I want to avoid waiting the whole day before the blockchain has been downloaded.

Yes, you should be able to do that as long as no two running instances try to access the same copy at any one time (which is not what you describe).  I'm not 100% sure if there are issues if you copy the format between operating systems and processor architectures, but at least if you use a comparable system on each computer, it should work.  Make sure to delete the wallet file, though, unless you explicitly want that each computer runs with the same wallet.  (This may produce conflicts when people try to spend coins at the same time.)


Title: Re: Testnet wallets for classroom
Post by: ArpFlush on August 20, 2015, 12:15:26 PM
Yes, you should be able to do that as long as no two running instances try to access the same copy at any one time (which is not what you describe).  I'm not 100% sure if there are issues if you copy the format between operating systems and processor architectures, but at least if you use a comparable system on each computer, it should work.  Make sure to delete the wallet file, though, unless you explicitly want that each computer runs with the same wallet.  (This may produce conflicts when people try to spend coins at the same time.)

Yes, of course every machine should have its own wallet.
Do you think copying the "blocks" subdirectory to all machines is enough?


Title: Re: Testnet wallets for classroom
Post by: domob on August 20, 2015, 12:16:52 PM
Yes, you should be able to do that as long as no two running instances try to access the same copy at any one time (which is not what you describe).  I'm not 100% sure if there are issues if you copy the format between operating systems and processor architectures, but at least if you use a comparable system on each computer, it should work.  Make sure to delete the wallet file, though, unless you explicitly want that each computer runs with the same wallet.  (This may produce conflicts when people try to spend coins at the same time.)

Yes, of course every machine should have its own wallet.
Do you think copying the "blocks" subdirectory to all machines is enough?

No, you definitely also need the "chainstate".  I'm not sure you definitely need the rest, but I would copy it as well.


Title: Re: Testnet wallets for classroom
Post by: ArpFlush on August 20, 2015, 12:28:38 PM
Yes, you should be able to do that as long as no two running instances try to access the same copy at any one time (which is not what you describe).  I'm not 100% sure if there are issues if you copy the format between operating systems and processor architectures, but at least if you use a comparable system on each computer, it should work.  Make sure to delete the wallet file, though, unless you explicitly want that each computer runs with the same wallet.  (This may produce conflicts when people try to spend coins at the same time.)

Yes, of course every machine should have its own wallet.
Do you think copying the "blocks" subdirectory to all machines is enough?

No, you definitely also need the "chainstate".  I'm not sure you definitely need the rest, but I would copy it as well.

Indeed, I've copied "blocks" and "chainstate" to another wallet on another computer and it works  :)


Title: Re: Testnet wallets for classroom
Post by: lontivero on August 22, 2015, 06:23:43 AM
If you want to teach others, you could just create your own private network running two or three nodes that connect one each other. In that way you have full control and don't need to copy gigabytes files again and again.


Title: Re: Testnet wallets for classroom
Post by: deepceleron on August 23, 2015, 12:58:06 PM
Testnet is not gigabytes to download either, it is much smaller than the main chain. As long as the peers find each other on the LAN (which can be done with the "addnode" command-line option) they will be up to date rather quickly.

If your lab is behind a NAT from the real internet, you will want just one "master" node connecting to the internet (with port-forwarding of the bitcoin port to that machine if you have sysadmin access to do so). then all other internal Bitcoins should connect to it by specifying just the master's IP address with the "connect" command-line option.


Title: Re: Testnet wallets for classroom
Post by: ArpFlush on August 24, 2015, 08:29:50 AM
Testnet is not gigabytes to download either, it is much smaller than the main chain. As long as the peers find each other on the LAN (which can be done with the "addnode" command-line option) they will be up to date rather quickly.

If your lab is behind a NAT from the real internet, you will want just one "master" node connecting to the internet (with port-forwarding of the bitcoin port to that machine if you have sysadmin access to do so). then all other internal Bitcoins should connect to it by specifying just the master's IP address with the "connect" command-line option.

Interesting but I'm not a "super techie" to set this in place I think. I would be great though if I could and let the participants mine some coins (they would love it).

Any tutorials to set up an own testnet?
Thanks!