Skip to content

Commit

Permalink
Merge #153: Docs docs docs :)
Browse files Browse the repository at this point in the history
419382e Add DEMO.md, update README.md accordingly (Daniela Brozzoni)
90115e3 Add some docs in config_regtest.toml, update directory paths (Daniela Brozzoni)

Pull request description:

  This PR needs revault/cosignerd#12 merged and probably something in coordinator too :)

  Closes #149
  Closes #140

ACKs for top commit:
  edouardparis:
    ACK 419382e
  darosior:
    ACK 419382e -- only change since last review are the typo fixes

Tree-SHA512: 4f78b40eef3e02f6c82a6986c0222baeb55c9f6e8919c79afc1b338772b0fe4db383d558944a7569470d406083c1b7138ef54a8460911cb1cf48329d0cb4395f
  • Loading branch information
darosior committed Apr 19, 2021
2 parents 53160bb + 419382e commit 895a5ac
Show file tree
Hide file tree
Showing 3 changed files with 673 additions and 18 deletions.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,8 @@ the coins stored and may or may not own them) logic is part of this daemon.

## Hacking around

The project is still at a pretty early stage but if you want to start playing around with
`revaultd` you can use the `regtest_manager` script (that we use for hand testing) and
the sample configuration from `contrib/`:
```
$ . contrib/regtest_manager
$ start_regtest
$ fund_regtest
$ start_revaultd
$ re listvaults
{"id":"revault-cli-92537","jsonrpc":"2.0","result":{"vaults":[{"address":"bcrt1q0ty30ss87wlsvsgvrxsg62ql8yqlu0dv3tsu4gsl772xmvsrw39qlutjsf","amount":1000000000,"derivation_index":0,"status":"unconfirmed","txid":"12843e238f59a7ffd5f0a2a28a65cd20781aa05161cfd53a3d7f56285e61b90e","updated_at":1614209188,"vout":1}]}}
$ re getrevocationtxs 12843e238f59a7ffd5f0a2a28a65cd20781aa05161cfd53a3d7f56285e61b90e:1
{"id":"revault-cli-92891","jsonrpc":"2.0","result":{"cancel_tx":"cHNidP8BAF4CAAAAAc4RMyzSOoRpg+HR+bicF7GpKjOI2tonstEVtatRgC9SAAAAAAASAAAAAcramTsAAAAAIgAgeskXwgfzvwZBDBmgjSgfOQH+PayK4cqiH/eUbbIDd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maVOILackL+7bXzjcToJ6miTuKM5UrgAA","emergency_unvault_tx":"cHNidP8BAF4CAAAAAc4RMyzSOoRpg+HR+bicF7GpKjOI2tonstEVtatRgC9SAAAAAAASAAAAAcramTsAAAAAIgAgy7Co1PHzwoce0hHQR5RHMS72lSZudTF3bYrNgqLbkDYAAAAAAAEBK7Q9mjsAAAAAIgAgkZsLTmCBE0UTOapo8tzU97jFVv+fHh4Y+Y1SkBfMMG4BAwSBAAAAAQX9RwFSIQOEoGzvh3EFsazZvA6Qb609TIK4OkXuuPz2Eo3YKk+5xSED+lw1lkwnnrMBljpOnJyczV2en7v3QZee+1t/9PAABz5SrmR2qRSDL7y+QT7pBs+sxl0GpJlQM5BtbIisa3apFKrKneB67gEXVykGpeXyzLdGHA1UiKxsk2t2qRTh3bX059mGMhlF0I4ObpMO9VamgIisbJNrdqkUVbeuDJdRpOq7YfvN73KUhtVg8PaIrGyTVIdnVCECZEz54reP6wp1HlBQL1MKTL0LvaMCB3lgU5HnFlTdZsIhA87VXRIIvYxrQrEeKbqld3EcroMbOhKWYHxeXT7TZfScIQJiN/ZV879F/Wt6oA6RwmA9YVXxzAAeQPXkdmLZZcTHeSEDCjy8+/33Ei/n+oMDVMlW6mWV8tveIyhvA7wewMFoXKNUrwESsmgAAA=="}}
$ re stop
```
Please see [`doc/DEMO.md`](doc/DEMO.md) if you want a tutorial on how to do a deployment
in regtest on Linux of revaultd.
You can find more RPC commands at [`doc/API.md`](doc/API.md) but all aren't implemented
yet!

