Commit graph

35 commits

Author SHA1 Message Date
Hugo
2e6c848c39 Upgrade Python syntax with pyupgrade --py36-plus 2018-10-23 12:02:10 -04:00
Alex Grintsvayg
a702afd010
track all downloads in a single db (in parallel with existing metrics) 2018-09-21 15:19:12 -04:00
hackrush
a7ef8889dd
Unified CLI, python 3(WIP) (#1330)
* Added new custom cli class using aiohttp
* Proper error handling in CLI based on RPC error codes(PoC)
* Auth API working
* UnitTests
2018-08-24 11:40:43 -04:00
Lex Berezhny
4ece422f48
No longer inheriting from object and added proper use of super(). 2018-08-24 11:37:53 -04:00
Jack Robison
7e8ca842a2
change ComponentManager to use instance methods rather than class methods
-add get_component method to ComponentManager

-add override_components kwargs to ComponentManager

-add skip_components to ComponentManager

-change component_manager attribute to exist on the AuthJSONRPCServer instance instead of the class
2018-07-24 20:01:38 -04:00
Lex Berezhny
6952c2c07e
Revert "refactor lbrynet-daemon into modular components" (#1286)
* Revert "fix reflector test"

This reverts commit 6a15b51ac3.

* Revert "refactor lbrynet-daemon into modular components (#1164)"

This reverts commit 75a6ff269e.
2018-07-05 19:05:48 -04:00
Jack Robison
75a6ff269e refactor lbrynet-daemon into modular components (#1164)
* add daemon Component and ComponentManager classes

* convert directory and SQLiteStorage setup to be a Component

* support callbacks to component setups

* Fixed typo in ComponentManager

* convert wallet to be Component

* Use storage from session.

* Remove create_session internal function and PEP8

* Starting to convert session to its own component. Removed ref to `self.storage` from Daemon.py

* Making DHT component(broken)

* Refactored classes to reduce redundancy in getting config setting

* DHT is now it's own component

* Fixed `test_streamify` test

* Fixed regression caused by removing `peer_manager` from session

* refactor ComponentManager and Component to use instance instead of class methods

* Hash announcer, file manager, stream identifier components

* Query Handler and server components

* Reflector Component

* Fixed test_streamify(well Jack did, but ¯\_(ツ)_/¯)

* All tests now passing

* Pylint fixes

* Oops(That's all you're gonna get :-P)

* Making decorators(WIP, commit so that I don't lose work)

* Decorator made and decorating of functions done(some other changes)

* import fixes and removed temporary test function

* Fixed new broken tests from daemon refactor

* Sanitization of modules

* Reworded errors

* wallet unlock condition checks, fixed breaking changes

* Rebased on amster and other crazy stuff

* Started writing tests

* Tests for component manager

* Fix Daemon Tests

* Fixed passing mutable args in init

* Using constants instead of strings. Added CHANGELOG.md

* Now components can be skipped by setting relevant config in file.

* P-Y-L-I-N-T #angry_emoji
2018-07-05 15:21:52 -04:00
rick batka
69a99a61ba Fix issue #930. Disallow positional arguments for CLI settings_set and fix error reporting when settings_set fails. 2018-02-09 11:30:29 -05:00
Jack Robison
b0a3771ccf
better download errors 2017-09-28 14:04:02 -04:00
hackrush
ecd602e5fb Added validation for currencies.
Now while setting currency via API/CLI it is checked that the user has
not entered any currency other that LBC, BTC or USD.

Fixes #778
2017-07-24 16:38:15 -04:00
Kay Kurokawa
e4df0bdb5f create UnknownOutpoint exception and use it 2017-07-17 12:17:35 -04:00
Jack Robison
65bc93f2fe raise error on negative point reservation 2017-07-07 16:43:13 -04:00
Kay Kurokawa
bd4dd8e114 add timeout to download_sd_blob and StandaloneBlobDownloader 2017-07-05 16:33:02 -04:00
Jack Robison
2cfd29564b add resolution exception types 2017-06-09 14:48:55 -04:00
Kay Kurokawa
9755e9b11f Improvements to exchange rate manager 2017-03-03 12:50:47 -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
0f907a209b add EncryptedFileDownloader.load_file_attributes 2017-02-16 09:12:47 -05:00
Alex Grintsvayg
5c429e15bd remove authjsonrpc subhandlers. we dont use them 2017-01-11 15:39:28 -05:00
Job Evers-Meltzer
f39a21cf7b Provide better feedback on why a name is invalid 2016-12-01 11:02:37 -06:00
Umpei Kay Kurokawa
28bf5215e4 Merge pull request #251 from kaykurokawa/fix_unknonwname_exc
fixing UnknownNameError exception initialization
2016-11-09 12:37:03 -05:00
Job Evers-Meltzer
61a354fa60 add bad-whitespace check to pylint 2016-11-09 11:27:07 -06:00
Kay Kurokawa
4ad6405f35 fixing UnknownNameError exception initialization 2016-11-08 14:28:17 -05:00
kkurokawa
7dd5e7ceeb spacing after comma fix, use Exception init in InvalidStreamInfoError 2016-11-01 16:35:44 -04:00
kkurokawa
39b47bc569 better error detection in _get_stream_info_from_value 2016-11-01 10:34:08 -04:00
Job Evers-Meltzer
353ede26b8 Log error when resolve name fails 2016-10-28 16:03:58 -05:00
Jack
a8a581d35c Merge branch 'master' into auth-jsonrpc
# Conflicts:
#	lbrynet/conf.py
#	lbrynet/core/Error.py
#	lbrynet/lbrynet_daemon/Daemon.py
#	lbrynet/lbrynet_daemon/DaemonControl.py
#	lbrynet/lbrynet_daemon/ExchangeRateManager.py
2016-10-14 18:25:37 -04:00
Jack
1720cce3b0 negotiated downloads
-uploads are still underway
2016-09-27 13:52:44 -04:00
Jack
4d79a7828c more cleaning up 2016-09-21 21:36:06 -04:00
Jack
130f9cfc4d api sessions
-user starts a httpauthsession with an api key and name
-user initializes jsonrpc hmac secret to sha256 of session id
-server sends new random hmac secret after each api call

-a user without an authenticated session will get a authorization error
2016-09-20 16:58:30 -04:00
Jack
b83dce2cb3 no tricky characters 2016-07-28 18:48:29 -04:00
Jack
102436274f USD denominated max_key_fee in settings 2016-07-25 22:46:04 -04:00
Jimmy Kiselak
8177119671 Fix how some errors are presented to the user
If an invalid stream descriptor hash is entered, abort and
give a useful error.

If a name doesn't resolve, abort and give a useful error.

If a name resolves to something invalid, abort and give a useful error.
2015-09-16 16:27:46 -04:00
Jimmy Kiselak
c7758506ac remove leveldb, use sqlite and unqlite. create migrator tool 2015-09-04 16:22:02 -04:00
Jimmy Kiselak
192ac6959a more specific exceptions, and change when blobs are deleted
More specific exceptions are raised when problems are encountered
looking up metadata and validating stream descriptor files, and
on the GUI those more specific exceptions are used to prevent
errors from being presented to the user.

If the user has selected the option to re-upload data for some
stream, blobs downloaded for that purpose will not be deleted
when they are finished being output. Instead, by default, for
the GUI they will be deleted when the stream is removed from
the GUI. That can be changed so they are not deleted at all,
using the lbry.conf file.
2015-09-01 17:49:26 -04:00
Jimmy Kiselak
7240ff6b1c initial commit 2015-08-20 11:27:15 -04:00