Commit graph

576 commits

Author SHA1 Message Date
Alex Liebowitz
8b68a752ed Add file_utils module 2017-01-20 22:29:27 -05:00
Job Evers-Meltzer
2c9c0da501 get_blob bug fix 2017-01-20 17:41:08 -06:00
Umpei Kay Kurokawa
60195ed6d4 Merge pull request #427 from lbryio/fix_new_address
Prevent excessive generation of new addresses
2017-01-20 17:14:21 -05:00
Job Evers-Meltzer
3e774fc158 missed another verified time check 2017-01-20 18:47:53 +00: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
Kay Kurokawa
8628b127f7 do not create new addresses in lbryum, get unused ones 2017-01-18 20:48:23 -05:00
Job Evers-Meltzer
1a850b0256 log exception on callback failure 2017-01-17 20:01:04 -06:00
Alex Grin
17d9c0ab97 Merge pull request #417 from lbryio/refactor_settings
refactor conf.settings
2017-01-17 14:53:01 -05:00
Alex Grintsvayg
267c6cbaca refactor conf.settings 2017-01-16 22:32:54 -05:00
Kay Kurokawa
03b214a9d2 convert claim_out['fee'] to float 2017-01-16 15:36:37 -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
ddcfa7f97c Merge pull request #383 from lbryio/logging-improvements
Logging Improvements
2017-01-13 13:42:35 -06:00
Alex Grintsvayg
8277df1034 minor nits 2017-01-13 12:26:37 -05:00
Job Evers-Meltzer
cb2bb6ee6b bug fix: properly stop ConnectionManager
It is possible (likely) that a manage call is in progress when
`stop` is called. When that happens, _manage will continue to
run, and schedule another call - and the manager won't actually stop,
and will likely cause an error as other components have been torn down.

This fix adds a deferred that gets created when a manage call starts
and is fired when its done.  At this points its safe to start the
stopping process.  Also add a check to not schedule another manage
call if we're stopped

This fixes https://app.asana.com/0/142330900434470/239832897034382
2017-01-13 08:24:06 -06:00
Job Evers-Meltzer
0bb62515a8 reorder functions to match call order 2017-01-13 08:24:06 -06:00
Job Evers-Meltzer
f535d96929 switch stop to inlineCallback 2017-01-13 08:24:06 -06:00
Job Evers-Meltzer
15c5075d38 refactor closing peers 2017-01-13 08:24:06 -06:00
Job Evers-Meltzer
2449604844 fixup: bug fix for stopping downloads 2017-01-13 08:24:06 -06:00
Job Evers-Meltzer
6035a84675 bug fix for stopping downloads
deferredlist returns a tuple of (success, result) and the previous
code was looking at the entire tuple not the success values.
2017-01-13 08:24:05 -06:00
Job Evers-Meltzer
1b2c46e224 make _download_manager private 2017-01-13 08:19:23 -06:00
Job Evers‐Meltzer
61702ba1e4 Merge pull request #301 from lbryio/query-available-blobs
Query available blobs and Upload to Lighthouse Scripts
2017-01-12 08:42:08 -06:00
Alex Grintsvayg
5c429e15bd remove authjsonrpc subhandlers. we dont use them 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
Job Evers-Meltzer
5dbf9034ec Add scripts related to querying / downloading sd blobs 2017-01-11 12:05:34 -06:00
Job Evers‐Meltzer
c393bd97e8 Merge pull request #388 from lbryio/hash-announce
ensure hash_announcer exists before announcing
2017-01-09 15:23:53 -06:00
Kay Kurokawa
9e7b69f4a0 fix publish output 2017-01-09 14:35:29 -05:00
Job Evers-Meltzer
68887d145f cleanup whitespace for increased readability 2017-01-06 08:04:18 -06:00
Job Evers-Meltzer
f37808859f ensure hash_announcer exists before announcing 2017-01-06 08:00:22 -06:00
Job Evers
abc122f77b Don't send log messages to loggly in dev mode 2017-01-03 22:17:44 -06:00
Job Evers
0ababb7f3b Route twisted logging messages to the python stdlib logger 2017-01-03 22:16:57 -06:00
Jack
c2c7d2b327 send bug reports to slack 2017-01-02 14:52:24 -05:00
Job Evers-Meltzer
a5c25ff887 Stop eating wallet connection error 2016-12-30 22:34:08 -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
123fda1844 track errors in analytics 2016-12-30 15:09:34 -06:00
Job Evers-Meltzer
669a567545 add id to link download events 2016-12-30 13:35:16 -06:00
Job Evers-Meltzer
0b53fde352 refactor connectionmanager to use inlineCallbacks 2016-12-30 13:28:34 -06:00
Job Evers-Meltzer
4eb10b56c1 small changes 2016-12-30 13:27:17 -06:00
Job Evers-Meltzer
1256beea96 remove blob_requester from DownloadManager 2016-12-30 13:27:16 -06:00
Job Evers-Meltzer
689ac431d3 bug fix in log.fail()
The value of the callback needs to be returned.  In particular,
this allows the error to be passed along.
2016-12-30 13:22:06 -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
47f71fd363 Merge pull request #360 from lbryio/store-offer
Only store the offer explicitly when its sent
2016-12-30 12:15:06 -06:00
Job Evers‐Meltzer
4574e3317c Merge pull request #363 from lbryio/wallet-storage
Wallet storage
2016-12-30 11:41:38 -06:00
Kay Kurokawa
7d5dd1ff51 fix bug in ServerProtocol 2016-12-28 14:34:38 -05:00
Job Evers-Meltzer
fc24d9b5aa pull out metadata storage from the wallet 2016-12-28 11:18:55 -06:00
Kay Kurokawa
da366495b0 fixing get_value_for_name bug 2016-12-28 10:37:53 -05:00
Job Evers-Meltzer
f7864e8cb7 Only store the offer explicitly when its sent
Ran into a situation where I was recieving an offer response without
something in protocol_offers. I think this was because
get_and_set_rate doesn't always populate that dictionary.

