Commit graph

841 commits

Author SHA1 Message Date
jobevers
a1650d7f03 remove update url 2017-02-20 12:55:21 -06:00
Alex Grintsvayg
c85226d5a6 stop showing deprecated commands in cli help 2017-02-20 00:21:16 -05:00
Jack Robison
d0b64ef255 don't return blob timeout error from get_availability 2017-02-19 19:37:50 -05:00
Jack Robison
e2f97ba0b4 get file by stream hash 2017-02-19 19:37:44 -05:00
Jack Robison
c6e614ebec fix get()
-get_file_by_sd_hash raises NoSuchSDHash if there is no file, which
otherwise doesn’t get trapped

-remove unnecessary try/except around _DownloadNameHelper.__init__

-don’t delete self.waiting_on[name]
2017-02-19 19:17:25 -05:00
Jack Robison
ab46a33913 fix missing download button 2017-02-18 14:07:07 -05:00
jobevers
6d4c606abd remove version check also supplies a download url 2017-02-16 21:25:09 -06:00
jobevers
723105157f check lbry-electron for releases 2017-02-16 14:18:32 -06:00
jobevers
17d32ca696 remove lbryum version check 2017-02-16 14:18:23 -06:00
jobevers
993f2e54f9 more fixes for build 2017-02-16 14:13:01 -06:00
Job Evers‐Meltzer
fb2823f59e don't need this anymore 2017-02-16 14:13:00 -06:00
jobevers
f1231bd8e5 remove UI_Manager 2017-02-16 14:11:54 -06:00
Job Evers-Meltzer
caa8f73f7c remove header check 2017-02-16 14:09:43 -06:00
Job Evers‐Meltzer
5bf75ef139 Merge pull request #404 from lbryio/match-allow-origin
Allow requests that match allowed-origin
2017-02-16 12:02:20 -06:00
Job Evers-Meltzer
e2db99f7ab allow requests that match allowed-origin 2017-02-16 11:44:23 -05:00
Jack Robison
3ddf8680fb blob commands
refactor blob_get
add descriptor_get
add blob_delete
refactor blob_list
2017-02-16 11:20:02 -05:00
Jack Robison
25ec8fde23 add timeout to get_availability and peer_list
-add optional timeout to DHTPeerFinder.find_peers_for_blob
-add peer_search_timeout setting
2017-02-16 11:17:37 -05:00
Jack Robison
1a6290eacc log blob count at startup 2017-02-16 11:17:37 -05:00
Jack Robison
345301a9ee return file with pending claim with get_lbry_file
if a lbry file from the winning claim is in the file manager, return
it. otherwise return a lbry file with a pending claim if one exists.
2017-02-16 09:12:57 -05:00
Jack Robison
0f907a209b add EncryptedFileDownloader.load_file_attributes 2017-02-16 09:12:47 -05:00
Jack Robison
80dd02483e Merge branch 'master' into no-more-upload-allowed 2017-02-15 22:39:26 -05:00
Job Evers‐Meltzer
934a46a8b6 Merge pull request #452 from lbryio/retry-startup
Retry startup
2017-02-15 08:34:26 -06:00
jobevers
9e2cda0cdc remove more upload_allowed arguments 2017-02-15 06:48:58 -06:00
jobevers
fe4dac8236 change downloader options to data_rate 2017-02-15 06:48:58 -06:00
Job Evers-Meltzer
2a45c91175 fix get_blob calls with upload_allowed arguments 2017-02-15 06:48:58 -06:00
Job Evers-Meltzer
a38e5c855e Remove upload_allowed attribute
This is unused and largely pulluting the argument list
of too many functions.
2017-02-15 06:48:50 -06:00
jobevers
f989814e69 catch Unknownnameerror for resolve_name
Its expected behavior that a name won't resolve so this more
gracefully handles that case
2017-02-14 16:16:22 -06:00
jobevers
520ac9b50a change filemanger setup to inlinecallbacks 2017-02-14 10:27:16 -06:00
Jack Robison
3cc8a4b168 add local and remote heights to blockchain status 2017-02-13 15:14:54 -05:00
Jack Robison
8859c1b0c1 fix claim_abandon 2017-02-13 15:14:54 -05:00
Jack Robison
867275461c feedback from job 2017-02-13 15:14:54 -05:00
Jack Robison
2190f4ac85 refactor GetStream
-convert to inline callbacks

-return more errors than just timeouts

-delete on timeout

-have a more understandable return condition (first data blob having
downloaded)
2017-02-13 15:14:54 -05:00
Jack Robison
7720724ec0 reflect lbry_files in looping call in EncryptedFileManager
-remove ManagedEncryptedFileDownloader._reupload

