Commit graph

364 commits

Author SHA1 Message Date
belikor
bbbaf59591 daemon: fix documentation in the file_list docstring
This is necessary to produce the `docs/api.json`
(through `scripts/generate_json_api.py`)
with correct information, and to be able to parse this file later on
by other tools.
2021-09-23 21:00:31 -05:00
Lex Berezhny
9b9794b5e0 default is_mine to true during migration 2021-09-20 09:23:42 -04:00
Lex Berezhny
7264b53e5f during disk clean your own sd blob is now kept and file status of deleted files is set to stopped 2021-09-15 10:37:08 -04:00
Lex Berezhny
60836d8523 db migration and other fixes 2021-09-15 09:10:06 -04:00
Lex Berezhny
ef89c2e47a use databse to track blob disk space use and preserve own blobs 2021-09-15 09:10:06 -04:00
Victor Shyba
358ef4536f add ConflictingInputValueError for claim_id+claim_ids 2021-09-10 18:57:20 -03:00
Victor Shyba
5061a35e66 remove ignored output from hub node 2021-09-10 18:57:20 -03:00
Victor Shyba
8206441834 run CI for old and new setups 2021-09-10 18:57:20 -03:00
Victor Shyba
d713783736 ignore default values 2021-09-10 18:57:20 -03:00
Victor Shyba
9e81dd2360 refactor arguments fixup 2021-09-10 18:57:20 -03:00
Victor Shyba
e2798969d7 claim_id is an invertible field, not a repeated 2021-09-10 18:57:20 -03:00
Victor Shyba
1c31ec66f2 simplify operator handling 2021-09-10 18:57:20 -03:00
Victor Shyba
241f9fc7b0 not_claim_id/not_claim_ids is not a search parameter 2021-09-10 18:57:20 -03:00
Victor Shyba
a799503c97 update fields from hub 2021-09-10 18:57:20 -03:00
Victor Shyba
9685928087 there is no first_search 2021-09-10 18:57:20 -03:00
Victor Shyba
3c4571a4e0 remove fallback 2021-09-10 18:57:20 -03:00
Jeffrey Picard
046147eb1d updates for fields 2021-09-10 18:57:20 -03:00
Jeffrey Picard
7834520e54 update code to be consistent with field renames 2021-09-10 18:57:20 -03:00
Jeffrey Picard
8e5b4d4b6f hardcode port 2021-09-10 18:57:20 -03:00
Jeffrey Picard
4544a074d9 Move the go hub settings from network to ledger config and hook reset
correctly.
2021-09-10 18:57:20 -03:00
Jeffrey Picard
9b78501392 Set default server to the networks default and use go hub by default 2021-09-10 18:57:20 -03:00
Jeffrey Picard
a4955a2b79 remove uneeded prints 2021-09-10 18:57:20 -03:00
Jeffrey Picard
15a56ca25e tons of small changes squashed together 2021-09-10 18:57:20 -03:00
Jeffrey Picard
9f65799a3d uncomment tests, add remove_duplicates param
Cleanup prints and commented out code

remove print

don't do list claims

cleanup
2021-09-10 18:57:20 -03:00
Jeffrey Picard
a97fc6dba8 cleanup and reorgnazing some stuff
Fixing tests

relabel failing tests properly

run all the tests for the hub

