Skip to content

Commit 704d415

Browse files
author
Matt Corallo
committed
Merge pull request #7 from faizkhan00/fix-markdown
Fix markdown to improve readability of alpha-README.md
2 parents 7848ae0 + 5237cc0 commit 704d415

1 file changed

Lines changed: 84 additions & 79 deletions

File tree

alpha-README.md

Lines changed: 84 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,93 @@
11
See https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md
22
for notes on dependencies that must be installed before beginning.
33

4-
To run alphad:
5-
1. Download/build bitcoind/alphad
6-
```bash
7-
git clone https://github.com/ElementsProject/elements
8-
cd elements
9-
git checkout bitcoin
10-
./autogen.sh && ./configure && make
11-
mv src/bitcoin{d,-cli,-tx} ../
12-
git checkout alpha
13-
./autogen.sh && ./configure && make
14-
mv src/alpha{d,-cli,-tx} ../
15-
cd ..
16-
```
17-
2. Run bitcoind/alphad
18-
```bash
19-
RPC_USER=user
20-
RPC_PASS=pass
21-
./bitcoind -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -txindex -daemon
22-
./alphad -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -rpcconnect=127.0.0.1 -rpcconnectport=18332 -tracksidechain=all -txindex -blindtrust=true -daemon
23-
```
24-
Note that once bitcoind finishes syncing, you can set -blindtrust=false to check that transfers to Elements Alpha are from confirmed bitcoin blocks.
4+
### To run alphad:
255

26-
To move money into Elements Alpha:
27-
1. See 1 and 2 in "To run alphad"
28-
2. Download secp256k1:
29-
```bash
30-
git clone https://github.com/bitcoin/secp256k1
31-
cd secp256k1
32-
./autogen.sh && ./configure --with-bignum=no && make
33-
make DESTDIR=`pwd`/install install
34-
cd ..
35-
```
36-
3. Download contracthashtool
37-
```bash
38-
git clone https://github.com/blockstream/contracthashtool
39-
cd contracthashtool
40-
make CXXFLAGS="-I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static"
41-
cd ..
42-
```
43-
4. Download python-bitcoinrpc
44-
```bash
45-
git clone https://github.com/jgarzik/python-bitcoinrpc
46-
```
47-
5. Use sidechain-manipulation.py:
48-
```bash
49-
[matt@2ca87f82dd9a bitcoin]$ cd elements
50-
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py generate-one-of-one-multisig sidechain-wallet
51-
One-of-one address: 22E8NxAdeYCatCFXFeLUbhfzBxUioGxP3dk9VH849exka9umWLkxzRmFFEwsLKR1pjPeE8UZRkVEQ7uab
52-
P2SH address: 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j
53-
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py send-to-sidechain 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j 1
54-
Sending 1 to 2N3zXjbwdTcPsJiy8sUK9FhWJhqQCxA8Jjr...
55-
(nonce: 94ffbf32c1f1c0d3089b27c98fd991d5)
56-
Sent tx with id bf01b88710b6023125379510ebd84b373bee88217c80739a1144e5e92b4ee2d0
6+
1\. Download/build bitcoind/alphad
7+
```bash
8+
git clone https://github.com/ElementsProject/elements
9+
cd elements
10+
git checkout bitcoin
11+
./autogen.sh && ./configure && make
12+
mv src/bitcoin{d,-cli,-tx} ../
13+
git checkout alpha
14+
./autogen.sh && ./configure && make
15+
mv src/alpha{d,-cli,-tx} ../
16+
cd ..
17+
```
18+
2\. Run bitcoind/alphad
19+
```bash
20+
RPC_USER=user
21+
RPC_PASS=pass
22+
./bitcoind -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -txindex -daemon
23+
./alphad -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS -testnet -rpcconnect=127.0.0.1 -rpcconnectport=18332 -tracksidechain=all -txindex -blindtrust=true -daemon
24+
```
25+
Note that once bitcoind finishes syncing, you can set -blindtrust=false to check that transfers to Elements Alpha are from confirmed bitcoin blocks.
5726

58-
--- 10 testnet blocks later ---
27+
### To move money into Elements Alpha:
5928

60-
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py claim-on-sidechain 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j 94ffbf32c1f1c0d3089b27c98fd991d5 bf01b88710b6023125379510ebd84b373bee88217c80739a1144e5e92b4ee2d0
61-
Redeeming from utxo 0377d218c36f5ee90244e660c387002296f3e4d5cac8fac8530b07e4d3241ccf:0 (value 21000000, refund 20999999)
62-
Success!
63-
Resulting txid: eabe26aba6286e1ee439baedeb75094ec0bcdaf54ed9481d9d2183e8a6424755
29+
1\. See 1 and 2 in "To run alphad"
30+
2\. Download secp256k1:
31+
```bash
32+
git clone https://github.com/bitcoin/secp256k1
33+
cd secp256k1
34+
./autogen.sh && ./configure --with-bignum=no && make
35+
make DESTDIR=`pwd`/install install
36+
cd ..
37+
```
38+
3\. Download contracthashtool
39+
```bash
40+
git clone https://github.com/blockstream/contracthashtool
41+
cd contracthashtool
42+
make CXXFLAGS="-I../secp256k1/install/usr/local/include -L../secp256k1/install/usr/local/lib -static"
43+
cd ..
44+
```
45+
4\. Download python-bitcoinrpc
46+
```bash
47+
git clone https://github.com/jgarzik/python-bitcoinrpc
48+
```
49+
5\. Use sidechain-manipulation.py:
50+
```bash
51+
[matt@2ca87f82dd9a bitcoin]$ cd elements
52+
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py generate-one-of-one-multisig sidechain-wallet
53+
One-of-one address: 22E8NxAdeYCatCFXFeLUbhfzBxUioGxP3dk9VH849exka9umWLkxzRmFFEwsLKR1pjPeE8UZRkVEQ7uab
54+
P2SH address: 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j
55+
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py send-to-sidechain 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j 1
56+
Sending 1 to 2N3zXjbwdTcPsJiy8sUK9FhWJhqQCxA8Jjr...
57+
(nonce: 94ffbf32c1f1c0d3089b27c98fd991d5)
58+
Sent tx with id bf01b88710b6023125379510ebd84b373bee88217c80739a1144e5e92b4ee2d0
6459