-clean up reflector functions in Daemon, move to reflector.reupload

-check ConnectionLost in reflector client

-close sd blob file handle when it wont be sent (otherwise read handle stays open)

-log reflector sd info

-give reflector client factory a lbry file
2017-02-13 15:13:37 -05:00
Jack Robison
d137528f67 convert Daemon._delete_lbry_file to inlineCallbacks 2017-02-13 13:07:27 -05:00
Jack Robison
5a1bab2eaa refactor Publisher and jsonrpc_publish
-add get_read_handle to file_utils

-don’t leave read handle hanging after creating lbry file

-get rid of threaded weirdness

-remove reflector functionality from Publisher

-fix updating with an existing stream

-reflect new stream in thread after broadcasting name claim
2017-02-13 13:07:27 -05:00
Alex Liebowitz
0e8e489ad6 Fix how the bug report code accesses Slack API key setting
It was trying to access this setting as an attribute, which doesn't
work anymore. (Not sure if this is an API change in conf.settings or
just a bug.)
2017-02-08 23:05:32 -05:00
Jack Robison
d053db8dfd add uri to stream reflector for better logging 2017-02-08 14:28:16 -05:00
Jack Robison
2126f69c93 use only DBEncryptedFileMetadataManager in Daemon
-fix Daemon.stream_info_manager and Daemon.lbry_file_metadata_manager
being different
2017-02-06 13:15:50 -05:00
Jack Robison
6f0581104a Merge pull request #408 from lbryio/non-blocking-update-check
non-blocking version check
2017-02-05 15:44:29 -05:00
Jack Robison
45a6228b58 fix threaded lbryum check 2017-02-02 11:31:31 -05:00
Jack Robison
c6648ff6bc add installation id, re-initialize lbryid on each start 2017-02-02 10:23:17 -05:00
Jack Robison
f737b3aaf7 non-blocking version check
this fixes a bug where if github is down the app will fail to start.

-check for new version every 30 min instead of every 12 hours

-check connection problems every 30 seconds instead of every second
2017-02-02 10:18:09 -05:00
jobevers
8e349f17c1 fixes for named parameter changes on api 2017-02-01 20:47:53 -08:00
Job Evers‐Meltzer
2c137a99d1 Merge pull request #453 from lbryio/add-details-to-error-event
Add details to error event
2017-02-01 14:23:26 -08:00
Job Evers‐Meltzer
d1ed8a769a Merge pull request #450 from lbryio/block-too-deep
Fix #449: Block to deep error
2017-02-01 13:45:12 -08:00
Job Evers‐Meltzer
ac8a63bc33 Merge pull request #455 from lbryio/better-defaults
Change default behavior with daemon cmdline args
2017-01-31 10:13:18 -08:00
Alex Grintsvayg
46cb6b204a nicer error output 2017-01-31 10:38:07 -05:00
jobevers
8fc6feb316 log to console by default 2017-01-30 12:08:32 -08:00
jobevers
7377158631 change no-launch to launchui 2017-01-30 12:04:07 -08:00
Alex Grintsvayg
86ba7ffd5c explicitly list jsonrpc params in function signature. add jsonrpc tests 2017-01-30 09:58:28 -08:00
jobevers
ed227a239e Fixes #449
What was happening was the wallet claimed to be caught up before it
actually was and so the wallet’s local_height was still the value from
when lbry was last run, frequently more than 20 or 50 blocks
behind. _get_value_for_name uses the block at local_height as the
basis for the proof.  If _get_value_for_name is called during that
time between when the wallet claims to be caught up and it actually
is, the “Block too deep error” happens.  And since the discover page
of the UI does name resolution right away, the error basically happens
anytime somebody starts the app after not using it for a few hours.

This changes the startup behaviour of the wallet to
- use the `update` callback provided by lbryum
- check that local_height and network_height match before declaring
  that the wallet has caught up