cleanup HubNode
2021-09-10 18:57:20 -03:00
Cristian Vicas
45bf6c3bf3 Drop comment_* apis.
Refactored dangling functions.
Added unit test.
2021-09-02 11:38:29 +03:00
Cristian Vicas
fef0cc764d Drop comment_* apis
Removed the comment API
Removed tests for the comment API
Removed the documentation section
Removed the comment server configuration
2021-09-02 08:51:00 +03:00
belikor
d26c06dbf3 jsonrpc_support_sum: remove the + signs from the docstring
These symbols came from 0a0ac3b7c9 and were probably added
accidentally to the beginning of the line by copying and pasting
some diffs.
2021-08-25 13:28:02 -05:00
Lex Berezhny
dc1d9e1c84 upgrade pylint and fix lint errors 2021-08-20 22:36:35 -04:00
Jack Robison
eccedada40
add TODOs for errors raised that aren't defined in lbry.error 2021-08-17 12:31:03 -04:00
Jack Robison
25d54accf8
return api errors from wallet_add and wallet_create 2021-08-17 12:30:17 -04:00
Jack Robison
d07685f0e9
only log tracebacks for api errors not defined in lbry.error 2021-08-17 11:30:58 -04:00
Lex Berezhny
51d21d8c86 working disk cleanup 2021-08-16 14:15:12 -04:00
Lex Berezhny
4e8d10cb44 disk space manager and status API 2021-08-13 10:32:46 -04:00
Victor Shyba
1849c02cb6 fix typo in kwargs key 2021-07-26 16:02:48 -03:00
belikor
6421cecafb daemon: fix --claim_id with lbrynet claim search
For some reason, when using `claim_search`
with `--claim_id`, the arguments dictionary will also
contain `claim_ids` with an empty list, even if we didn't specify it.
```
lbrynet claim search --claim_id=8945573bcfcb7f8276187dfbb93545eac4ebf71a
```

Using both `claim_id` and `claim_ids` will raise a `ValueError`
exception so the daemon won't return a valid result
even if the claim ID is in fact valid.

So if `claim_id` exists, we need to discard `claim_ids`
if it is empty, before proceeding with the rest of the code.

On the other hand, if `claim_ids` is used, and `claim_id` is absent,
there will be no problem as `claim_id` won't be added to the dictionary.
```
lbrynet claim search --claim_ids=8945573bcfcb7f8276187dfbb93545eac4ebf71a
```
2021-07-19 22:24:43 -05:00
Alex Grin
74116cc550
Merge branch 'master' into propagate_external_ip_change 2021-07-19 14:12:19 -04:00
belikor
b7791d2845 exchange_rate_manager: raise exception if 'error' is in json_response
If the error is not handled, the running daemon will continuously
print the following error message:
```
Traceback (most recent call last):
  File "lbry/extras/daemon/exchange_rate_manager.py", line 77, in get_rate
  File "lbry/extras/daemon/exchange_rate_manager.py", line 189, in get_rate_from_response
KeyError: 0
```

This started happening when the UPBit exchange decided to delist
the LBC coin.

Normally `json_response` should be a dictionary, not a list,
so `json_response[0]` causes an error.

By checking for the `'error'` key, we can raise the proper exception.