Worried that there still might be issues if the connection is
unreliable: if a response comes in twice it will error or
if a second offer is made without a response to the first
there will be an error.
2016-12-20 10:37:42 -08:00
Kay Kurokawa
1690e71ad1 setup Commands class on run, instead of on initialization 2016-12-19 19:15:59 -05:00
Kay Kurokawa
7d02e7d370 changing wallet initialization order 2016-12-19 19:15:50 -05:00
Jack
0044d6cf75 BlobAvailabilityTracker.sample bug, remove whitespace 2016-12-17 20:05:27 -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
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
7af6e9e0dd Improve BlobAvailabilityTracker performance
For daemons with a lot of blobs, getting mean availabity
will be slow. Samples the blobs in an attempt at getting
better performance.
2016-12-15 19:03:37 -06:00
Job Evers-Meltzer
56d394fb5f Add timing to hash announcements
This could potentially be a performance issue
on reflector or any daemon with a large number of blobs.
2016-12-15 18:58:16 -06:00
Job Evers-Meltzer
3585d861ff Add TRACE level logging 2016-12-15 18:58:16 -06:00
Job Evers-Meltzer
f181af8547 Cleanup code in BlobManager 2016-12-15 18:58:16 -06:00
Job Evers-Meltzer
781b915717 remove unused check_consistency function 2016-12-15 18:58:16 -06:00
Job Evers-Meltzer
fec917b9c1 rename platform to system_info 2016-12-15 18:58:16 -06:00
Job Evers-Meltzer
4ca33505b5 logging: add kwargs to fail() call 2016-12-15 18:58:15 -06:00
Job Evers-Meltzer
20b6b22334 Add callback functionality to log.fail
This enables the common pattern of being able to log a failure and
then do something.
2016-12-15 18:58:15 -06:00
Job Evers-Meltzer
b8c91c61bb Make a new logger with a fail method that is useful for errbacks.
Extracting useful tracebacks and line numbers from failures
withing twisted's deferred can be a pain. Hopefully this is a step
in the right direction.
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
23bf43f40c fixing bug where broadcast_transaction function would not return a deferred 2016-12-15 10:28:49 -05:00
Kay Kurokawa
6f60b8b827 work on resolving threading issues with lbryum in Wallet.py 2016-12-15 10:28:49 -05: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
Job Evers-Meltzer
f796f701f2 Immediately announce completed blobs
It doesn't seem necessary to wait up to 60 seconds for a new blob to
be announced to the dht. Immediately announce it and schedule the next
announce time as usual.
2016-12-14 19:05:24 -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
Job Evers-Meltzer
b64fa51567 fixup long lines 2016-12-07 09:38:34 -05:00
Jack Robison
9ad55e93b9 Merge pull request #315 from kaykurokawa/fix_claim_bug
Fix bug to exclude support in get_my_claim
2016-12-07 09:25:44 -05:00
Jack
8cb0f99e30 fix pylint errors 2016-12-06 12:22:43 -05:00
Umpei Kay Kurokawa
6076861cd0 Merge pull request #304 from kaykurokawa/remove_lbrycrd
Remove lbrycrdd
2016-12-06 12:06:09 -05:00
Kay Kurokawa
9c50cfdcdb fix bug in get_my_claim 2016-12-05 17:17:17 -05:00
Jack Robison
13d74d1f76 Merge pull request #297 from lbryio/better-name-error
Provide better feedback on why a name is invalid
2016-12-02 12:08:58 -05:00
Kay Kurokawa
200a22c93b Remove support for lbrycrdd wallet and related code 2016-12-01 16:45:48 -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
67b169c5a1 Merge pull request #300 from kaykurokawa/fix_claim_defer
Missing the return of a defer.fail when claim fails, changing to raise Exception
2016-11-30 23:08:48 -05:00
Kay Kurokawa
ff10546152 Missing the return of a defer.fail when claim fails, changing to raise Exception 2016-11-30 22:57:23 -05:00
Kay Kurokawa
360f4e50a0 converting some log.info to log.debug in Wallet 2016-11-30 16:37:28 -05:00
Job Evers‐Meltzer
f11f486f5a Merge pull request #292 from lbryio/allow-rc
allow for rc in version values
2016-11-30 14:16:17 -06:00
Job Evers-Meltzer
6f2e2e727e fix pylint errors 2016-11-28 13:33:34 -06:00
Jack
bfcd84a568 use nOut in addition with txid to identify claims 2016-11-25 16:59:23 -05:00
Job Evers-Meltzer
3d7dee1208 allow for rc in version values 2016-11-19 16:58:40 -06:00
Alex Grintsvayg
7ecc8103d8 improve error analytics
- move analytics creation earlier in the startup process
- add several events to track startup, startup failure, other errors
- abstract platform detection into separate file
- add "build" type to platform so we can differentiate devs vs live users
2016-11-15 10:31:35 -05:00
Job Evers‐Meltzer
5b7f80487f Merge pull request #271 from lbryio/log-lbryum-on-verbose
enable lbryum info logging when verbose
2016-11-15 08:47:51 -06:00
Job Evers-Meltzer
9940327b9a enable lbryum info logging when verbose 2016-11-14 20:34:56 -06:00
Job Evers-Meltzer
85dee27c92 whitespace 2016-11-14 19:33:36 -06:00
Jack
e1cdbdc91d fix coveralls error 2016-11-14 14:02:19 -05:00
Jack Robison
763fefb33f Merge pull request #256 from kaykurokawa/fix_get_my_claim
Update right after making claim will fail due to get_my_claim()
2016-11-14 13:37:54 -05:00
Job Evers-Meltzer
3b34bddf0a more logging on startup 2016-11-11 10:14:41 -06:00
Kay Kurokawa
11b36ff4c8 fixing to remove supports from get_my_claim 2016-11-10 12:52:35 -05:00
Kay Kurokawa
1f06339d5a fix get_my_claim command 2016-11-09 15:19:58 -05: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
Job Evers‐Meltzer
66745b0820 Merge pull request #242 from lbryio/shutdown-issues
Shutdown issues
2016-11-09 08:17:13 -06:00
Kay Kurokawa
4ad6405f35 fixing UnknownNameError exception initialization 2016-11-08 14:28:17 -05:00
Job Evers-Meltzer
43b2cd1433 cleanup whitespace and long-lines 2016-11-04 11:44:50 -05:00
Job Evers-Meltzer
59c4593bf4 whitespace 2016-11-03 14:42:57 -05:00
Job Evers-Meltzer
5bccfdb244 add logging to shutdown process 2016-11-03 14:42:45 -05:00
Job Evers-Meltzer
10cb20d08f fix whitespace and long-lines 2016-11-03 14:22:16 -05:00
Job Evers‐Meltzer
269dc47b69 Merge pull request #230 from kaykurokawa/better_stream_info_error
Better error detection in Wallet for invalid streams
2016-11-02 07:13:48 -05:00
kkurokawa
7dd5e7ceeb spacing after comma fix, use Exception init in InvalidStreamInfoError 2016-11-01 16:35:44 -04:00
Job Evers‐Meltzer
c88e4aecf5 Merge pull request #232 from lbryio/read-config
Read config
2016-11-01 11:33:17 -05:00
Job Evers-Meltzer
30533a7986 Read config file in windows and osx
Also moves the config loading to BEFORE the log configuration
2016-11-01 11:14:04 -05:00
kkurokawa
39b47bc569 better error detection in _get_stream_info_from_value 2016-11-01 10:34:08 -04:00
kkurokawa
e9bab33e2a fixing claim updates 2016-10-31 19:17:37 -04:00
Job Evers-Meltzer
9ca80a7cf7 set lbryum to log at warning level
lbryum is very chatty at the info level. As a rough estimate a bit
over half of our logs in loggly are a result of lbrum.