For reference, the error is raised here:
1b896ae75b/src/rpc/claimtrie.cpp (L688)
2017-01-30 09:32:04 -08:00
jobevers
b7478ba817 replace send_error with log.error 2017-01-30 09:30:46 -08:00
jobevers
1c92b5d2ea retry startup 2017-01-30 09:25:44 -08:00
Job Evers‐Meltzer
139af85b52 Merge pull request #445 from lbryio/retry-get
Retry the get call three times before failing
2017-01-27 10:08:25 -06:00
jobevers
3dc1a523cf retry the get call three times before failing 2017-01-26 14:09:54 -06:00
Kay Kurokawa
0e864f5df1 Update interface for wallet balance 2017-01-26 11:41:27 -05:00
Alex Liebowitz
d3a63c38fc Fix pylint errors 2017-01-20 22:36:31 -05:00
Alex Liebowitz
08aa024499 Use inlineCallbacks for jsonrpc_open() and jsonrpc_reveal() 2017-01-20 22:29:27 -05:00
Alex Liebowitz
5db1a4d328 Refactor and update open() and reveal() RPC methods
- Both methods now take an SD hash instead of a path (more logical API
   and avoids potential security problems)
 - Moves the core logic into functions on a new module,
   lbry.core.file_utils
 - Adds reveal support for Windows