Expand Down
37 changes: 33 additions & 4 deletions contrib/config_regtest.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# If `true`, revaultd will start as a daemon. If you're using revaultd with revault-gui, you might want to keep it to `true`, so that the gui can start revaultd on its own. If you're starting `revaultd` for the first time, you may want to change it to `false`, so that you can see if something goes wrong.
daemon = true
log_level = "debug"
data_dir = "/home/darosior/projects/revault/d/regtest/revault"
# The directory where all your revault data will be saved
data_dir = "/path/to/your/datadir/revault"

coordinator_host = "127.0.0.1:8383"
coordinator_noise_key = "f35b02f12ff3d64f3c7982b88ffb66fec37bce5796374a7be9e8e2dd9abbb558"

# The xpubs of all the stakeholders.
# This option MUST NOT be changed after running revaultd for the first time. If you want to change it, please remove the following files:
# - /path/to/your/data_dir/revaultd.sqlite3
# - /path/to/your/data_dir/revaultd-watchonly-wallet-1
stakeholders_xpubs = [
# xprv9yFvjFWhx6hEJ3srPPCMAhQyrUhwJ9joByaQcJJAC37HsavncgLzq5ppWeb6QmkYEaYDkiJf424zHzmcjXx3Fn6DZqKx9EKpiv94suYjZ6e
"xpub6CFH8m3bnUFXWXxKVQjMXqMiQWYRhcTeZCW1QghmkNeGkPFwADfFNt9JMuW38MnYVSAV9eyqJ3A61kbsfC5PSCdkZWi7pD2L4jv6edaPxKp",
Expand All @@ -15,34 +21,57 @@ stakeholders_xpubs = [
# xprvA1UEBJLZFm1oZUKLubtgeqhYBKjKPQqWaw5qMkg7GyyEjc9PQs5HiBVR3CpEAAawkF9jhd9LyV6arxBCYat8DAF5ChDDDKYB4GCVwUGz87C
"xpub6ETaaosT68a6mxPp1dRh1yeGjMZonsZMxA1SA95iqKWDcQUXxQPYFyottUR58E8qjjnAwPcEtYS9iejkERbnGuNqfF2wgToLcxzf97FHevs"
]

# The keys of all the cosigners
# This option MUST NOT be changed after running revaultd for the first time. If you want to change it, please remove the following files:
# - /path/to/your/data_dir/revaultd.sqlite3
# - /path/to/your/data_dir/revaultd-watchonly-wallet-1
cosigners_keys = [
"02644cf9e2b78feb0a751e50502f530a4cbd0bbda3020779605391e71654dd66c2",
"03ced55d1208bd8c6b42b11e29baa577711cae831b3a1296607c5e5d3ed365f49c",
"026237f655f3bf45fd6b7aa00e91c2603d6155f1cc001e40f5e47662d965c4c779",
"030a3cbcfbfdf7122fe7fa830354c956ea6595f2dbde23286f03bc1ec0c1685ca3",
]

# The xpubs of all the managers
# This option MUST NOT be changed after running revaultd for the first time. If you want to change it, please remove the following files:
# - /path/to/your/data_dir/revaultd.sqlite3
# - /path/to/your/data_dir/revaultd-watchonly-wallet-1
managers_xpubs = [
# xprv9yFvjFWhx6hEhx2fRYSC31pU3nH3Mrok4sBwUt4pV3RJZYN1oex2imuuxUt3eyhbZ2mKdBAWQaVyhg3WXuzrnRhRZbicr2X5hmNuhTxHGEn
"xpub6CFH8m3bnUFXvS78XZyCQ9mCbp7XmKXbS67YHGUS3NxHSLhAMCGHGaEPojcoYt5PYnocyuScAM5xuDzf4BqFQt3fhmKEaRgmVzDcAR46Byh",
# xprvA1DDS2qX9vCdRxSJmFA6AJPQPKS32S5hiUpzi9Xot9hzN4z1g6ip5oKJWXUeQDn2W48vaSWYVLaypC1JztUcrx23kucEtFzyU8t5Ay7NrDD
"xpub6ECZqYNQzHkveSWmsGh6XSL8wMGXRtoZ5hkbWXwRSVEyEsKADe34dbdnMob1ZjUpd4TD7no1isnnvpQq9DchFes5DnHJ7JupSntZsKr7VbQ"
"xpub6ECZqYNQzHkveSWmsGh6XSL8wMGXRtoZ5hkbWXwRSVEyEsKADe34dbdnMob1ZjUpd4TD7no1isnnvpQq9DchFes5DnHJ7JupSntZsKr7VbQ"
]

# The CSV for the spend transaction
# This option MUST NOT be changed after running revaultd for the first time. If you want to change it, please remove the following files:
# - /path/to/your/data_dir/revaultd.sqlite3
# - /path/to/your/data_dir/revaultd-watchonly-wallet-1
unvault_csv = 18

[bitcoind_config]
network = "regtest"
cookie_path = "/home/darosior/projects/revault/d/regtest/bcdir1/regtest/.cookie"
cookie_path = "/path/to/your/cookie/path/.cookie"
addr = "127.0.0.1:9001"
poll_interval_secs = 3

# We are one of the below stakeholders
# This section must be copied only if you're a stakeholder. Put here your xpub, watchtower configuration and emergency address
[stakeholder_config]
# This option MUST NOT be changed after running revaultd for the first time. If you want to change it, please remove the following files:
# - /path/to/your/data_dir/revaultd.sqlite3
# - /path/to/your/data_dir/revaultd-watchonly-wallet-1
# xprv9yFvjFWhx6hEJ3srPPCMAhQyrUhwJ9joByaQcJJAC37HsavncgLzq5ppWeb6QmkYEaYDkiJf424zHzmcjXx3Fn6DZqKx9EKpiv94suYjZ6e
xpub = "xpub6CFH8m3bnUFXWXxKVQjMXqMiQWYRhcTeZCW1QghmkNeGkPFwADfFNt9JMuW38MnYVSAV9eyqJ3A61kbsfC5PSCdkZWi7pD2L4jv6edaPxKp"
# At the moment this is unused
watchtowers = [ { host = "127.0.0.1:1", noise_key = "46084f8a7da40ef7ffc38efa5af8a33a742b90f920885d17c533bb2a0b680cb3" } ]
emergency_address = "bcrt1qewc2348370pgw8kjz8gy09z8xyh0d9fxde6nzamd3txc9gkmjqmq8m4cdq"

# This section must be copied only if you're a manager. Put here your xpub and cosigner configuration
[manager_config]
# This option MUST NOT be changed after running revaultd for the first time. If you want to change it, please remove the following files:
# - /path/to/your/data_dir/revaultd.sqlite3
# - /path/to/your/data_dir/revaultd-watchonly-wallet-1
# xprvA1DDS2qX9vCdRxSJmFA6AJPQPKS32S5hiUpzi9Xot9hzN4z1g6ip5oKJWXUeQDn2W48vaSWYVLaypC1JztUcrx23kucEtFzyU8t5Ay7NrDD
xpub = "xpub6ECZqYNQzHkveSWmsGh6XSL8wMGXRtoZ5hkbWXwRSVEyEsKADe34dbdnMob1ZjUpd4TD7no1isnnvpQq9DchFes5DnHJ7JupSntZsKr7VbQ"
cosigners = [ { host = "127.0.0.1:1", noise_key = "087629614d227ff2b9ed5f2ce2eb7cd527d2d18f866b24009647251fce58de38" } ]
Loading

0 comments on commit 895a5ac

Please sign in to comment.