The better, long-term, solution would be to modify lbryum to move more
logs to the debug level.
2016-10-30 16:47:37 -05:00
Job Evers-Meltzer
353ede26b8 Log error when resolve name fails 2016-10-28 16:03:58 -05:00
Job Evers-Meltzer
6fa624ec8a switch LogUploader to use an already encoded lbryid 2016-10-28 15:44:24 -05:00
Job Evers-Meltzer
6f9ec2fa66 remove repeated log code 2016-10-28 15:43:04 -05:00
Job Evers-Meltzer
40437e4a82 log cleanup 2016-10-28 15:43:04 -05:00
Job Evers-Meltzer
2ee6fac014 redo logging configuration for lbrynet-daemon script 2016-10-28 15:43:04 -05:00
Job Evers-Meltzer
862055a6de move settings into conf file 2016-10-27 14:31:27 -05:00
Job Evers-Meltzer
2cd6c644a0 Merge remote-tracking branch 'origin/master' into refactor-settings
Conflicts:
	lbrynet/lbrynet_daemon/Daemon.py
	lbrynet/lbrynet_daemon/DaemonControl.py
	lbrynet/lbrynet_daemon/DaemonServer.py
2016-10-27 10:34:48 -05:00
Job Evers-Meltzer
0edacbe4c8 Merge remote-tracking branch 'origin/master' into refactor-settings
Conflicts:
	lbrynet/conf.py
	lbrynet/lbrynet_daemon/Daemon.py
	lbrynet/lbrynet_daemon/DaemonCLI.py
	lbrynet/lbrynet_daemon/UIManager.py
	tests/functional/test_misc.py
