Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasabi 2 initial implementation #322

Open
wants to merge 219 commits into
base: features/wasabi
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
0c9631a
mine up to 101 blocks in regtest
phillamy May 5, 2022
90b0c61
Inserted mine.sh code into createWallet.sh
phillamy May 5, 2022
b9af8f2
Check if wallet balance is less than 1 btc
phillamy May 5, 2022
e0c7c99
Mine 101 blocks if balance is less than 1 btc
phillamy May 6, 2022
7e2a3e2
first draft - tx details sent in publish
phillamy May 10, 2022
06998aa
Add generatetoaddress in proxy + tests
phillamy May 16, 2022
f357533
Added comment
phillamy May 16, 2022
047f4b3
some more work
phillamy May 17, 2022
30363a9
Added the PID in logging
phillamy May 19, 2022
cb2fd59
used walletnotify in replacement of conf
phillamy May 24, 2022
8378ee6
Make all arguments optional with default values
phillamy May 25, 2022
c08edb3
Features/gettxoutproof (#234)
phillamy May 26, 2022
7a9ed17
Merge 'upstream/dev' + added GET
phillamy May 26, 2022
7af8592
Merge upstream
phillamy May 27, 2022
a95163d
added port+network display for welcome app
phillamy May 26, 2022
f9e699d
Corrections after PR comments
phillamy Jun 13, 2022
2f0abdb
Sync sample with actual file
phillamy Jun 13, 2022
5e97087
renumbered return code
phillamy Jun 13, 2022
1c735cc
Added comment - it's a sample !
phillamy Jun 13, 2022
39b83fe
PR review - change requests
phillamy Jun 14, 2022
7e99917
Removed /conf
phillamy Jun 14, 2022
114ea5c
removed /conf from gatekeeper
phillamy Jun 14, 2022
16fb9a2
removed /conf from yaml
phillamy Jun 14, 2022
22ccc1b
Merge pull request #267 from phillamy/features/proxy-mine
Kexkey Jun 14, 2022
d21159e
Merge remote-tracking branch 'upstream/dev' into features/async-walle…
phillamy Jun 15, 2022
bcc0a36
Merge pull request #266 from phillamy/features/async-walletnotify
Kexkey Jun 17, 2022
bd1944e
Fixed broken computefees
Kexkey Jun 22, 2022
21c182d
Moved proxy from Alpine-glibc to Debian
Kexkey Jul 14, 2022
be53b34
Fixed ncat being PID 1
Kexkey Jul 14, 2022
17c6e5f
replace IFS=newline for dash
phillamy Jul 14, 2022
b986341
Added double-quotes to function args
Kexkey Jul 14, 2022
e472bd9
Fix: [WARNING]: Empty continuation line found in:
phillamy Jul 14, 2022
65c68b6
Added some explanations
Kexkey Jul 15, 2022
bbd0904
More double-quotes safeguards
Kexkey Jul 15, 2022
e98f0d0
Added dbl quotes to parameters for dash
phillamy Jul 15, 2022
bdca66f
added dbl quotes to parameter for dash
phillamy Jul 15, 2022
f92a9bf
added dbl quotes to param for dash
phillamy Jul 15, 2022
7c67e91
retiring the old legacypay command in CLN v0.11.0
phillamy Jul 19, 2022
0866d1f
run tests inside Alpine test container
phillamy Jul 20, 2022
1493787
Tor bumped to 0.4.7.8 + Alpine 3.15.4
phillamy Jul 9, 2022
a8d84d4
Fixed wrong ownership for cyphernode_container_monitor volume
Kexkey Jul 28, 2022
592b1eb
Changed alpine version to a fixed one in start.sh
Kexkey Jul 29, 2022
d38b29d
bumped cron to Alpine:3.15.4 + tests
phillamy Jul 29, 2022
530c54e
core bumped to v23
phillamy Jul 21, 2022
7834df5
fix for flock, requesthandler
phillamy Jul 28, 2022
f7eb5d5
removed duplicate local txid=
phillamy Jul 28, 2022
693e2a1
Redirect flock verbose output to stderr
phillamy Jul 29, 2022
beb8b15
trace flock output
phillamy Aug 2, 2022
77e03d9
Fix for if statement using == operator inst of =
phillamy Aug 2, 2022
fcd1fd8
log flock output
phillamy Aug 2, 2022
48659ff
crap removed
phillamy Aug 2, 2022
d0d78c4
Fix IFS with NO space
phillamy Aug 3, 2022
f676848
fix
phillamy Aug 3, 2022
69d9654
rebase - replace core call to proxy by pub to broker
phillamy May 6, 2022
3c99a8a
rebase - new test
phillamy May 7, 2022
dd257a0
moved getblock from proxy to btc node
phillamy May 8, 2022
c30b455
using pub/sub retained messages
phillamy May 10, 2022
0cbaba6
took out blank line
phillamy May 10, 2022
eb42a41
typo
phillamy May 10, 2022
e28cca5
Missing #include source scripts
phillamy May 11, 2022
320fc5d
Added PID in logging
phillamy May 19, 2022
c4adc97
rebase - changed newblock by blocknotify to be more core
phillamy May 24, 2022
a6c6cc8
rebase - Changes after CR + doc updates
phillamy Jun 14, 2022
d87972e
rebase removed mqtt --retain messages.Only pub chain tip
phillamy Jun 14, 2022
a25a481
Added dbl quotes to parameters for dash
phillamy Jul 15, 2022
f425c79
rebaes - fixes dbl quotes - strings
phillamy Jul 15, 2022
f9ab14e
rebase - Redirect stderr to keep btc core log clean
phillamy Jul 15, 2022
d82070f
vigorously updated tests with embedded CB server
phillamy Jul 22, 2022
38e99d3
More reliable name to kill proxy
phillamy Jul 26, 2022
a875a8f
renamed a couple of files
phillamy Jul 26, 2022
f1b070b
redirect flock verbose output to stderr
phillamy Jul 29, 2022
8d8061a
new process created on new tip events
phillamy Aug 4, 2022
e95b39b
New topic names + improvements
phillamy Aug 5, 2022
3e7d5c2
IFS fix again
phillamy Aug 5, 2022
d2f6cc6
remove trailing spaces
phillamy Aug 5, 2022
822f31e
Added spaces in watch labels
phillamy Aug 5, 2022
3915e94
Bump decode-uri-component from 0.2.0 to 0.2.2 in /cyphernodeconf_docker
dependabot[bot] Dec 3, 2022
7fca4bc
Bump qs from 6.5.2 to 6.5.3 in /cyphernodeconf_docker
dependabot[bot] Dec 9, 2022
df7e652
Upgraded Bitcoin and Lightning
Kexkey Jan 3, 2023
d950b31
Fixes for cln v22
Kexkey Jan 9, 2023
a046d48
Downgraded to postgresql 13 because of arm32
Kexkey Jan 9, 2023
0a58796
Create legacy wallets for watching
Kexkey Jan 10, 2023
ab97ed5
callbackserver wasn't always working in tests
Kexkey Jan 10, 2023
64034e3
We need to stay at pg-14
Kexkey Jan 11, 2023
fe41d95
Since traefik 2 upgrade, HTTPS not needed on Tor
Kexkey Jan 11, 2023
3796a37
Fixed a Linux only permission problem during setup
Kexkey Jan 11, 2023
7adb35e
Fixed CLN config
Kexkey Jan 11, 2023
5b7954d
Wasabi 2 initial implementation
Talej Nov 12, 2023
f9243c9
minor wasabi2 fixes
Talej Nov 21, 2023
64ca58b
torgen fix - dev base
Talej Nov 1, 2023
21631a9
fixed unwatchtx errors
Talej Nov 22, 2023
a79f99e
wasabi tweaks
Talej Nov 28, 2023
01c9b76
Make feature properties required only if feature is enabled
schulterklopfer Jul 7, 2019
5e4504f
added wasabi config options to cyphernodeconf
schulterklopfer Jul 7, 2019
9dd3095
Added wasabi docker image files
schulterklopfer Jul 7, 2019
5e708a0
removed debug output
schulterklopfer Jul 7, 2019
fca9217
Added wasabi data path to cyphernodeconf
schulterklopfer Jul 7, 2019
1f929ce
added wasabi stuff to setup.sh
schulterklopfer Jul 7, 2019
95cb844
Added wasabi dirs to checks
schulterklopfer Jul 7, 2019
8aaa1e1
Added wasabi to possible optional features
schulterklopfer Jul 11, 2019
8adefe2
Added basic framework for wasabi api endpoints
schulterklopfer Jul 13, 2019
82b4d3a
Using official Wasabito now
schulterklopfer Aug 20, 2019
4b4921e
Well ok... Roleback since Feature branch is work in progress
schulterklopfer Aug 20, 2019
b24738f
Config.json wasn't rewritten on new setup, regtest config, comments
Kexkey Aug 30, 2019
bd52da1
Regtest bump with coordinator support
schulterklopfer Aug 30, 2019
f8f29c2
bump some files :D
schulterklopfer Aug 30, 2019
bee420d
depends_on and more comments to help test
Kexkey Aug 30, 2019
b830202
Removed --mixall so it doesn't remix already enough mixed coins
Kexkey Sep 1, 2019
0950422
Wasabi now waits for Bitcoin Core to be ready
Kexkey Sep 4, 2019
e283430
Added tests for Wasabi deployment and Bitcoin Core wait
Kexkey Sep 4, 2019
0592e3d
Make wasabi_newaddr work
Kexkey Sep 5, 2019
32b97f1
Empty functions not good
Kexkey Sep 5, 2019
9c536e2
Wasabi get_balance
Kexkey Sep 7, 2019
f5e0e44
getbalance endpoint name fix in tests
Kexkey Sep 7, 2019
9555e75
Changes to wasabi container to use latest wasabito. Partial wasabi en…
Kexkey Sep 10, 2019
88db841
Added patch for remote regtest bitcoin core
schulterklopfer Sep 10, 2019
4f5e3ad
added useful snippets for wasabi testing
schulterklopfer Sep 10, 2019
d09bf55
First working draft for Wasabi Spend
Kexkey Sep 10, 2019
92b8ccb
Content !!1 :D
schulterklopfer Sep 10, 2019
7b000c5
wasabi_batchprivatetospender v0
Kexkey Sep 30, 2019
c34b0b4
Works with latest Wasabito now, added additional param to send roc co…
schulterklopfer Sep 30, 2019
ed02aab
wasabi_batchprivatetospender works
Kexkey Sep 30, 2019
edc22ed
Added optional to param subtractFee
schulterklopfer Sep 30, 2019
6f766b6
Patch for send roc command: when sending to multiple outputs, the fee…
schulterklopfer Oct 3, 2019
ba4791e
Mining fee can now be subtracted from a specific output
schulterklopfer Oct 3, 2019
a8c99c4
Backend and regtest fixes
Kexkey Oct 4, 2019
a5bbea6
Automatic spend of mixed coins for every instances, with subtractFee
Kexkey Oct 4, 2019
cef132f
Removed subtractFee patch
Kexkey Oct 7, 2019
ed2b04c
Patches to Wasabi code for C# 8 on Core 2.2
Kexkey Oct 7, 2019
7b9e342
Tweak wasabi backend/instance order and useful notes
Kexkey Oct 7, 2019
0e4484e
Make backend work
Kexkey Oct 8, 2019
01e99f3
Wasabi configs
Kexkey Oct 8, 2019
1fd75a7
Wasabi config and backend optimizations for indexing
Kexkey Oct 13, 2019
a88b387
Patched Wasabi files moved
Kexkey Oct 16, 2019
a356b37
Clean up
Kexkey Oct 17, 2019
72d34bb
Backend is usable in regtest only
Kexkey Oct 23, 2019
b740da2
Fixed condition and added wasabi endpoints to gatekeeper
Kexkey Oct 28, 2019
a23baf4
NBitcoin version bump
Kexkey Oct 29, 2019
97df417
Fix when keyPath contains single quotes
Kexkey Oct 30, 2019
ca96240
nginx not needed in wasabi backend
Kexkey Oct 31, 2019
f172569
Added backend port to connect directly to it instead of nginx rev. pr.
Kexkey Oct 31, 2019
4a2de78
New way to build utxo to spend and protection against block flood tes…
Kexkey Nov 3, 2019
19afc5a
A little bit of cleaning...
Kexkey Nov 3, 2019
be1f659
Improved spending mixed coins
Kexkey Nov 9, 2019
1e833e6
Starting gethistory
Kexkey Nov 11, 2019
ad8c605
Wasabi upgrade
schulterklopfer Dec 20, 2019
1ef0a1a
Updated Wasabi to official Repo \o/ ... YAY!
schulterklopfer Jan 19, 2020
a2b30c1
Post-rebase-merge commit to fix things
Kexkey Feb 28, 2020
9a37ed6
Fixed for latest Wasabi RPC version
Kexkey Feb 28, 2020
3c649e1
wasabi_gettransactions
Kexkey Feb 28, 2020
3b7a5d5
Added optional instanceId to wasabi_getnewaddress
Kexkey Mar 8, 2020
459e7df
Changed wasabi_getbalance to wasabi_getbalances and fixed tests
Kexkey Mar 15, 2020
2cad529
Upgraded wasabi to v1.1.10.3
Kexkey Mar 16, 2020
0f13657
Adapted for new version of Wasabi, graceful stop and select wallet
Kexkey Apr 9, 2020
5af2112
Fix crash when Wasabi feature not selected
Kexkey Apr 17, 2020
70ea942
Add missing wasabi_gettransactions to api.properties
gabidi Apr 23, 2020
b63d217
Change tx label for autospend
gabidi Apr 26, 2020
9242f49
Add getunspentcoins
gabidi Apr 26, 2020
8b9ba18
Make WASABI_MIXUNTIL in spend an optional parameter that falls back t…
gabidi Apr 26, 2020
1ab3eea
add minanonset to spending and balances. Clean up spend fn
gabidi Apr 27, 2020
b5e717b
Fix label conditional in wasabi_spend to test for null
gabidi Apr 27, 2020
7031f29
Upgraded Wasabi to silent version 1.1.11.1
Kexkey Apr 28, 2020
fcd1626
DustThreshold of 0.00000001 for Wasabi
Kexkey May 6, 2020
8b6e66d
More detailed wasabi balances
Kexkey May 6, 2020
cd4e52f
typo for rcvd_0conf
Kexkey May 6, 2020
5714e5b
Bug fix utxo build on wasabi spend
Kexkey May 7, 2020
5cd62bd
When label is empty string, it's a change utxo
Kexkey May 7, 2020
9a32a09
Fixed "mixing" balance, now can spend unconfirmed, more comments
Kexkey May 14, 2020
a503f3b
transactionid vs transactionId
Kexkey May 26, 2020
11b1a4e
Choosing Wasabi with lowest balance for newaddr, skipping down instances
Kexkey Jun 10, 2020
54971f2
Auto spend based on setting and wallet label
gabidi May 25, 2020
7a135d9
Autospender with props table wallet and anonset. props table endpoints
gabidi May 30, 2020
552b471
Add filterInternaltxns (label='') to wasabi get_transactions and clea…
gabidi May 31, 2020
a12d8bd
Added dequeue UTXOs selected to spend
gabidi Jun 1, 2020
d7405c2
Open api doc
gabidi Jun 26, 2020
f31487e
ApiV0 pass 1
gabidi Jun 26, 2020
6c2e453
ApiV0 pass 2
gabidi Jun 26, 2020
e648a94
ApiV0 pass 3
gabidi Jun 26, 2020
d3f65bf
ApiV0 ok seriously this is silly
gabidi Jun 26, 2020
577a270
Fixed schemas for wasabi
Kexkey Aug 20, 2020
b29d92c
Fixed backward comp for autospend to spender wallet
Kexkey Aug 26, 2020
e7b1fb5
Missing patch package in backend builder
Kexkey Sep 3, 2020
ef6aa4d
Upgraded Alpine for the Wasabi containers
Kexkey Sep 17, 2020
1e00b21
Upgrade Wasabi to v1.1.12.2
Kexkey Oct 30, 2020
ee69664
Looks like mixuntil defers to LevelStrong
Kexkey Nov 3, 2020
c75616a
Make PrivacyLevels Great Again
Kexkey Nov 9, 2020
ee495c7
Fixed wasabi_spend minanonset, added details, BTC instead of sats
Kexkey Nov 11, 2020
5f647e9
Fixed config schemas for wasabi
Kexkey Nov 18, 2020
a5ca58e
Changed migration path
Kexkey Dec 10, 2020
e844b75
We don't launch a Tor proxy for Wasabi if Tor is already installed
Kexkey Apr 23, 2021
626f540
Faster wasabi deployment, better wasabi_spend validations
Kexkey May 5, 2021
9c179c4
Wasabi Dockerfile small tweak
Kexkey May 5, 2021
301f474
Fixed variable name, instance id wasn't going through
Kexkey Jul 21, 2021
f580a56
Optimized smallest_balance_wasabi_index
Kexkey Sep 17, 2021
92a6f73
Merge branch 'dev' into 'features/wasabi'
Kexkey Apr 1, 2022
0670b08
Applied fixes and dev improvements to this branch
Kexkey Apr 1, 2022
bb9a96d
Wasabi 2 initial implementation
Talej Nov 12, 2023
c44b634
minor wasabi2 fixes
Talej Nov 21, 2023
5a3be9c
fixed unwatchtx errors
Talej Nov 22, 2023
3d6730d
wasabi tweaks
Talej Nov 28, 2023
5573b3f
merge corrections
Talej Dec 7, 2023
ed1468b
merge conflict fix
Talej Dec 7, 2023
f568276
Small fixes re: dev merge
Kexkey Dec 11, 2023
7677c8d
merge bug fixes
Talej Dec 12, 2023
c6cadaf
Updated wasabi to debian + run separate tor
Talej Dec 21, 2023
8c82474
Added listpayincoinjoin and cancelpayincoinjoin endpoints
Talej Jan 15, 2024
c69f907
LN fixes when using CLN v23.05 and up and lnurl-pay (#326)
Kexkey Feb 26, 2024
52534a8
Dockerfiles for Wasabi now aarch64 compat
Kexkey Feb 26, 2024
d19642c
Merge branch 'dev' into features/wasabi2
Kexkey Feb 26, 2024
6d27259
allowed amount arguments as strings for payincoinjoin
Talej Mar 6, 2024
1f67266
Merge branch 'features/wasabi2' of https://github.com/SatoshiPortal/c…
Talej Mar 6, 2024
97efabb
Wasabi shutdown fix and LN create invoice fix with args
Kexkey Apr 11, 2024
2074308
wasabi as pid 1
Kexkey Apr 12, 2024
e937017
Wasabi Tor off when testnet as well as regtest
Kexkey Apr 12, 2024
7d845d4
curl basic auth
phillamy Apr 14, 2024
f47c08c
Update call_lightningd.sh - expected_description quotes
phillamy May 10, 2024
7ef52ae
Update call_lightningd.sh - quotes again!
phillamy May 10, 2024
6a19929
Update call_lightningd.sh - quotes
phillamy May 10, 2024
e989c17
auto start coinjoin
Talej Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions api_auth_docker/api-sample.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# The file api.properties generated by the installer should look like this.


# Watcher can do stuff
# Spender can do what the watcher can do plus more stuff
# Admin can do what the spender can do plus even more stuff

# Stats can:
action_helloworld=stats
action_getblockchaininfo=stats
Expand All @@ -16,26 +21,31 @@ action_unwatchxpubbylabel=watcher
action_getactivewatchesbyxpub=watcher
action_getactivewatchesbylabel=watcher
action_getactivexpubwatches=watcher
action_get_txns_by_watchlabel=watcher
action_get_unused_addresses_by_watchlabel=watcher
action_watchtxid=watcher
action_unwatchtxid=watcher
action_getactivewatches=watcher
action_get_txns_by_watchlabel=watcher
action_get_unused_addresses_by_watchlabel=watcher
action_getbestblockhash=watcher
action_getbestblockinfo=watcher
action_getblockinfo=watcher
action_gettransaction=watcher
action_ots_verify=watcher
action_ots_info=watcher
action_ln_getinfo=watcher
action_ln_create_invoice=watcher
action_ln_getconnectionstring=watcher
action_ln_decodebolt11=watcher
action_ln_listpeers=watcher
action_ln_getroute=watcher
action_ln_listpays=watcher
action_ln_paystatus=watcher
action_bitcoin_estimatesmartfee=watcher
action_bitcoin_gettxoutproof=watcher
action_validateaddress=watcher

# Spender can do what the watcher can do, plus:
action_getxnslist=spender
action_get_txns_spending=spender
action_getbalance=spender
action_getbalances=spender
action_getbalancebyxpub=spender
Expand All @@ -47,13 +57,14 @@ action_addtobatch=spender
action_batchspend=spender
action_deriveindex=spender
action_derivepubpath=spender
action_deriveindex_bitcoind=spender
action_derivepubpath_bitcoind=spender
action_ln_pay=spender
action_ln_newaddr=spender
action_ots_stamp=spender
action_ots_getfile=spender
action_ln_getinvoice=spender
action_ln_delinvoice=spender
action_ln_decodebolt11=spender
action_ln_connectfund=spender
action_ln_listfunds=spender
action_ln_withdraw=spender
Expand All @@ -63,17 +74,19 @@ action_removefrombatch=spender
action_listbatchers=spender
action_getbatcher=spender
action_getbatchdetails=spender
action_bitcoin_generatetoaddress=spender
action_wasabi_getnewaddress=spender
action_wasabi_getbalances=spender
action_wasabi_spend=spender
action_wasabi_gettransactions=spender
action_wasabi_getunspentcoins=spender
action_wasabi_payincoinjoin=spender
action_wasabi_listpayincoinjoin=spender
action_wasabi_cancelpayincoinjoin=spender
action_config_props=spender
# Admin can do what the spender can do, plus:


# Should be called from inside the Docker network only:
action_conf=internal
action_newblock=internal
action_executecallbacks=internal
action_ots_backoffice=internal
87 changes: 49 additions & 38 deletions api_auth_docker/tests/test-gatekeeper.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

. ./colors.sh
DIR="$( dirname -- "${BASH_SOURCE[0]}"; )";
. $DIR/colors.sh

# We just want to test the authentication/authorization, not the actual called function
# You need jq installed for these tests to run correctly
Expand Down Expand Up @@ -47,6 +48,9 @@
# action_ln_listpays=watcher
# action_ln_paystatus=watcher
# action_bitcoin_estimatesmartfee=watcher
# action_bitcoin_gettxoutproof=watcher
# action_validateaddress=watcher

#
# # Spender can do what the watcher can do, plus:
# action_get_txns_spending=spender
Expand Down Expand Up @@ -78,6 +82,7 @@
# action_listbatchers=spender
# action_getbatcher=spender
# action_getbatchdetails=spender
# action_bitcoin_generatetoaddress=spender
#
# # Admin can do what the spender can do, plus:
#
Expand Down Expand Up @@ -105,7 +110,7 @@ trace_following() {
start_test_container() {
trace 1 "[stop_test_container] ${BCyan}Starting test container...${Color_Off}\n"

docker run -d --rm -t --name tests-gatekeeper --network=cyphernodenet alpine
docker run -d --rm -t --name tests-gatekeeper --network=cyphernodenet alpine:3.15.4

sleep 2
}
Expand Down Expand Up @@ -380,28 +385,32 @@ test_watcher_functions() {
test_authorization "ln_getinfo" "${token}" ${has_access} || return 200

# action_ln_create_invoice=watcher
test_authorization "ln_create_invoice" "${token}" ${has_access} || return 210
test_authorization "ln_create_invoice" "${token}" ${has_access} || return 201

# action_ln_getconnectionstring=watcher
test_authorization "ln_getconnectionstring" "${token}" ${has_access} || return 220
test_authorization "ln_getconnectionstring" "${token}" ${has_access} || return 202

# action_ln_decodebolt11=watcher
test_authorization "ln_decodebolt11" "${token}" ${has_access} || return 230
test_authorization "ln_decodebolt11" "${token}" ${has_access} || return 203

# action_ln_listpeers=watcher
test_authorization "ln_listpeers" "${token}" ${has_access} || return 240
test_authorization "ln_listpeers" "${token}" ${has_access} || return 204

# action_ln_getroute=watcher
test_authorization "ln_getroute" "${token}" ${has_access} || return 250
test_authorization "ln_getroute" "${token}" ${has_access} || return 205

# action_ln_listpays=watcher
test_authorization "ln_listpays" "${token}" ${has_access} || return 260
test_authorization "ln_listpays" "${token}" ${has_access} || return 206

# action_ln_paystatus=watcher
test_authorization "ln_paystatus" "${token}" ${has_access} || return 270
test_authorization "ln_paystatus" "${token}" ${has_access} || return 207

# action_bitcoin_estimatesmartfee=watcher
test_authorization "bitcoin_estimatesmartfee" "${token}" ${has_access} || return 280
test_authorization "bitcoin_estimatesmartfee" "${token}" ${has_access} || return 210

test_authorization "bitcoin_gettxoutproof" "${token}" ${has_access} || return 220

test_authorization "validateaddress" "${token}" ${has_access} || return 230

trace 1 "\n\n[test_watcher_functions] ${On_IGreen}${BBlack} SUCCESS with user ${id}! ${Color_Off}\n"
}
Expand All @@ -418,88 +427,90 @@ test_spender_functions() {
test_authorization "get_txns_spending" "${token}" ${has_access} || return 10

# action_getbalance=spender
test_authorization "getbalance" "${token}" ${has_access} || return 10
test_authorization "getbalance" "${token}" ${has_access} || return 15

# action_getbalances=spender
test_authorization "getbalances" "${token}" ${has_access} || return 10
test_authorization "getbalances" "${token}" ${has_access} || return 20

# action_getbalancebyxpub=spender
test_authorization "getbalancebyxpub" "${token}" ${has_access} || return 10
test_authorization "getbalancebyxpub" "${token}" ${has_access} || return 25

# action_getbalancebyxpublabel=spender
test_authorization "getbalancebyxpublabel" "${token}" ${has_access} || return 10
test_authorization "getbalancebyxpublabel" "${token}" ${has_access} || return 30

# action_getnewaddress=spender
test_authorization "getnewaddress" "${token}" ${has_access} || return 10
test_authorization "getnewaddress" "${token}" ${has_access} || return 35

# action_spend=spender
test_authorization "spend" "${token}" ${has_access} || return 10
test_authorization "spend" "${token}" ${has_access} || return 40

# action_bumpfee=spender
test_authorization "bumpfee" "${token}" ${has_access} || return 10
test_authorization "bumpfee" "${token}" ${has_access} || return 45

# action_addtobatch=spender
test_authorization "addtobatch" "${token}" ${has_access} || return 10
test_authorization "addtobatch" "${token}" ${has_access} || return 50

# action_batchspend=spender
test_authorization "batchspend" "${token}" ${has_access} || return 10
test_authorization "batchspend" "${token}" ${has_access} || return 55

# action_deriveindex=spender
test_authorization "deriveindex" "${token}" ${has_access} || return 10
test_authorization "deriveindex" "${token}" ${has_access} || return 60

# action_derivepubpath=spender
test_authorization "derivepubpath" "${token}" ${has_access} || return 10
test_authorization "derivepubpath" "${token}" ${has_access} || return 65

# action_deriveindex_bitcoind=spender
test_authorization "deriveindex_bitcoind" "${token}" ${has_access} || return 10
test_authorization "deriveindex_bitcoind" "${token}" ${has_access} || return 70

# action_derivepubpath_bitcoind=spender
test_authorization "derivepubpath_bitcoind" "${token}" ${has_access} || return 10
test_authorization "derivepubpath_bitcoind" "${token}" ${has_access} || return 75

# action_ln_pay=spender
test_authorization "ln_pay" "${token}" ${has_access} || return 10
test_authorization "ln_pay" "${token}" ${has_access} || return 80

# action_ln_newaddr=spender
test_authorization "ln_newaddr" "${token}" ${has_access} || return 10
test_authorization "ln_newaddr" "${token}" ${has_access} || return 85

# action_ots_stamp=spender
test_authorization "ots_stamp" "${token}" ${has_access} || return 10
test_authorization "ots_stamp" "${token}" ${has_access} || return 90

# action_ots_getfile=spender
test_authorization "ots_getfile" "${token}" ${has_access} || return 10
test_authorization "ots_getfile" "${token}" ${has_access} || return 95

# action_ln_getinvoice=spender
test_authorization "ln_getinvoice" "${token}" ${has_access} || return 10
test_authorization "ln_getinvoice" "${token}" ${has_access} || return 100

# action_ln_delinvoice=spender
test_authorization "ln_delinvoice" "${token}" ${has_access} || return 10
test_authorization "ln_delinvoice" "${token}" ${has_access} || return 105

# action_ln_connectfund=spender
test_authorization "ln_connectfund" "${token}" ${has_access} || return 10
test_authorization "ln_connectfund" "${token}" ${has_access} || return 110

# action_ln_listfunds=spender
test_authorization "ln_listfunds" "${token}" ${has_access} || return 10
test_authorization "ln_listfunds" "${token}" ${has_access} || return 120

# action_ln_withdraw=spender
test_authorization "ln_withdraw" "${token}" ${has_access} || return 10
test_authorization "ln_withdraw" "${token}" ${has_access} || return 125

# action_createbatcher=spender
test_authorization "createbatcher" "${token}" ${has_access} || return 10
test_authorization "createbatcher" "${token}" ${has_access} || return 130

# action_updatebatcher=spender
test_authorization "updatebatcher" "${token}" ${has_access} || return 10
test_authorization "updatebatcher" "${token}" ${has_access} || return 135

# action_removefrombatch=spender
test_authorization "removefrombatch" "${token}" ${has_access} || return 10
test_authorization "removefrombatch" "${token}" ${has_access} || return 140

# action_listbatchers=spender
test_authorization "listbatchers" "${token}" ${has_access} || return 10
test_authorization "listbatchers" "${token}" ${has_access} || return 145

# action_getbatcher=spender
test_authorization "getbatcher" "${token}" ${has_access} || return 10
test_authorization "getbatcher" "${token}" ${has_access} || return 150

# action_getbatchdetails=spender
test_authorization "getbatchdetails" "${token}" ${has_access} || return 10
test_authorization "getbatchdetails" "${token}" ${has_access} || return 155

test_authorization "bitcoin_generatetoaddress" "${token}" ${has_access} || return 160

trace 1 "\n\n[test_spender_functions] ${On_IGreen}${BBlack} SUCCESS with user ${id}! ${Color_Off}\n"
}
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NOTIFIER_VERSION="v0.9.0-dev-local"
PROXYCRON_VERSION="v0.9.0-dev-local"
OTSCLIENT_VERSION="v0.9.0-dev-local"
PYCOIN_VERSION="v0.9.0-dev-local"
WASABI_VERSION="v0.3.1-local"
WASABI_VERSION="v0.4.0-dev-local"

trace()
{
Expand Down
2 changes: 1 addition & 1 deletion cron_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.12.4
FROM alpine:3.15.4

RUN apk add --update --no-cache \
curl
Expand Down
12 changes: 6 additions & 6 deletions cyphernodeconf_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM golang:1.13.15-alpine3.12 as builder-torgen
FROM golang:1.17-alpine3.16 as builder-torgen

RUN apk add git build-base

RUN mkdir -p /go/src/torgen
RUN mkdir -p /go/src

COPY torgen/torgen.go /go/src/torgen
COPY torgen /go/src/torgen

WORKDIR /go/src/torgen
WORKDIR /go/src/torgen/src

RUN go get

RUN go build torgen.go
RUN chmod +x /go/src/torgen/torgen
RUN chmod +x /go/src/torgen/src/torgen

FROM alpine:3.12.4 as builder-qrencode

Expand All @@ -35,7 +35,7 @@ FROM node:15.11.0-alpine3.12
ENV EDITOR=/usr/bin/nano

COPY . /app
COPY --from=builder-torgen /go/src/torgen/torgen /app/torgen
COPY --from=builder-torgen /go/src/torgen/src/torgen /app/torgen
COPY --from=builder-qrencode /usr/local/bin/qrencode /usr/local/bin/
COPY --from=builder-qrencode /usr/local/lib/libqrencode.so.4.1.0 /usr/local/lib/libqrencode.so.4

Expand Down
12 changes: 10 additions & 2 deletions cyphernodeconf_docker/lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ module.exports = class App {
if (this.isChecked('torifyables', 'tor_bitcoin')) {
this.sessionData.tor_bitcoin_hostname = await torgen.generateTorFiles(this.destinationPath( path.join( destinationDirName, 'tor/bitcoin/hidden_service' ) ));
}
if (this.isChecked('torifyables', 'tor_wasabibackend')) {
this.sessionData.tor_wasabibackend_hostname = await torgen.generateTorFiles(this.destinationPath( path.join( destinationDirName, 'tor/wasabibackend/hidden_service' ) ));
}
}

// creates keys if they don't exist or we say so.
Expand Down Expand Up @@ -449,7 +452,9 @@ module.exports = class App {
uacomment: this.config.data.bitcoin_uacomment,
torified: this.torifyables.find(data => data.value === 'tor_bitcoin').checked,
clearnet: !this.isChecked('features', 'tor') || this.isChecked('clearnet', 'clearnet_bitcoin'),
tor_hostname: this.sessionData.tor_bitcoin_hostname
tor_hostname: this.sessionData.tor_bitcoin_hostname,
port: (this.config.data.net === 'regtest') ? 18444 : ((this.config.data.net === 'testnet') ? 18333 : 8333),
network: this.config.data.net
}
},
{
Expand Down Expand Up @@ -569,7 +574,10 @@ module.exports = class App {
docker: "cyphernode/wasabi:"+this.config.docker_versions['cyphernode/wasabi'],
extra: {
mixuntil: this.config.data.wasabi_mixuntil,
instance_count: this.config.data.wasabi_instance_count
instance_count: this.config.data.wasabi_instance_count,
torified: this.torifyables.find(data => data.value === 'tor_wasabibackend').checked,
clearnet: !this.isChecked('features', 'tor') || this.isChecked('clearnet', 'clearnet_wasabibackend'),
tor_hostname: this.sessionData.tor_wasabibackend_hostname
}
}
}
Expand Down
Loading