|
| 1 | +Running a Pettycoin Gateway |
| 2 | +=========================== |
| 3 | + |
| 4 | +On the test network, anyone can run a pettycoin gateway. It listens |
| 5 | +to the bitcoin (test) network for network sends, and injects funds |
| 6 | +into the pettycoin network. |
| 7 | + |
| 8 | +**It does not yet return funds to the bitcoin network!** |
| 9 | + |
| 10 | +Daemons You Need To Be Running |
| 11 | +------------------------------ |
| 12 | + |
| 13 | +To operate a gateway, you will need to also run the following: |
| 14 | + |
| 15 | +* bitcoind, with configurtion like so (it will also insist you set an |
| 16 | + rpcpassword when you first try to run it). |
| 17 | + |
| 18 | + testnet=1 |
| 19 | + server=1 |
| 20 | + gen=0 |
| 21 | + txindex=1 |
| 22 | + |
| 23 | +* pettycoin, with no particular config. |
| 24 | + |
| 25 | +pettycoin-gateway Setup |
| 26 | +------------------------------ |
| 27 | + |
| 28 | +Make sure bitcoind, pettycoin-tx and pettycoin-query are in the |
| 29 | +path (as pettycoin-gateway will invoke them). |
| 30 | + |
| 31 | +First run `pettycoin-gateway --setup`: |
| 32 | + |
| 33 | + rusty@Petty1:~/src/pettycoin$ pettycoin-gateway --setup |
| 34 | + Gateway address is muQY1RFhzu2exJj4wihqfotzDDztS1ieZv |
| 35 | + |
| 36 | +This will create the following files in ~/.pettycoin: |
| 37 | + |
| 38 | +<dl> |
| 39 | +<dt> `gateway-address` |
| 40 | +<dd> The public address of the gateway (also printed by --setup above). |
| 41 | +<dt> `gateway-privkey` |
| 42 | +<dd> The private key of the gateway (needed to sign pettycoin gateway |
| 43 | + transactions). |
| 44 | +<dt> `gateway-txs` |
| 45 | + |
| 46 | +<dd> The bitcoin transaction IDs the gateway already injected into the |
| 47 | + pettycoin network, so it doesn't inject twice. |
| 48 | +</dl> |
| 49 | + |
| 50 | +It will also create a bitcoin account called "gateway" with a single |
| 51 | +address in it (the same as listed above) to receive funds. |
| 52 | + |
| 53 | +Running pettycoin-gateway |
| 54 | +------------------------- |
| 55 | + |
| 56 | +Now you can run pettycoin-gateway! It exits on any kind of error, |
| 57 | +with no decent diagnostics. But if you run it again it should be |
| 58 | +safe, as it only records injected transactions into gateway-tx after |
| 59 | +they've been injected into the pettycoin network. |
| 60 | + |
| 61 | +Good luck!<br> |
| 62 | +Rusty Russell. |
0 commit comments