Commit graph

451 commits

Author SHA1 Message Date
Lex Berezhny 78fd434686 asyncio.sleep() -> sleep() and asyncio.Event() to Event() in order to reduce overall diff after dropping curio.py 2018-12-11 15:59:15 -05:00
Lex Berezhny a6de3a9642 completely dropped curio.py 2018-12-11 15:59:15 -05:00
Lex Berezhny 5ed478ed11 dropped everything in curio.py except TaskGroup so far, TaskGroup is next 2018-12-11 15:59:15 -05:00
Lex Berezhny b93f9d4c94 removing dependence on curio abstraction 2018-12-11 15:59:15 -05:00
Victor Shyba 8bc07fad32 fast and furious 2018-12-07 08:47:30 -05:00
Lex Berezhny 612066165a improved integration test for tx synchronization 2018-12-06 13:38:56 -05:00
Lex Berezhny b273d58a80 0.2.5 2018-12-06 00:19:35 -05:00
Lex Berezhny b2544139e6 stress test 2018-12-05 23:45:35 -05:00
Lex Berezhny 367ffdea1f may be the sync fix 2018-12-05 23:42:16 -05:00
Lex Berezhny 4c854dd5a7 0.2.4 2018-12-05 11:50:11 -05:00
Lex Berezhny e96b2f702d 0.2.3 2018-12-05 11:49:22 -05:00
Lex Berezhny cff22a8951 pylint line too long 2018-12-05 11:48:19 -05:00
Lex Berezhny 1b7c5a1373 update_history serially handles unique addresses 2018-12-05 11:48:19 -05:00
Lex Berezhny 2bd60021aa pylint 2018-12-05 11:48:19 -05:00
Lex Berezhny 2b8c06bda7 wip sync fixing 2018-12-05 11:48:19 -05:00
Lex Berezhny c36b4626a9 added missing imports 2018-12-05 01:11:55 -05:00
Lex Berezhny b5f245d9b6 made pylint and mypy happy 2018-12-05 01:11:55 -05:00
Lex Berezhny 899a6f0d4a merged aiorpcx into torba.rpc 2018-12-05 01:11:55 -05:00
Jack Robison ca67c56222
catch decryption errors and verify seed is valid upon decrypt 2018-11-26 14:40:59 -05:00
Victor Shyba 56fc003a96 log errors from wallet servers 2018-11-26 00:32:20 -05:00
Lex Berezhny 9e5246c619 drop old style classes in torba.server 2018-11-25 20:51:41 -05:00
Lex Berezhny b2bcf39872 0.2.2 2018-11-25 11:08:49 -05:00
Lex Berezhny 10c1f8e1cf drop requirements: mock, requests. merge [server] into the main requirement section 2018-11-20 22:57:59 -05:00
Lex Berezhny ed880be3e5 0.2.1 2018-11-19 19:27:07 -05:00
Lex Berezhny e5714dc1fc test sync integration test and other fixes 2018-11-19 18:14:57 -05:00
Lex Berezhny ee28bbc19b pylint and mypy fixes 2018-11-19 18:14:57 -05:00
Lex Berezhny 345d4f8ab1 refactored tx sync 2018-11-19 18:14:57 -05:00
Jack Robison e745b6c16e fix wallet encryption
fixes https://github.com/lbryio/lbry/issues/1623
2018-11-19 17:15:09 -05:00
Victor Shyba fb6a7442a6 fix wallet server shutdown for tests 2018-11-07 16:46:47 -05:00
Lex Berezhny b8a3b62f0f moved import to make pylint happy, take 2 2018-11-07 15:10:27 -05:00
Lex Berezhny 78b84ba698 moved import to make pylint happy 2018-11-07 15:07:36 -05:00
Lex Berezhny fdf479241a added ledger.wait(tx) to support reliably waiting for TX to be in ledger 2018-11-07 14:42:17 -05:00
Lex Berezhny 8fcbf48bdf attempt UTXO check 5 times when UTXOs are less than the fee 2018-11-06 19:27:48 -05:00
Lex Berezhny 268e599423 handle creating transactions where input is consumed by fees and there is no output by creating an additional input which will require some change output 2018-11-06 19:16:27 -05:00
Lex Berezhny ae8fece9bb python3.6 tests pass again 2018-11-04 01:42:27 -05:00
Lex Berezhny c497385bc7 setup.py fixes 2018-11-04 01:04:14 -05:00
Lex Berezhny 37468cad59 fix pylint 2018-11-04 01:01:03 -05:00
Lex Berezhny 5f70ae9923 reorganization 2018-11-04 01:55:50 -04:00
Lex Berezhny 5cdda0f3a8 fix AsyncTestCase imports 2018-11-03 20:52:26 -04:00
Lex Berezhny f0e1fc1a49 more pylint and mypy fixes 2018-11-03 20:52:26 -04:00
Lex Berezhny 77d8c68b13 pylint disable workbench check for now 2018-11-03 20:52:26 -04:00
Lex Berezhny 48d7bfd225 pylint and mypy fixes 2018-11-03 20:52:26 -04:00
Lex Berezhny f60435c878 moving and refactoring electrumx into torba 2018-11-03 20:52:26 -04:00
Victor Shyba 41332f22c3 bump aiorpcx + adapt basenetwork 2018-11-03 11:00:23 -04:00
Lex Berezhny b90378d739 0.1.6 2018-10-25 17:49:17 -04:00
Victor Shyba a5a0089daa fix subscribe 2018-10-25 17:47:45 -04:00
Lex Berezhny 82c71e4255 v0.1.5 2018-10-21 11:53:13 -04:00
Victor Shyba dce5541c3a revert insert many due to lbrynet 2018-10-20 16:48:02 -04:00
Victor Shyba 8bbda75865 save_transaction_io back to a transaction 2018-10-20 16:48:02 -04:00
Lex Berezhny d3d60071ae v0.1.4 2018-10-19 11:01:35 -04:00
Victor Shyba 85503cf92b retry with a delay increasing from 0 up to 10 seconds 2018-10-19 10:59:27 -04:00
Lex Berezhny f67b872bd1 0.1.3 2018-10-18 18:21:39 -04:00
Victor Shyba c497e9884a pylint 2018-10-18 18:20:09 -04:00
Victor Shyba 3b021af1bd adds a simple sqlite asyncio wrapper 2018-10-18 18:20:09 -04:00
Lex Berezhny 6fe648b9a9 v0.1.2 2018-10-17 21:21:21 -04:00
Lex Berezhny 03594dab6a exception message correction 2018-10-17 21:20:21 -04:00
Victor Shyba b830f4c3ca fixes from code review 2018-10-17 19:43:26 -04:00
Victor Shyba 28b638f0aa prefetch and remove manual update calls 2018-10-17 19:43:26 -04:00
Victor Shyba 4d0ecd1fb4 fix history hash 2018-10-17 19:43:26 -04:00
Victor Shyba c7b647b1eb fix test_reconnect 2018-10-17 14:12:08 -04:00
Victor Shyba 63563c412c cancel pending requests and close connection on server switch 2018-10-17 14:12:08 -04:00
Victor Shyba 9fed3fce3e unlock networking limits 2018-10-17 14:01:54 -04:00
Lex Berezhny a8f8ff30a2 account list --show_seed fix 2018-10-17 10:57:24 -04:00
Lex Berezhny d270e84810 v0.1.1. 2018-10-17 10:39:21 -04:00
Lex Berezhny 0b8c67f2f0 move db.commit() 2018-10-16 21:56:50 -04:00
Lex Berezhny 2b73d3d109 pylint fixes 2018-10-16 21:53:23 -04:00
Lex Berezhny a7838b80c3 removed extraneous db.commit() 2018-10-16 21:49:49 -04:00
Lex Berezhny f2f2a12ea1 added commit() after insert/update operations 2018-10-16 21:45:59 -04:00
Lex Berezhny 382ebb55b9 log formatting fix 2018-10-16 11:56:53 -04:00
Lex Berezhny c6b32fa946 basedatabase.py test coverage 2018-10-15 17:15:05 -04:00
Lex Berezhny ae0e1bfaef support python 3.6 2018-10-15 17:15:05 -04:00
Lex Berezhny 2cd1947ef5 fixing tests 2018-10-15 17:15:05 -04:00
Lex Berezhny e10f1df321 pylint and mypy fixes 2018-10-15 17:15:05 -04:00
Lex Berezhny 2c5fd4aade twisted -> asyncio 2018-10-15 17:15:05 -04:00
Victor Shyba 0ce4b9a7de tentatively refactor prefetch 2018-10-11 17:48:55 -04:00
Victor Shyba 44b1178cfe fix prefetch proofs for unconfirmed and separate prefetch logic 2018-10-11 17:48:55 -04:00
Victor Shyba 7bdcaa6737 sync: fetch proofs and txs in batches 2018-10-11 17:48:55 -04:00
Victor Shyba cab8981716 avoid reconstructing the history during loop 2018-10-11 17:48:55 -04:00
Victor Shyba b999abb9ea improve request cancelling and timeouts during switches 2018-10-11 17:45:54 -04:00
Victor Shyba 55f5c7491c fixes from review for readability 2018-10-11 17:41:26 -04:00
Victor Shyba b19fd8ed85 lower batch size so it works on restricted platforms
Windows and maybe some other platforms have a lower limit on sqlite variables.
2018-10-11 17:41:26 -04:00
Victor Shyba 6bdd9c9d78 optimize insert key loop 2018-10-11 17:41:26 -04:00
Victor Shyba 87c210952b enable WAL 2018-10-11 17:41:26 -04:00
Victor Shyba 4b9c3e8409 generate keys in batches of 2000s 2018-10-11 17:41:26 -04:00
Lex Berezhny c6f2d8b6fc fix pylint 2018-10-10 21:39:36 -04:00
Lex Berezhny b23481bd21 add height to TXRef 2018-10-10 21:29:29 -04:00
Lex Berezhny 64a626cbb5 v0.1.0 2018-10-09 23:59:57 -04:00
Lex Berezhny d4f964ef8e short circuit adding annotations when get_transaction does not return anything 2018-10-09 23:57:41 -04:00
Lex Berezhny 7f09405335 txi (txoid) index added 2018-10-09 23:39:00 -04:00
Lex Berezhny e37da81dc6 added database indexes 2018-10-09 22:52:43 -04:00
Lex Berezhny febadc5dd6 fix get_addresses where it was returned all addresses instead of for specific account 2018-10-09 20:36:58 -04:00
Lex Berezhny 4aea68ecd1 + account.get_*_count() methods 2018-10-09 19:29:20 -04:00
Lex Berezhny 3ed03c267a v0.0.9 2018-10-09 14:44:49 -04:00
Lex Berezhny c60e17b341 fix LIMIT OFFSET syntax error 2018-10-09 14:44:26 -04:00
Lex Berezhny 689c578081 get_or_create_usable_address returns a random choice when returning an existing unused address 2018-10-09 13:13:46 -04:00
Lex Berezhny 2723a55766 start() should not return until ledger has finished starting, which means self.join_network() needs to be yielded on the first connection 2018-10-08 23:27:32 -04:00
Lex Berezhny 75dd93436c more get_address fixes 2018-10-08 22:49:50 -04:00
Lex Berezhny eebfe2be08 get_address fix 2018-10-08 22:44:30 -04:00
Lex Berezhny 3a264c1eec drop ledger.get_transaction() in favor of just using ledger.db.get_transaction() directly 2018-10-08 18:50:45 -04:00
Victor Shyba 9c4dfa7f84 attach subscriptions to on_connected and stop service before discarding the object 2018-10-08 17:11:50 -04:00
Lex Berezhny d9c21ce37b v0.0.8 2018-10-08 14:53:57 -04:00
Lex Berezhny 1d84440b74 select_txos needs a join on tx table 2018-10-08 10:53:53 -04:00
Lex Berezhny 9aa22e1071 sql: pop offset/limit/order_by when doing simple count(*) query 2018-10-08 10:37:52 -04:00
Lex Berezhny 9cea8d2725 db.get_utxos_count -> db.get_utxo_count 2018-10-07 20:14:27 -04:00
Lex Berezhny 944238d542 removed unused method and minor pylint fix 2018-10-07 14:59:27 -04:00
Lex Berezhny 95cbdcb131 refactored sql queries, added full pagination support: limit, offset and count 2018-10-07 14:53:44 -04:00
Lex Berezhny 38b1fb5fba fix get_transaction unit test 2018-10-04 19:42:29 -04:00
Lex Berezhny fe59ed0105 remove unused import 2018-10-04 19:33:14 -04:00
Lex Berezhny 356ab9666f refactored get_transactions and get_txos 2018-10-04 19:27:39 -04:00
Lex Berezhny 0960762694 sql constraints support table.column dot delimited column names 2018-10-03 11:51:42 -04:00
Lex Berezhny a6f97dfbde refactored queries 2018-10-03 09:41:52 -04:00
Lex Berezhny a55feee960 0.0.5 2018-10-01 22:03:48 -04:00
Lex Berezhny 29c0e3f15f fix for get_transaction 2018-09-25 23:28:06 -04:00
Victor Shyba b0bc06ae00 improve reorgs 2018-09-25 23:07:32 -04:00
Lex Berezhny cdbb34e976 pylint fix 2018-09-25 22:54:18 -04:00
Lex Berezhny 5c5b0ace53 mypy related fix 2018-09-25 22:46:22 -04:00
Lex Berezhny a879c822c2 check if txi.txo_ref.txo is not None before using it 2018-09-25 22:39:20 -04:00
Lex Berezhny 0d22b8c23c typing and pylint fixes 2018-09-25 18:14:28 -04:00
Lex Berezhny c29b4c476d + tx.position, + tx.net_account_balance, + txo.is_my_account 2018-09-25 18:02:50 -04:00
Lex Berezhny 5977f42a7e remove unused import 2018-09-24 23:20:14 -04:00
Lex Berezhny 58d2c04b9f simplified and cleaned up typing for encryp / decrypt 2018-09-24 23:20:14 -04:00
Jack Robison c0e0b4b745 review feedback and pylint 2018-09-24 23:20:14 -04:00
Jack Robison aa47f10602 add encrypted_on_disk to BaseAccount
-encrypt the seed and private key upon to_dict() if encrypted_on_disk is true
2018-09-24 23:20:14 -04:00
Jack Robison 9268b6ca13 fix double-double sha 2018-09-24 23:20:14 -04:00
Jack Robison 4832526477 fix aes_encrypt not prepending the iv
-allow random iv to be overridden
2018-09-24 23:20:14 -04:00
Lex Berezhny 53e0fe9a69 pylint fix 2018-09-21 22:26:07 -04:00
Lex Berezhny 8ed0791b26 improved db.get_transactions() 2018-09-21 22:18:30 -04:00
Victor Shyba 8a87195f55 ecdsa -> coincurve 2018-09-21 20:05:59 -04:00
Lex Berezhny 0b75bb4052 + added get_transactions 2018-09-21 09:47:31 -04:00
Lex Berezhny 543f533a68 update bitcoin to 0.16.3 as 0.16.0 is no longer downloadable 2018-09-20 13:52:00 -04:00
Lex Berezhny 89f4ec12e9 pylint cleanup 2018-09-20 13:52:00 -04:00
Thomas Zarebczan d76758bd1d am I doing this right?
Copied from f1e3682302, looks like it could work, but didn't test locally.
2018-09-20 13:52:00 -04:00
Lex Berezhny 18629c93a2 defer.returnValue -> plain return per twisted support for Py3 plain return 2018-09-20 13:00:38 -04:00
Lex Berezhny b3f3fdeb1d explicit import of english words 2018-09-18 23:06:56 -04:00
Lex Berezhny eedc9bf9ed store mnemonic words in python files instead of txt, this avoids packaging issues 2018-09-17 22:59:24 -04:00
Victor Shyba 94b920ab2a fix reconnect 2018-09-17 14:34:23 -04:00
Victor Shyba 873437e6a9 check for None on height to allow for genesis 2018-08-31 10:46:03 -04:00
Lex Berezhny b102afd68a - extraneous constants import 2018-08-30 12:46:51 -04:00
Lex Berezhny 9e55694512 + get_detailed_accounts 2018-08-30 11:50:11 -04:00
Lex Berezhny 026bcd4d4d pylint fix 2018-08-23 02:56:25 -04:00
Lex Berezhny a27f89157e fixed bug where txis were duplicated in the database 2018-08-23 02:53:14 -04:00
Lex Berezhny 9a2e9d68e7 + PUSH_INTEGER 2018-08-20 22:04:22 -04:00
Lex Berezhny c961dd609a pylint fixes 2018-08-16 21:46:02 -04:00
Lex Berezhny dabedc17d0 improvements to reorg support 2018-08-16 21:41:22 -04:00
Lex Berezhny df251def26 pylint and mypy fixes 2018-08-16 00:56:46 -04:00
Lex Berezhny 133a86cd89 blockchain reorg handling and overall header refactor 2018-08-16 00:43:38 -04:00
Lex Berezhny 1a5654d50b Seed version 2018-08-15 17:26:09 -04:00
Lex Berezhny 5b28e77ab5 name conflict 2018-08-07 21:47:30 -04:00
Lex Berezhny f8c1790558 pylint and added type info 2018-08-07 21:36:44 -04:00
Lex Berezhny e2537e43b5 gave accounts reference to wallet so that they can save themselves after being modified 2018-08-07 21:31:29 -04:00
Lex Berezhny d4107600a5 from_dict() now also handles from_seed() 2018-08-06 02:52:52 -04:00
Lex Berezhny e996717b60 oops, basemanager shouldnt create default accounts, moved that into lbrynet manager 2018-08-06 00:26:46 -04:00
Lex Berezhny 75ddf209e2 create default account when missing and new new account.fund() to support transfer of funds between accounts 2018-08-06 00:15:19 -04:00
Lex Berezhny f5515e5e77 general purpose constraints builder 2018-08-03 21:26:53 -04:00
Lex Berezhny 1eb375ba80 add tx.fee property back 2018-08-03 12:29:02 -04:00
Lex Berezhny d3a171e638 + closest_match step between branch_and_bound and random_draw coin selections, + Transaction.create() single method instead of .pay()/.liquidate() also its more powerful 2018-08-03 10:41:40 -04:00
Lex Berezhny e154c83ffe pylint and mypy fixes 2018-07-29 14:34:56 -04:00
Lex Berezhny 69ad8e384a customizable address generator support 2018-07-29 13:13:40 -04:00
Lex Berezhny b0bd0b1fc0 + reserving outpoints should no longer have race conditions
+ converted all comment type annotations to python 3 style syntax annotations
+ pylint & mypy
2018-07-28 20:52:54 -04:00
Lex Berezhny 746aef474a hash.py dropping py2 backwards compat 2018-07-26 14:35:44 -04:00
Lex Berezhny 5a2a3727b2 + Account.get_max_gap() 2018-07-25 23:29:41 -04:00
Lex Berezhny 40651322d0 add account id to account balance listing 2018-07-25 12:05:25 -04:00
Lex Berezhny 25046124c0 fix balance with confirmations and header event reporting 2018-07-22 22:52:21 -04:00
Lex Berezhny a4519d3add 0.0.4 2018-07-21 14:43:47 -04:00
Lex Berezhny 67dc297c97 use floats() instead of Decimal() when we need to serialized to JSON (while providing satoshis for accuracy) 2018-07-21 14:39:53 -04:00
Lex Berezhny 7c39e55089 callLater breaks determinism 2018-07-17 00:09:02 -04:00
Lex Berezhny 3f17dd336b 0.0.3 2018-07-17 00:01:22 -04:00
Lex Berezhny 10fd654edc improved account balance support 2018-07-16 23:58:29 -04:00
Victor Shyba 686eb7b1f0 fix a failure for channels where we catch the wrong error 2018-07-15 17:41:52 -03:00
Lex Berezhny 97532fb300 don't delete lock if it's not in locks dict and other fun things 2018-07-15 16:04:11 -04:00
Lex Berezhny e36e4c6354 pubkey should stay as blob 2018-07-15 00:40:46 -04:00
Lex Berezhny fcc7177a9a unit tests for bcd_data_stream 2018-07-14 22:38:18 -04:00
Lex Berezhny 0f786a8c43 removed unused methods 2018-07-14 22:16:39 -04:00
Lex Berezhny 184d3a5910 switched from blob to text for most columns, added a new TXRef/TXORef referencing scheme 2018-07-14 21:34:07 -04:00
Lex Berezhny 9370b1d2fa switching most columns from blob to text 2018-07-14 17:47:51 -04:00
Lex Berezhny f46550262f added SingleKey account support 2018-07-14 17:47:18 -04:00
Lex Berezhny adec715010 + ledger.get_transaction() 2018-07-12 12:14:04 -04:00
Lex Berezhny 32ba594e55 ledger API cleanup 2018-07-11 22:37:15 -04:00
Lex Berezhny 5eb276655d + Transaction.liquidate, balance/get_utxos support constraints 2018-07-09 20:22:04 -04:00
Lex Berezhny 2006ad68ee get_balance supports custom constraints 2018-07-09 09:55:59 -04:00
Lex Berezhny e2296d4491 improving code coverage 2018-07-04 21:17:45 -04:00
Lex Berezhny c3cb297205 unit test fixes and reducing support for py2 2018-07-04 20:43:25 -04:00
Lex Berezhny 6bb81e4d6f wip4victor 2018-07-01 17:20:17 -04:00
Lex Berezhny c58a1c9ead BaseLedger.stop() should also close the db 2018-06-26 20:41:03 -04:00
Lex Berezhny 1dfc18683d fixing unit tests 2018-06-26 18:31:42 -04:00
Lex Berezhny 9a467f8840 * on_transaction now produces TransactionEvents with useful info and lots of other changes 2018-06-26 17:22:05 -04:00
Lex Berezhny aba3ed7ca0 SPV support 2018-06-25 09:54:35 -04:00
Lex Berezhny 833ef98ff5 refactoring and added basic test for reading/writing wallet file 2018-06-17 23:22:15 -04:00
Lex Berezhny 43cd9c4100 removed unused msqr module 2018-06-14 16:27:17 -04:00
Lex Berezhny 4dee59a49d better customization during testing 2018-06-14 15:17:59 -04:00
Lex Berezhny e9fbc875e0 passing tests 2018-06-13 23:00:53 -05:00
Lex Berezhny fbd1b2ec30 monday progress 2018-06-13 23:00:53 -05:00
Lex Berezhny eb6781481a progress since thursday 2018-06-13 23:00:53 -05:00
Lex Berezhny 78e4135159 wip 2018-06-13 23:00:53 -05:00
Lex Berezhny 54350bcbc4 BaseOutputAmountEstimator 2018-06-03 20:13:30 -04:00
Lex Berezhny 09a32174c8 handle tuples in network RPC request data 2018-06-03 20:07:40 -04:00
Lex Berezhny 740af0465e send_amount_to_address 2018-06-03 20:06:55 -04:00
Lex Berezhny 246cc234c4 test fixes to get it running on travis 2018-05-25 13:19:54 -04:00
Lex Berezhny 4e4c4b5f96 fixing travis 2018-05-25 11:11:28 -04:00
Lex Berezhny ca6d5937ba stream.where and stream.async_where 2018-05-25 09:54:01 -04:00
Lex Berezhny ece2db08da initial import 2018-05-25 02:03:25 -04:00