Once this is done, the message will be a warning, not a traceback.
```
WARNING  lbry.extras.daemon.exchange_rate_manager:92:
Failed to get exchange rate from UPbit: result not found
```
2021-07-19 13:41:49 -04:00
Victor Shyba
6254f53716 propagate external ip changes from upnp component to dht node protocol 2021-07-08 03:46:05 -03:00
Lex Berezhny
7d49b046d4 added support to config for determining if value is set and implemented hub selection logic 2021-06-22 11:07:58 -04:00
Victor Shyba
6c812f663e drop value_type for support 2021-06-02 18:01:54 -03:00
Victor Shyba
bce299ccc7 fix docopt typo 2021-06-02 12:05:36 -04:00
Victor Shyba
67cce0ef7e test+implement --comment for support_create 2021-06-02 12:05:36 -04:00
Lex Berezhny
fe469ae57f create appropriate script for scripthash address 2021-06-02 11:34:21 -04:00
Victor Shyba
8c4b0037f5 API: add --remove_duplicates to claim_search 2021-05-27 20:14:12 -03:00
zeppi
2b950ff5dd fix bug in collection_update --replace 2021-05-15 03:27:33 -03:00
Victor Shyba
7554e6d7f9 remove dead code 2021-05-07 15:02:31 -03:00
Victor Shyba
cb8f26f177 remove broken feed 2021-05-07 15:02:31 -03:00
Victor Shyba
fb77fde710 for debug, it is always whole page 2021-05-04 22:22:07 -03:00
Victor Shyba
3c67bb90d7 don't fail when a single one go on maintenance and set completion event regardless of failures 2021-05-04 22:22:07 -03:00
Victor Shyba
dabb168853 dont log full exceptions on simple connection errors 2021-05-04 22:22:07 -03:00
Victor Shyba
45e5b3b219 dont log full pages 2021-05-04 22:22:07 -03:00
Lex Berezhny
3d4321ee38 added --has_source/--has_no_source filters to claim_list 2021-04-23 10:24:48 -04:00
Lex Berezhny
f8814881a1 ability to set sd_hash, file_name and file_hash when updating a stream claim 2021-04-14 19:52:50 -04:00
Lex Berezhny
6acf94a810 moved balance calculation to SQL 2021-04-14 11:24:58 -04:00
Lex Berezhny
ff30386051 lint 2021-04-06 21:22:27 -04:00
shubhendra
be0ba22222 Remove unnecessary comprehension
Signed-off-by: shubhendra <withshubh@gmail.com>
2021-04-06 21:22:27 -04:00
Lex Berezhny
c8781392be added unit test for Access-Control HTTP headers 2021-04-06 17:12:05 -04:00
John Leith
b97164fcfb adding access control headers 2021-04-06 17:12:05 -04:00
Victor Shyba
74df4fab83 change column to has_source and document both flags 2021-03-14 10:11:42 -04:00
Victor Shyba
74660704e3 fix update 2021-03-14 10:11:42 -04:00
Victor Shyba
e27e49e9dc call update only once 2021-03-14 10:11:42 -04:00
Victor Shyba
34ed729c59 there is no 'sd_hash' parameter for this API 2021-03-14 10:11:42 -04:00
Victor Shyba
adaeeca3fd let file_path be optional 2021-03-14 10:11:42 -04:00
Jack Robison
dac75563d3 add --no_file_path param to publish, stream_create, and stream_update 2021-03-14 10:11:42 -04:00
Alex Grintsvayg
cbc76adcaa only return unspent txos if is_spent flag is not used. fixes #2923 2021-03-13 06:44:20 -05:00
Lex Berezhny
7bb873dad9 removed connection_status field from the status command, use wallet.connected instead to determine if SDK is connected 2021-03-09 13:27:36 -05:00
Lex Berezhny
fcad76fc51 lint 2021-03-04 00:03:16 -05:00
Lex Berezhny
97e6e1684e simplifying 2021-03-04 00:03:16 -05:00
zeppi
183fb9f9ff provide --resolve tag for collection claim, separate from resolving its contents
bugfix and docs generation