2016-10-27 10:18:56 -05:00
Job Evers-Meltzer
5d45345398 shutdown if there are errors during setup 2016-10-26 17:39:43 -05:00
Jack
1951ea09cd updates from master, more refactoring
-lbrynet.lbrynet_daemon.auth.client.LBRYAPIClient.config will detect if
it needs to return the auth/non-auth version
2016-10-26 03:16:33 -04:00
Job Evers-Meltzer
4d391e7429 Use better json formatting
Apply json.dumps at the end of the formatting process instead of the
middle.  This allows for proper escaping of quotes and allows for
actual json to be emitted.
2016-10-25 17:49:35 -05:00
Job Evers-Meltzer
0c2265a8da replace some strings 2016-10-20 11:30:38 -07:00
Job Evers-Meltzer
01811621a6 shorten is_valid_blobhash logic 2016-10-20 11:29:58 -07:00
Job Evers-Meltzer
ddb88eb1c9 move LoopingCallManager to own module 2016-10-20 11:29:58 -07:00
Job Evers-Meltzer
d5f0001950 small cleanups 2016-10-20 11:29:15 -07:00
Job Evers-Meltzer
3a91896d8a track the amount of data uploaded 2016-10-20 11:28:05 -07:00
Job Evers-Meltzer
c104ed3f8b better time handling in tests 2016-10-20 11:28:05 -07:00
Job Evers-Meltzer
2e59e5e3b8 extract individual functions 2016-10-20 11:16:36 -07:00
Jack
ea21821558 fix issues with is_generous
-stop requesting blobs if price limit is reached and the offer still
has not been accepted

