Skip to content

Commit 01ea2e3

Browse files
committedJul 28, 2014
Document how to setup and run a gateway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent a7e6ae7 commit 01ea2e3

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed
 

‎README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ Things you can do:
2828

2929
* Create a transaction with `./pettycoin-tx`.
3030

31-
* **COMING SOON** Run a gateway.
31+
* Send test coins from the bitcoin network to the prototype gateway at `muQY1RFhzu2exJj4wihqfotzDDztS1ieZv` (only if you control the sending address!)
32+
33+
* Run your own gateway (see [docs/RUNNING-A-GATEWAY.md](https://github.com/rustyrussell/pettycoin/blob/master/docs/RUNNING-A-GATEWAY.md).
3234

3335
* **COMING SOON** Create and monitor a simple test wallet.
3436

‎doc/RUNNING-A-GATEWAY.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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

Comments
 (0)
Please sign in to comment.