review changes
2021-03-04 00:03:16 -05:00
Lex Berezhny
0cec80f676 fixes transaction signing bug when tx had no change outputs 2021-03-01 11:20:08 -05:00
Patrick Keane
48c64143e3 Add no_totals argument to claim search 2021-02-26 10:41:15 -05:00
Patrick Keane
a8712422bc Update daemon.py 2021-02-21 23:45:18 -05:00
Lex Berezhny
b153e4bb9f added support to claim_search for filtering collections via --claim_type 2021-02-16 11:08:54 -05:00
Lex Berezhny
db9856a8db use median exchange rate when several exchange rates are available 2021-02-15 14:09:32 -05:00
Lex Berezhny
f1cb7d27ac lint 2021-02-10 22:14:13 -05:00
Lex Berezhny
dee494e12f converting from USD, BTC to LBC is now done via several exchange rate providers: Bittrex, Cryptonator, CoinEx, hotbit and UPbit 2021-02-10 22:14:13 -05:00
Lex Berezhny
7486ee9537 do not tx._reset() in generate_channel_private_key 2021-02-08 09:56:03 -05:00
Lex Berezhny
4a20ccc28e tx._reset() the transaction after more internal changes 2021-02-08 09:56:03 -05:00
Lex Berezhny
f80dd2b307 tx._reset() the transaction after internal changes 2021-02-08 09:56:03 -05:00
Lex Berezhny
b208cf6d32 significant performance improvement when creating transactions and with txo spend specifically 2021-02-08 09:56:03 -05:00
Lex Berezhny
39e78ff17e updated exchange rate manager to use v3 bittrex API (old one is deprecated) 2021-02-03 14:15:19 -05:00
Alex Grin
bedcfc154b
Merge branch 'master' into fix-collectionChannel 2021-02-02 11:25:52 -05:00
Victor Shyba
f6cfe266e0 specify Returns correctly for docs gen 2021-02-01 19:19:46 -05:00
zeppi
aca57ffc62 allows cli to accept channel_id for collections 2021-01-26 10:02:01 -05:00
Jack Robison
a6d65233f1
fallback to getting external ip from spv servers instead of internal apis 2021-01-21 16:20:53 -05:00
Jack Robison
20efdc70b3
use UDP ping for wallet server selection
-only connect to one spv server at a time
-remove session pool
2021-01-21 16:15:42 -05:00
Jack Robison
519614b2fd
skip libtorrent component in tests 2021-01-21 14:37:08 -05:00
Lex Berezhny
bf0118c8ef added support for --not_channel_id to txo_list commands 2021-01-21 14:03:59 -05:00
Victor Shyba
2a17787242 fix test 2021-01-04 18:04:06 -03:00
Victor Shyba
0a53ad5721 use the comment api signing implementation 2021-01-04 18:04:06 -03:00
Victor Shyba
6da6bdc863 adds jsonrpc_channel_sign signing api 2021-01-04 18:04:06 -03:00
Jack Robison
f941950ee2
fix comment_create docs 2020-12-07 21:13:43 -05:00
Jack Robison
ab067d1d3a fix unclean closing of blockchain.db 2020-10-26 16:23:28 -04:00
Lex Berezhny
4c5429af15 fix lint 2020-10-16 12:03:01 -04:00
Alex Grintsvayg
0a0ac3b7c9 pass-through for new support_sum api 2020-10-16 12:03:01 -04:00
jessop
7384609e74 support comment pinning 2020-10-10 13:02:38 -04:00
jessop
0231139b01 support anonymous react_list 2020-09-27 16:36:51 -04:00
jessop
d6ee6446dd react list takes comment_ids 2020-09-26 15:21:26 -04:00
Lex Berezhny
eb5d2198fc lint 2020-09-24 20:09:46 -04:00
Lex Berezhny
34e44ebd1c minor cleanup and lint fixes 2020-09-24 20:03:22 -04:00
jessop
bf2f4bc040 wip 2020-09-24 17:47:59 -04:00
jessop
9dc4559aba new comment and reactions api 2020-09-23 16:43:28 -04:00
Lex Berezhny
991987ed76 docopt fix 2020-08-19 12:08:41 -04:00
Lex Berezhny
ec24ebf2cf added --limit_claims_per_channel argument to claim_search to only return up to the specified number of claims per channel 2020-08-19 10:51:31 -04:00
Lex Berezhny
91194bf422 doc fix 2020-08-04 14:12:40 -04:00
Lex Berezhny
9c5f940b00 claim search forwarding to new sdk 2020-08-04 12:11:02 -04:00
Lex Berezhny
455b4043b8 new resolve 2020-08-04 11:33:39 -04:00
jessop
f6bdf7c09a allow faster comment retrieval
switch default for include replies to false
2020-07-31 10:07:12 -04:00
Lex Berezhny
097c8b674c fix modified_on when modifying account 2020-07-20 14:28:19 -04:00
Jack Robison
644120ca31
add --blocking to account_send 2020-07-02 17:32:32 -04:00
Jack Robison
a50a625b3b
add --blocking arg to wallet_send 2020-07-02 17:32:32 -04:00
Jack Robison
a056cd78f7 remove loggly 2020-06-24 11:13:29 -04:00
Lex Berezhny
c03e30a01f added support for signed supports 2020-06-05 15:49:18 -04:00
Jack Robison
863b9a2c98
don't block returning from publish on updating the content claim table 2020-06-04 09:31:37 -04:00
Lex Berezhny
7296c7df1a Origin: null no longer allowed 2020-06-03 14:19:16 -04:00
Lex Berezhny
f3ee6603de improve allowed_origin request handling 2020-06-03 13:55:20 -04:00
Lex Berezhny
ee0aabda1d backwards compatible allowed_origin, default browsers not allowed 2020-06-03 13:28:32 -04:00
Jack Robison
08d37a4b0f add allowed_origin to config
-raise 403 error if a request doesn't have a matching origin
2020-06-03 12:55:24 -04:00
Akinwale Ariwodola
01280c8d04 update docstring for download_path 2020-05-18 18:52:13 +01:00
Jack Robison
bbded12923
fix node not being set on the downloader in some cases 2020-05-12 17:50:20 -04:00
Jack Robison
b000a40f28
add completed filter arg to file_list 2020-05-11 19:22:53 -04:00
Jack Robison
3c85322523
add status arg to file_list cli 2020-05-11 19:16:08 -04:00
Jack Robison
f20ca70c01
add uploading_to_reflector and is_fully_reflected filter arguments to file_list 2020-05-11 15:48:34 -04:00
Jack Robison
c22482f907
channel private key generation in a thread pool 2020-05-11 14:54:31 -04:00
Jack Robison
1cd5377b45
split fixed peer setting out from reflector_servers 2020-05-11 13:43:13 -04:00
Lex Berezhny
1d1f0527ee
Merge pull request #2948 from lpessin/patch-1
fix duplicate line on api doc
2020-05-07 17:59:57 -04:00
Luiz
ced3c7efe4
fix duplicate line on api doc
delete line 3616 (duplicate line 3618)
2020-05-07 13:37:46 -03:00
Victor Shyba
c3b8f366ed fixes from review 2020-05-07 04:04:55 -03:00
Victor Shyba
190b01fdf9 calculate total bytes outside of dict 2020-05-07 04:04:55 -03:00
Victor Shyba
f145d08c10 tell progress, stop trying to read first piece 2020-05-07 04:04:55 -03:00
Victor Shyba
53382b7e15 wait started event 2020-05-07 04:04:55 -03:00
Victor Shyba
f602541ede fix not knowing a torrent exists 2020-05-07 04:04:55 -03:00
Victor Shyba
ce7a985df6 add boost on gitlab, fix failing test, add libtorrent to linux build 2020-05-07 04:04:54 -03:00
Victor Shyba
abaac8ef48 fixes from rebase, install libtorrent from s3 2020-05-07 04:04:54 -03:00
Victor Shyba
4d47873219 working file list after torrent get 2020-05-07 04:04:54 -03:00
Victor Shyba
b930c3fc93 fix torrent and stream manager reference leftovers 2020-05-07 04:04:54 -03:00
Victor Shyba
dd26a96828 adds more torrent parts 2020-05-07 04:04:54 -03:00
Victor Shyba
6865ddfc12 torrent manager and torrent source 2020-05-07 04:04:54 -03:00
Victor Shyba
2089059792 pylint 2020-05-07 04:04:54 -03:00
Victor Shyba
27739e0364 fix save from resolve 2020-05-07 04:04:54 -03:00
Victor Shyba
698ee271d6 stream manager component becomes file manager component 2020-05-07 04:04:54 -03:00
Victor Shyba
543c75b293 wip 2020-05-07 04:04:54 -03:00
Victor Shyba
b09c46f6f7 add torrent component 2020-05-07 04:04:54 -03:00
Jack Robison
d3ffae72fb
buckets 2020-05-02 22:30:25 -04:00
Jack Robison
87f751188e
cancelled and failed api request metrics 2020-05-02 21:58:41 -04:00
Jack Robison
797364ee5c
refactor prometheus metrics 2020-05-02 15:01:07 -04:00
Lex Berezhny
9a6326b027 fix for claim_list incorrectly handling --is_spent flag 2020-04-22 10:36:09 -04:00
Jack Robison
9432e1b5b2
add uploading_to_reflector to file_list results 2020-04-20 11:57:09 -04:00
Jack Robison
e81b51a647
support claim_id, channel_claim_id, and outpoint args in file_list being lists 2020-04-13 13:19:25 -04:00