-drop max rate to old flat rate (0.005lbc/mb)
2016-10-20 12:29:55 -04:00
Jack
a9ae1a1016 fix bug where support claim is returned when it shouldn't be 2016-10-20 11:15:35 -04:00
Jack
3f5efb1fa3 fix problems in blobrequester
-also move is_generous_host into a conf setting
2016-10-20 01:35:18 -04:00
Jack
06a88599df --http-auth flag to use authentication, refactor settings
settings will prefer, in order:
-defaults
-settings in config file
-settings given as environmental variables
-settings given as command line args
2016-10-19 00:12:44 -04:00
Job Evers
6b7d575e95 use lbry.io to check for an internet connection 2016-10-17 20:11:08 -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
Alex Liebowitz
0dd9aa0d67 Update error that daemon catches for malformed metadata
Now jsonschema.ValidationError instead of AssertionError
2016-10-14 10:37:19 -04:00
Jack Robison
32a973943f Merge pull request #173 from lbryio/blob-prices
Blob prices
2016-10-13 14:59:26 -04:00
Jack
19c2264429 clean up 2016-10-13 13:35:55 -04:00
Jack
5a0b5dc680 Merge branch 'master' into auth-jsonrpc
# Conflicts:
#	lbrynet/lbrynet_daemon/Daemon.py
#	lbrynet/lbrynet_daemon/DaemonControl.py
2016-10-07 17:11:43 -04:00
Jack
88be425ab2 fix pylint errors 2016-10-05 23:24:22 -04:00
Jack
4f60a98eb2 fix functional tests, add a few unit tests,
-add ‘generous’ parameter for NegotiatedPaymentRateManager to turn free
hosting on/off, by default set to true.
2016-10-05 22:58:34 -04:00
Job Evers-Meltzer
0ecfad0ae9 add configuration to LBRYumWallet 2016-10-04 13:58:44 -05:00
Jack
180d981ed8 fix more functional tests 2016-10-03 16:37:27 -04:00
Jack
fd9bc6214a fix functional tests 2016-10-03 15:40:27 -04:00
Jack
967700dc28 BlobRequestHandler and Strategy tests 2016-10-03 02:44:58 -04:00
Jack
5e4e619708 squelch loud log 2016-10-01 15:20:19 -04:00
Jack
d741c705cd add some tests, don't use lighthouse for cost ests 2016-10-01 01:09:27 -04:00
Jack
d83abd81f8 job's comments 2016-09-30 14:26:13 -04:00
Jack
8d961d6ce6 add get_availability 2016-09-30 13:28:01 -04:00
Jack
c130879ef7 frontload bug
divide availability adjusted price by frontload factor, which will be
close to 1 while index is low and close to 2 when index is high - the
reduction approaches 50% as index goes up.
2016-09-30 00:36:23 -04:00
Jack
5c391f4bb4 remove unnecessary class 2016-09-30 00:12:17 -04:00
Jack
b853656aa6 Merge branch 'master' into blob-prices
# Conflicts:
#	lbrynet/core/server/BlobRequestHandler.py
2016-09-30 00:11:53 -04:00
Jack Robison
8222f940b4 Merge pull request #177 from lbryio/blob-request-handler-refactor
refactor BlobRequestHandler
2016-09-29 23:52:14 -04:00
Jack
71b989b29b update from master
resolve merge conflicts:
lbrynet/core/client/BlobRequester.py
lbrynet/core/Peer.py
lbrynet/lbryfilemanager/EncryptedFileManager.py
lbrynet/lbrynet_daemon/Daemon.py
lbrynet/lbrynet_daemon/Publisher.py
2016-09-29 23:34:59 -04:00
Jack
4727ee0403 Merge branch 'master' into refactor-blob-requester 2016-09-29 12:48:34 -04:00
Job Evers-Meltzer
d05bbea131 refactor BlobRequestHandler 2016-09-28 17:00:34 -07:00
Jack
b671a3c2ba Merge branch 'master' into blob-prices 2016-09-27 23:59:14 -04:00
Jack
1cc6b7658c get uploads working
-add error catching in exchange rate manager
-add free data on first request with default negotiation strategy
2016-09-27 23:56:08 -04:00
Job Evers-Meltzer
d1b06c3688 more fixes 2016-09-27 11:18:52 -07:00
Job Evers-Meltzer
7dbeb1f2cf Remove LBRY prefix from class and module names
This is the result of running:
    grep -RlI LBRY . | xargs sed -i 's/LBRY\([A-Z]\)/\1/g'