2017-01-20 22:29:27 -05:00
Alex Liebowitz
e95adecd41 Rename jsonrpc_open_file to jsonrpc_open 2017-01-20 22:29:27 -05:00
Alex Liebowitz
51a5510b38 Add open_file() RPC method 2017-01-20 22:29:27 -05:00
Job Evers-Meltzer
3e774fc158 missed another verified time check 2017-01-20 18:47:53 +00:00
Job Evers-Meltzer
8c5f7a9849 fix missing arg in get_blob 2017-01-20 11:35:34 -06:00
Job Evers‐Meltzer
6c571b5227 Blob verification fixes (#428)
* Move the blob verification to the actual Blob object
 * remove the check on verification time
 * remove get_blob_length from BlobManager

Removed because I'm not sure what checking verification time against ctime gets us, except some protection against an accidental modification of the blob.
2017-01-20 10:54:36 -06:00
Job Evers-Meltzer
851ab7ba28 Safegaurd against there not being a wallet on status call
Also switch status call to an inlineCallback
2017-01-18 09:36:01 -06:00
Job Evers‐Meltzer
05d50c1821 Merge pull request #420 from lbryio/fix-watch-resource
fix resource needed for watch
2017-01-17 22:07:06 -06:00
Job Evers-Meltzer
13bfcb3561 fix missing id_ parameter to _render_error 2017-01-17 20:01:28 -06:00
Job Evers-Meltzer
78b0f923f4 fix resource needed for watch 2017-01-17 19:26:09 -06:00
Alex Grintsvayg
23872c77e9 fix long lines 2017-01-17 12:31:48 -05:00
Alex Grintsvayg
cac8267e85 updates, more refactoring for greater clarity 2017-01-17 12:29:09 -05:00
Alex Grintsvayg
267c6cbaca refactor conf.settings 2017-01-16 22:32:54 -05:00
Job Evers‐Meltzer
2b2fa29db5 Merge pull request #395 from lbryio/fix_publish_output
Fix Daemon RPC command publish output
2017-01-13 14:02:23 -06:00
Job Evers‐Meltzer
ddf24de16d Merge pull request #407 from lbryio/handle-closed-api-requests-rebase
handle dropped api requests
2017-01-13 13:33:42 -06:00
Alex Grintsvayg
8277df1034 minor nits 2017-01-13 12:26:37 -05:00
Jack Robison
e03bba0b62 handle dropped api requests 2017-01-13 10:41:59 -06:00
Job Evers-Meltzer
1151019186 Improve downloader error handling
Instead of having an error cause a timeout, send
the error directly to the callback
2017-01-13 08:24:05 -06:00
Job Evers-Meltzer
8075ced1af bug fix for file_seed
cannot return a deferred in inlineCallbacks, it must be a value
2017-01-13 08:23:52 -06:00
Job Evers-Meltzer
20f113d3da bug fix: jsonrpc methods no longer have a 'result' key 2017-01-12 09:55:38 -06:00
Alex Grintsvayg
d06211015d api doc generator 2017-01-11 17:30:16 -05:00
Alex Grintsvayg
86aa8e1de0 updates based on job's comments 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
495a48add1 appveyor is a line-length nazi 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
a6457d2c0a detect authentication error and warn accordingly 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
5c429e15bd remove authjsonrpc subhandlers. we dont use them 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
05725e0dc9 rpc works with authentication 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
53acb2d9cd restore one deprecated method (for now) 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
f050337dbc incorporate job's changes 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
6d7b09a3aa remove return codes that are not being used 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
dd87aa3ce6 make sure deprecated methods still return results 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
b602b09ca3 better cli help 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
628defa891 remove extraneous ellipses in messages 2017-01-11 15:39:28 -05:00
Alex Grintsvayg
962edb8e4c rename api endpoints 2017-01-11 15:39:28 -05:00
Umpei Kay Kurokawa
a67aab0797 Merge pull request #393 from lbryio/fix_github_version_request
Fix obtaining version from github
2017-01-10 20:42:08 -05:00
Kay Kurokawa
52500bfbf5 use latest release for getting lbryum version, add a timeout when requesting lbrynet/lbryum version 2017-01-10 12:55:47 -05:00
Job Evers‐Meltzer
d32bb9270a Merge pull request #376 from lbryio/add-id
add id field to jsonrpc response
2017-01-09 15:23:24 -06:00
Kay Kurokawa
9e7b69f4a0 fix publish output 2017-01-09 14:35:29 -05:00
Job Evers
c2fc15160f Fix watch
I changed the _download_name return type without realizing that
it was also used by the watch endpoint.  This switches the endpoint
to go through get so that watches can be tracked just like downloads
2017-01-03 18:08:31 -06:00
Job Evers‐Meltzer
38e6b4e6c6 Merge pull request #379 from lbryio/open-ui-asap
open the ui as soon as possible
2017-01-03 15:28:50 -06:00
Jack
3541625825 move launch into own function 2017-01-03 15:51:42 -05:00
Job Evers‐Meltzer
f8f83fccf1 Merge pull request #375 from lbryio/fix-stop-errors
Fix stop errors
2017-01-03 14:13:24 -06:00
Jack
5f8a06443c open the ui as soon as UIManager finishes setting itself up 2017-01-03 11:44:29 -05:00
Job Evers
4e0194d576 add id field to jsonrpc response 2017-01-02 20:12:37 -06:00
Job Evers
16fc416d88 more informative name error 2017-01-02 19:47:34 -06:00
Job Evers
6faee910de Raise exception if lbry_file can't be found 2017-01-02 19:46:40 -06:00
Job Evers
f7308beee9 upgrade txJson-RCP to 0.5
The older version we were running didn't support jsonrpc v2 for
error codes, which both the command line client and ui client
were expecting.
2017-01-02 19:15:25 -06:00
Job Evers‐Meltzer
3d0913ca94 Merge pull request #373 from lbryio/bundled-version
Set ui_version for Bundled UI
2017-01-02 17:17:31 -06:00
Job Evers‐Meltzer
c37bb0d1ed Merge pull request #372 from lbryio/fix-stop
fix the stop script
2017-01-02 16:50:34 -06:00
Job Evers-Meltzer
a4a9a2b0b0 fix the stop script 2017-01-02 16:40:50 -06:00
Jack
2cf08fda2d use urllib for loggly url formatting 2017-01-02 16:09:28 -05:00
Jack
c2c7d2b327 send bug reports to slack 2017-01-02 14:52:24 -05:00
Job Evers-Meltzer
26cf04e0c1 refactor requirements parsing 2017-01-02 12:01:55 -06:00
Job Evers-Meltzer
3bb8f4ac21 set ui_version for bundled ui 2017-01-02 12:01:55 -06:00
Job Evers-Meltzer
e823bb2012 Bug fix in auth.server
Fixes a mistake in fa8190356a,
where an usage of _log_and_render_error was overlooked
2016-12-30 16:48:44 -06:00
Job Evers-Meltzer
eec25791a5 fix lbryid in settings dict
The lbryid is stored as raw bytes, need to hexlify
it before sending it over to the client
2016-12-30 16:47:50 -06:00
Job Evers‐Meltzer
6936dbd588 Merge pull request #369 from lbryio/track-errors
track errors in analytics
2016-12-30 15:39:41 -06:00
Job Evers‐Meltzer
621530b3b8 Merge pull request #367 from lbryio/analytics-on-get
Analytics on get
2016-12-30 15:39:06 -06:00
Job Evers-Meltzer
123fda1844 track errors in analytics 2016-12-30 15:09:34 -06:00
Job Evers-Meltzer
1299c23bcc fix cli 2016-12-30 15:07:24 -06:00
Job Evers-Meltzer
1747f53276 Remove _set_events
Function was removed in 101985ca11,
but wasn't removed from setup()
2016-12-30 14:42:03 -06:00
Job Evers-Meltzer
669a567545 add id to link download events 2016-12-30 13:35:16 -06:00
Job Evers-Meltzer
6bdc9069c9 on get, first check if we already have the name 2016-12-30 13:35:16 -06:00
Job Evers-Meltzer
ad1e2650e3 add events for downloading stages 2016-12-30 13:31:20 -06:00
Job Evers-Meltzer
01cc4f28e0 Refactor jsonrpc_get
Convert some of the calls to inlineCallbacks, which
allowed the code to be cleaned up and made more clear
2016-12-30 13:27:12 -06:00
Job Evers-Meltzer
ccfb1f3921 refactor: name private/public variables 2016-12-30 13:22:06 -06:00
Job Evers-Meltzer
5eecae8889 record server startup event as part of start_server 2016-12-30 13:05:19 -06:00
Job Evers-Meltzer
5aa10031bc Move log_support import earlier
Since log_support configures the logging class, it needs
to be early in the initialization process.
2016-12-30 13:05:19 -06:00
Job Evers-Meltzer
101985ca11 Remove analytics setup code from daemon
Now that lbryid and session_id are available at startup
we don't need to reconfigure the analytics manager
inside the daemon
2016-12-30 13:05:19 -06:00
Job Evers-Meltzer
8f61fb3fc4 Initialize settings, along with lbryid and session_id on startup 2016-12-30 13:05:19 -06:00
Job Evers-Meltzer
39b2e44492 Replace settings with conf.settings
In the next commit I change conf.settings to be initialized
at runtime instead of load time and so any import of
`from lbrynet.conf import settings` will be and stay None if
it happens before the initialization.
2016-12-30 13:05:18 -06:00
Job Evers-Meltzer
26bc6d05a0 Consistently use lbryid over lbry_id variable name 2016-12-30 12:40:36 -06:00
Job Evers‐Meltzer
4574e3317c Merge pull request #363 from lbryio/wallet-storage
Wallet storage
2016-12-30 11:41:38 -06:00
Alex Liebowitz
da0b4e9a1a Fix typo in set_settings API method 2016-12-30 05:00:28 -05:00
Job Evers-Meltzer
2c7fc3fb46 switch startup sequence to use inlineCallbacks
This cleans up the process, makes it more readable,
and better surfaces errors.
2016-12-28 11:21:10 -06:00
Job Evers-Meltzer
fc24d9b5aa pull out metadata storage from the wallet 2016-12-28 11:18:55 -06:00
Kay Kurokawa
10810226ff Fixing bug in publisher 2016-12-19 18:41:35 -05:00
Jack Robison
c0f22decd7 Merge pull request #347 from lbryio/log-error-on-lbry-files
Log failure when attempting to get_lbry_files
2016-12-19 16:22:37 -05:00
Jack
618d0ebd5b newline 2016-12-19 13:40:33 -05:00
Jack
f301741807 re-use lbryid 2016-12-19 13:27:45 -05:00
Jack
5a76a03cb6 remove unqlite requirement
-conditionally import PTCWallet (needed for testing, requires unqlite)

-install unqlite on travis and appveyor
2016-12-17 20:03:35 -05:00
Jack
09846413bd remove Settings.py
remove old settings class, which was only used for the lbryid and
required unqlite.

this allows the daemon startup to be simplified, it previously relied
on Settings in a few places. lbryid had been stored in the old
settings, this initializes it at startup.
2016-12-17 20:01:06 -05:00
Job Evers-Meltzer
d5d0d0e31c change error log on resolve-name to info 2016-12-16 19:51:10 -06:00
Job Evers-Meltzer
53df361d23 Log failure when attempting to get_lbry_files
I had an old version of lbryum installed and so no
names were coming back. But the daemon was failing
silently. This at least logs the error.
2016-12-16 00:32:06 -06:00
Job Evers‐Meltzer
3dde7af576 Merge pull request #339 from lbryio/all-prs
All The PRs
2016-12-15 19:42:35 -06:00
Job Evers-Meltzer
fec917b9c1 rename platform to system_info 2016-12-15 18:58:16 -06:00
Job Evers-Meltzer
fa8190356a replace log_support.failure calls 2016-12-15 18:58:15 -06:00
Job Evers-Meltzer
c30ea04959 Remove commented code
This is the result of running eradicate (https://github.com/myint/eradicate)
on the code and double-checking the changes.
2016-12-15 18:58:06 -06:00
Kay Kurokawa
965f8f1238 removing unused get_transaction function from daemon and wallet 2016-12-15 10:28:49 -05:00
Job Evers-Meltzer
7bce37a720 pylint: add check for missing-final-newline 2016-12-14 19:21:59 -06:00
Job Evers-Meltzer
14ac2bac39 pylint: fix trailing-whitespace 2016-12-14 19:21:59 -06:00
Jeremy Kauffman
32fa2460ff sort the help functions 2016-12-14 19:21:54 -06:00
Kay Kurokawa
bce41ddab4 Do not return 'success' and 'reason' as outputs in claim commands
We throw an Exception instead
2016-12-14 19:05:05 -06:00