65-
--- 144 sidechain blocks later ---
66-
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py spend-from-claim eabe26aba6286e1ee439baedeb75094ec0bcdaf54ed9481d9d2183e8a6424755 22E8NxAdeYCatCFXFeLUbhfzBxUioGxP3dk9VH849exka9umWLkxzRmFFEwsLKR1pjPeE8UZRkVEQ7uab
67-
Submitting tx to mempool...
68-
Success!
69-
```
60+
--- 10 testnet blocks later ---
7061

71-
To move money back out of Elements Alpha:
72-
1. See 1-4 of above.
73-
4. Use sidechain-manipulation.py:
74-
```bash
75-
[matt@2ca87f82dd9a bitcoin]$ cd elements
76-
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py generate-one-of-one-multisig mainchain-wallet
77-
One-of-one address: mm8UW9YsjeHoVhXbHG4hEFKJt52P5iB7Vi
78-
P2SH address: 2MzqiCCUwtKKEV9Kxiyvk8ZuNCFKbcbneva
79-
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py send-to-mainchain 2MzqiCCUwtKKEV9Kxiyvk8ZuNCFKbcbneva 1
62+
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py claim-on-sidechain 2NCs5ufweTL8VHKNT6wrZMTkrnnmpZCy99j 94ffbf32c1f1c0d3089b27c98fd991d5 bf01b88710b6023125379510ebd84b373bee88217c80739a1144e5e92b4ee2d0
63+
Redeeming from utxo 0377d218c36f5ee90244e660c387002296f3e4d5cac8fac8530b07e4d3241ccf:0 (value 21000000, refund 20999999)
64+
Success!
65+
Resulting txid: eabe26aba6286e1ee439baedeb75094ec0bcdaf54ed9481d9d2183e8a6424755
66+
67+
--- 144 sidechain blocks later ---
68+
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py spend-from-claim eabe26aba6286e1ee439baedeb75094ec0bcdaf54ed9481d9d2183e8a6424755 22E8NxAdeYCatCFXFeLUbhfzBxUioGxP3dk9VH849exka9umWLkxzRmFFEwsLKR1pjPeE8UZRkVEQ7uab
69+
Submitting tx to mempool...
70+
Success!
71+
```
72+
73+
### To move money back out of Elements Alpha:
74+
75+
1. See 1-4 of above.
76+
4\. Use sidechain-manipulation.py:
77+
```bash
78+
[matt@2ca87f82dd9a bitcoin]$ cd elements
79+
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py generate-one-of-one-multisig mainchain-wallet
80+
One-of-one address: mm8UW9YsjeHoVhXbHG4hEFKJt52P5iB7Vi
81+
P2SH address: 2MzqiCCUwtKKEV9Kxiyvk8ZuNCFKbcbneva
82+
[matt@2ca87f82dd9a bitcoin]$ ./contrib/sidechain-manipulation.py send-to-mainchain 2MzqiCCUwtKKEV9Kxiyvk8ZuNCFKbcbneva 1
83+
```
84+
85+
### To run a fedpeg operator (for your own sidechain):
86+
1. See 1 and 2 in "To run alphad" (Do not forget to append -blindtrust=false to the alphad command args once bitcoin syncs!)
87+
2. See 2-4 of "To move money into Elements Alpha"
88+
Note that the bitcoind/sidechaind wallets must be EMPTY of keys/transactions except for those created automatically by fedpeg scripts
89+
3. Install python ZeroMQ.
90+
4. Ensure your clock is reasonably accurate (within a second should suffice)
91+
5. Edit bitcoin/contrib/fedpeg/constants.py with the neccessary information
92+
6. As a daemon/in screen/etc, run both bitcoin/contrib/fedpeg/withdrawwatch.py and bitcoin/contrib/fedpeg/blocksign.py
8093

81-
To run a fedpeg operator (for your own sidechain):
82-
1. See 1 and 2 in "To run alphad" (Do not forget to append -blindtrust=false to the alphad command args once bitcoin syncs!)
83-
2. See 2-4 of "To move money into Elements Alpha"
84-
Note that the bitcoind/sidechaind wallets must be EMPTY of keys/transactions except for those created automatically by fedpeg scripts
85-
3. Install python ZeroMQ.
86-
4. Ensure your clock is reasonably accurate (within a second should suffice)
87-
5. Edit bitcoin/contrib/fedpeg/constants.py with the neccessary information
88-
6. As a daemon/in screen/etc, run both bitcoin/contrib/fedpeg/withdrawwatch.py and bitcoin/contrib/fedpeg/blocksign.py

0 commit comments

Comments
 (0)