2016-09-27 11:18:35 -07:00
Jack
1720cce3b0 negotiated downloads
-uploads are still underway
2016-09-27 13:52:44 -04:00
Job Evers-Meltzer
078b254d1d rename files to remove LBRY prefix 2016-09-25 18:11:23 -07:00
Job Evers-Meltzer
6057dc0804 whitespace 2016-09-25 17:18:29 -07:00
Job Evers-Meltzer
4334cdace1 Refactor blob requester to better seperate out the three requests
Each blob requests has three parts
- A request to see what blobs are available
- A request to download and pay for one of those blobs
- A request to negotiate data costs

Before the refactoring all of the code to accomplish this was mixed into
one class.  They are now three seperate classes.

There is still a lot of room for improvement, but it is at least better than
it was.
2016-09-25 16:55:55 -07:00
Jack Robison
bbcecea28d Merge pull request #165 from lbryio/get-my-claim
add get_my_claim, remove is_mine from get_claim_info response
2016-09-24 01:01:51 -04:00
Jack
a936782ddc fix amount formatting between get_claim_info and get_my_claim 2016-09-24 00:58:54 -04:00
Jack
7ac0fc5a24 convert amount 2016-09-24 00:49:03 -04:00
Jack
e115158f86 docstring 2016-09-23 03:04:59 -04:00
Jack
bf34fa39b4 unused import 2016-09-23 03:03:15 -04:00
Jack
5dd29da84f blob upload/download history and BlobPriceAndAvailabilityTracker 2016-09-23 03:02:17 -04:00
Jack
492fc510fa move _get_my_unspent_claim to function 2016-09-21 22:10:19 -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
Job Evers-Meltzer
98d02b3fce [ci skip] add newlines 2016-09-19 12:07:47 -07:00
Jack
3ae0664fa9 use prettier file format for daemon conf file 2016-09-16 00:14:25 -04:00
Jack
fcfed3f441 add get_my_claim and get rid of is_mine in get_claim_info 2016-09-15 20:15:20 -04:00
Jack
13cbe0fd42 fix appveyor error 2016-09-14 23:03:18 -04:00
Jack
b010192f8e improve logging 2016-09-14 22:28:59 -04:00
Jack
3e45449e8c return unconfirmed balance 2016-09-12 13:16:56 -04:00
Jack
0f0afadc94 add 'height' parameter to get_block 2016-09-09 00:48:54 -04:00
Alex Liebowitz
900eeb177a Add address_is_mine() API method 2016-09-02 01:27:30 -04:00
Jack Robison
eed7c54aaf Merge pull request #146 from kaykurokawa/fix_lbryum_getbalance
Use new exclude_claimtrietx option in lbryum getbalance command, fix maturity use
2016-09-01 01:24:08 -04:00
Jack Robison
9c66108dc5 Merge pull request #142 from lbryio/skip-dust
skip dust transactions
2016-08-30 20:29:56 -04:00
kkurokawa
558da0a027 Using new exclude_claimtrietx option in lbryum's getbalance command. Fixing incorrect use of maturity. 2016-08-29 22:33:10 -04:00
Jack
1671034330 fix json bug 2016-08-29 14:33:56 -04:00
Jack
56e2d77039 fix _send_name_claim json 2016-08-29 13:44:18 -04:00
Jack Robison
319e7ecc61 Merge pull request #131 from lbryio/content_type
change content-type to content_type, refactor metadata validation
2016-08-28 01:29:51 -04:00
Jack
8895d21abf skip dust transactions 2016-08-27 02:42:20 -04:00
Jack
710e549c03 add get_all_verified_blobs 2016-08-26 00:32:33 -04:00
Jack
80837cb040 Merge branch 'master' into content_type
fix conflicts:
	lbrynet/lbrynet_daemon/LBRYPublisher.py
2016-08-25 17:59:20 -04:00
Jack
128b32c62c even less noisy logs 2016-08-22 19:56:42 -04:00
Jack
95f4b29be5 noisy log 2016-08-22 18:59:17 -04:00
Jack
5727c708cf fix get_transaction
previously get_tx_json was only in LBRYumWallet
2016-08-22 18:43:52 -04:00
Jack
e49f0f99a1 LBRYcrdWallet update claim fix
-fix log line that could raise an exception
-json encode value sent to lbrycrd-cli updateclaim
2016-08-22 16:57:22 -04:00
Jack
80af66e852 Merge branch 'master' into reflector
# Conflicts:
#	lbrynet/core/log_support.py
2016-08-21 01:12:29 -04:00
Jack Robison
ac63849b49 Merge pull request #132 from lbryio/fix-get-history
fix get_history in lbrycrdwallet
2016-08-21 00:07:41 -04:00
Jack
7a54894015 debugging stuff 2016-08-19 02:41:23 -04:00
Jack
929db15214 fix get_history in lbrycrdwallet 2016-08-18 22:15:49 -04:00
Jack
c046cd02d5 call blob_completed after receiving blob 2016-08-18 05:58:13 -04:00
Jack
adc2eab6da log request dict 2016-08-18 05:36:01 -04:00
Jack
edbda1696e logging fire hazard 2016-08-17 20:24:48 -04:00
Jack
ece218785c reduce logging to sub fire hazard levels 2016-08-17 20:20:03 -04:00
Jack
0f7ca8f24e move metadata and validator classes into their own directory 2016-08-17 12:28:15 -04:00
Jack
68b8112af0 Merge branch 'master' into content_type 2016-08-17 03:04:14 -04:00
Jack Robison
1932fd72e3 Merge pull request #123 from lbryio/add-heartbeat
Add basic analytics api and heartbeat event
2016-08-17 01:34:31 -04:00
Jack
e8fe1cd14d more test fixes 2016-08-15 18:39:09 -04:00
Jack
75d1fa585c fix tests 2016-08-15 18:30:14 -04:00
Jack
072ff4b02e fix tests 2016-08-15 18:13:36 -04:00
Jack
d8c4e2a72e whoops 2016-08-15 17:54:43 -04:00
Jack
66396de6a3 remove as_json and serialize 2016-08-15 17:41:38 -04:00
Jack
1ca9f575ef decorator prettiness 2016-08-15 17:07:50 -04:00
Jack
272e074a15 change content-type to content_type, make changing metadata easier 2016-08-14 01:00:49 -04:00
Job Evers
9a738c3783 Add basic analytics api and heartbeat event 2016-08-12 13:37:26 -05:00
Job Evers-Meltzer
9b1d5213a6 improve logging 2016-08-12 10:44:37 -05:00
Job Evers-Meltzer
f9ed9a4505 fixup logging some more 2016-08-12 10:42:31 -05:00
Jack
6a1a9ef6bc encode claim id to be shown in log 2016-08-09 03:25:20 -04:00
Jack
ef1c059079 clean up log line 2016-08-09 03:18:44 -04:00
Jack
a05ab37373 Merge branch 'master' into update-claim
# Conflicts:
#	lbrynet/lbrynet_daemon/LBRYDaemon.py
2016-08-09 03:09:06 -04:00
Jack
7ea88cfd22 crudely fix loggly import problem 2016-08-09 03:01:33 -04:00
Jack Robison
8d14fe6a90 Merge pull request #113 from lbryio/log-to-loggly
Log to loggly
2016-08-09 02:30:55 -04:00
Jack
b6da1d7769 decode and reverse claim id for updateclaim in lbryum 2016-08-09 01:26:55 -04:00
Jack
b7052bba95 rename variable 2016-08-08 21:34:05 -04:00
Jack
4a5618bcc4 get update claim working with lbryumwallet 2016-08-08 21:32:39 -04:00
Job Evers-Meltzer
fccdf32c9f Remove all unused imports; add check to pylint 2016-08-08 15:42:35 -05:00
Jack
c474411e1b delete bad records that got into name_metadata 2016-08-08 16:35:55 -04:00
Job Evers-Meltzer
9a9b540701 Move some ServerRequestHandling logging to debug level 2016-08-08 15:04:50 -05:00
Job Evers-Meltzer
b8ddbb9a26 Add loggly logger
It configured twice, once right at startup without the lbry id and then
after the settings database is available it gets reconfigured with the
lbry id and a session id.
2016-08-08 15:02:36 -05:00
Job Evers-Meltzer
bc3c2b96ed disable noisy loggers 2016-08-08 14:59:30 -05:00
Job Evers-Meltzer
622dc87d84 Remove log handlers with the same name
Also renames functions to follow underscore convention
2016-08-08 14:57:49 -05:00
Jack
6fe878bdb9 make load_from_hex a class method 2016-08-08 03:18:32 -04:00
Jack
72acfa1e0c add support_claim 2016-08-08 02:32:56 -04:00
Jack
f32250f431 whoops 2016-08-08 01:54:41 -04:00
Jack
1523cad044 refactor get_claim_info 2016-08-08 01:46:19 -04:00
Jack
f69753f6a0 add get_claims_for_name 2016-08-08 01:42:37 -04:00
Jack
3b98508986 clean up claim_name function 2016-08-07 16:13:47 -04:00
Jack
36ebfc42d9 update from master 2016-08-06 21:44:14 -04:00
Job Evers-Meltzer
db8daf20b7 quiet noisy log statement 2016-08-05 05:50:24 -05:00
Jack
28c4e38272 make line neater 2016-08-04 23:27:25 -04:00
Jack
b29377dc2b keep claim id history 2016-08-04 23:27:10 -04:00
Jack
b0e14fae43 update over existing claim in publish() 2016-08-04 23:08:54 -04:00
Jack
dfa68f126b get update_name in lbrycrdwallet working 2016-08-04 20:43:39 -04:00
Jack
4570f68727 add claim_id to lbry_file and to get_claim_info 2016-08-04 18:44:12 -04:00
Jack
4705acba55 use lbryum updateclaim 2016-08-04 02:22:10 -04:00
Jack
64e9ce2bfa comments about the upnp redirects 2016-08-03 17:44:41 -04:00
Jack
3af8b7bd0c use upnp redirects if they're already set 2016-08-03 01:27:40 -04:00
Jack
b83dce2cb3 no tricky characters 2016-07-28 18:48:29 -04:00
Jack
de4ddd578f improve readability of metadata and fee requirements 2016-07-28 15:24:20 -04:00
Jack
5dd68a7ed4 add get_claim_info, clean up _get_stream_info_from_value 2016-07-28 14:55:17 -04:00
Job Evers-Meltzer
295e427abe bug fix: check if fee is in metadata before loading 2016-07-28 12:04:25 -05:00
Job Evers
15d276b0bc fix case where to and from currencies are the same 2016-07-28 11:43:20 -05:00
Jack
415495fc16 LBRYExchangeRateManager 2016-07-28 05:30:13 -04:00
Jack
12b2bbfa26 make sure claimed ver is true 2016-07-28 02:36:07 -04:00
Jack
4ade80c8a9 clean up metadata and fee 2016-07-28 02:19:45 -04:00