Commit graph

35 commits

Author SHA1 Message Date
Kim Neunert
d05140d55a
Chore: update dependencies and remove demon-mode (#1417)
* update dependencies and remove demon-mode

* make timeout issues more clear

* more clever waiting for mining
2021-10-08 19:16:59 +02:00
Kim Neunert
cb8968b5fb
Chore: Ci improvements (#103) (#1403)
* Ci improvements (#103)

* pin bitcoin to new v0.21.1 tag

* fix binary installation

* for binary install, pytest.ini is the file to use

* kick

* adjusted Dockerfile to have at least wget to download artifacts

* investigate test_hwibridge timing out

* restest with v0.20.1

* implements timeout, hope that was reason to hang

* remove livelogging again

* fix hanging test

* Enable bitcoind-log-output on demand

* Timeouts now raising SpecterErrors

* catch a bit more generic Exception

* increase timeout

* fix abandontx test

* simplified code

* increase timeout

* increased timeout also for pytest

* separate timeouts for liquid/bitcoin

* forget checkin

* increase timeout for bitcoin as well

* bugfix: node specific timeouts

* increase timeout for elm hotwallet

* Now timeouts for all occurences of broadcasting

* global vars done right

* Yet another ReadTimeoutError to take account for

* fix assertion

* fix not-defined issue

* proper status_code checking instead of error_code

* increase wait-time

* increase btc:mine wait to 15 s

Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com>

* rollback to v0.20.1

* rollback - it is a src-install, stupid

* mixed up bitcoin and elements

* forgot to fix reference

* rollback test_abandon_purged_tx

* increase timeout to 30 s

* increase Liquid on cypress to 40s

Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com>
2021-09-19 22:33:13 +02:00
Stepan Snigirev
997eda905c
Add support for unconfidential addresses (#1292) 2021-07-11 20:56:18 +02:00
Kim Neunert
e10cea0456
Feature: Api framework (#1232)
* Included API end points

Included 3 API end points:

###/api/specter ["GET"]
Basic Specter info from app.specter class

###/api/full_txlist/ ["GET"]
Full Transaction list for all wallets

###"/api/wallet_info/<wallet_alias>/ ["GET"]
More detailed wallet info and transactions from the app.specter.wallet_manager class

* Update src/cryptoadvance/specter/controller.py

Include `wallet.check_unused()`

Co-authored-by: benk10 <ben.kaufman10@gmail.com>

* API Update

Made a few changes:
- Flattened the wallet list to be similar to full transaction list
- included versioning on url `/v1alpha/`
- Included `wallet.utxo` data
- Improved `safe_serialize` for better json output

Pending Updates:
- Create a separate file for API (as a blueprint)
- Explore using Flask-restful for improved authentication (downside is that it is another dependency - not sure if already a requirement for specter)

* adding a rest-api

* Implemented API end points inside of example.py

* Merging with remote

* Fixed API.md

* Removing example-resources

* migrating to focal due to cryptography needs newer pip

* fix the image

* black and tidy up

* Deleted more useless stuff

* first take for psbt (still broken)

* get tests to work

* fix devices_signed undefined

* fix part2

* fix part 3

* fix part 4

* Rest Get-Requests for psbt working

* fix part 5

* extending psbt_creator with json format

* tests finished. bitcoind_regtest changed to scope session

* speed up tests

* fix tests

* tiny test for LiquidRpc, probes improvements

* try fixing testing-infra

* kick

* finally fix infra, hopefully

* removing assertion

* refactoring and fixing API

* fix the rest-tests

* fix last liquid failing test

* polishing: error_handling via decorator

* split-up docs

* fix requirements.in

* polishing REST-API

* optimize startup for internal_nodes

* Update src/cryptoadvance/specter/internal_node.py

Co-authored-by: benk10 <ben.kaufman10@gmail.com>

Co-authored-by: Alpha Zeta <40473443+pxsocs@users.noreply.github.com>
Co-authored-by: benk10 <ben.kaufman10@gmail.com>
Co-authored-by: Alpha Zeta <alphazeta@protonmail.com>
Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com>
2021-07-08 13:10:14 -05:00
Kim Neunert
2b9e02f2fa
Elements testing (#1212) 2021-06-16 15:33:35 +02:00
benk10
19d940dd04
Merge in Liquid branch (#1174) 2021-05-20 18:26:10 +03:00
benk10
7ac1f2bd7b
Feature: Node manager (#1146)
* Move managers to managers folder

* Add node manager

* Fix internal node setup

* Remove old bitcoin core settings page

* Migrate old specter versions

* Fix unit tests

* Fix cypress tests

* Fix cypress tests

* Fixes

* Fixes

* Fixes

* Fix

* Fix

* Fix Cypress

* some documentation

* sorting imports and logger.error for testing tor

* get logs from tor in doubt

Co-authored-by: Kim Neunert <k9ert@gmx.de>
2021-05-11 16:44:25 +02:00
Kim Neunert
b816a3d480
Release-notes and fix the build (#1135)
* kick

* release-notes

* updating black

* Slightly changes rule for black

* version now v1.3.1

* pin pre-commit and black-version used for linting

* black
2021-04-26 14:09:42 +02:00
Kim Neunert
7f557ce187
refactor check_methods out of specter (#1106)
* refactor check_methods out of specter

* otp_manager refactored out op specter.py

* refactoring specter-stuff to config_manager
2021-04-23 20:50:50 +02:00
Kim Neunert
149b420e2e
Replace Travis with Cirrus
* initial cirrus config

* cirrus

* f*ck caching

* images and deleting travis

* check

* bugfix weird ci-issue (directory exists)

* kick

* revert

* kick

* fix

Co-authored-by: benk10 <ben.kaufman10@gmail.com>
2021-04-15 11:04:47 +02:00
benk10
c00e41f764
Feature: Setup Bitcoin Core from Specter (#1007)
* Package bitcoind with specter WIP

* fixes

* Setup wizard

* Fix non default datadir

* Update bitcoind.py

* Data folder config

* UI and text fixes

* Tor setup (macOS)

* Tor setup Windows and Linux support

* Wizard!

* action btns

* About page update

* Tor controller

* Update specter.py

* tor_controller getter

* Fix wizard bug

* Fix wallet json export backup

* remove docker dependency for main

* refactoring docker-requirement out of the way

* fix import

* Fix bitcoind docker issue

* Update tor_daemon.py

* latest pruned node

* Tor options and fixes

* Fix bitcoind for wondows

* Windows process stop fixes

* Moar windows fix attempts

* Fix exit windows

* Update src/cryptoadvance/specter/cli/cli_server.py

Co-authored-by: Kim Neunert <kneunert@gmail.com>

* Cleanups

* Cleanups

* Add Bitcoin Core Tor support

* Update specter bitcoind and tord

* Small UI update

Co-authored-by: Kim Neunert <kneunert@gmail.com>
Co-authored-by: Kim Neunert <k9ert@gmx.de>
2021-03-19 12:31:01 +01:00
kdmukai
80cfedbc6f
Feature: Add "Abandon transaction" option for low fee txs that have been purged from the mempool (#991)
* Initial commit

* configuring Black excludes

* fixing black excludes

* Interim commit

Mempool tx purge is working!

* Server side implementation and front end UI flow

* Remove debugging

* Updated docs, more comments

* Reverting datadir changes

No longer necessary to support final test case.

* final cleanup

* Improved guidance shown with the "Abandon transaction" button

* Optimize the is_tx_purged call

* spelling fix

* Test bugfixes

* remove assumption that we're running with `--docker` and already have 100 blocks mined.
* Pass `rpcport` into BitcoindPlainController so it can differentiate between the default port and the one-off instance used in the test.

* Test suite improvements

* Implement stop_bitcoind for BitcoindPlainController.
* The first `test_wallet_manager` tests were behaving differently between local bitcoind vs docker. Updated to instantiate their own bitcoind just for the two tests.

* Fixing merge

* Removing debugging
2021-03-06 11:40:09 +01:00
Manolis
c1ce0e982a
bugfix: Util testing and small bugfix about multisig treshold (#698)
* new file

* commited changes before master pull

* copied embit tests and adapted to specter

* max blackify

* ultra max blackify

* ultra ultra max blackify

* Integration of base58 functions from embit + tests to ensure correct refactoring.

* Integration of base58 functions from embit + tests to ensure correct refactoring.

* Consistent rescan labels (#843)

* added indirect dependencies because pip-compile did not detect them (#842)

Co-authored-by: benk10 <ben.kaufman10@gmail.com>

* descriptor

* removed suspicious bitcoin-submodule-link bla

* Added tests/bitcoin to gitignore

* just renaming by adding _util_

* fix of bugs in hwi lib clone + tests

* test of mainnet address from desc now correct

Co-authored-by: Justin Moon <mail@justinmoon.com>
Co-authored-by: Kim Neunert <k9ert@gmx.de>
Co-authored-by: benk10 <ben.kaufman10@gmail.com>
2021-01-30 11:36:59 +01:00
djpnewton
18b2ad3f3c
add rate limiting and registration link expiry (#852)
* -add rate limiting to login and register endpoints
-change otp codes to be harder to guess

* allow user to view/change login and registration rate limiting value

* - add registration link expiry
- make it harder for attackers to discover usernames
- disallow empty usernames
- disallow short passwords
- move "generate registration link" button to the bottom to try and make it clearer that it wont update settings

* create "auth" config subsection

* dont show rate limit and registration timeout inputs unless user is admin

* blackify

* fix mistakes in expiration logic

* fix missed changes to use method field of the auth structure

* fix registration_link_timeout input not present when user is admin

Co-authored-by: benk10 <ben.kaufman10@gmail.com>
2021-01-13 09:23:31 +02:00
Kim Neunert
d510d8693f
refactoring startup and cli (#717) 2020-12-06 15:40:22 +01:00
Kim Neunert
8f1ba50499
Dependencies (#687)
* Bump docker from 4.1.0 to 4.3.1

Bumps [docker](https://github.com/docker/docker-py) from 4.1.0 to 4.3.1.
- [Release notes](https://github.com/docker/docker-py/releases)
- [Commits](https://github.com/docker/docker-py/compare/4.1.0...4.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump pytest from 5.2.2 to 6.1.2

Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.2.2 to 6.1.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/5.2.2...6.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump requests from 2.23.0 to 2.25.0

Bumps [requests](https://github.com/psf/requests) from 2.23.0 to 2.25.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.23.0...v2.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Migrate to Bitcoind v0.20.1

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-26 20:25:21 +01:00
Stepan Snigirev
5702559317
blacklify everything (#464) 2020-09-30 11:42:30 +02:00
benk10
92ebff592c
Automatic Tor Hidden Service Support (#257)
* Add Tor url to sidebar

* Dynamic start/ stop Tor

* Start Tor hidden service by default (if possible)

* Updates

* fixes

* Update tor_address.jinja

* Update tor_address.jinja

* Allow starting Tor after running specter

* Delete .env_example
2020-07-24 23:06:34 +02:00
benk10
0f73225aa9 Fix the tests 2020-06-25 18:11:31 +03:00
benk10
b94d35b8ca
Merge branch 'master' into refactor-logic 2020-06-18 15:15:42 +03:00
Kim Neunert
903d804462
proper pinning of bitcoind-version in different branches 2020-06-14 14:16:35 +02:00
benk10
f86e492c4b Refactor logic.py 2020-06-07 17:39:31 +03:00
Kim Neunert
d9c74fde36
Auth (#75)
* automate pip-packages-gen + upload for gittags
release documentation
proper package including and  static + templates

* Change import- and start  logic, removed cli.py

* project-renaming to cryptoadvance.specter
propoer packaging
include proper dependencies

* Adding requirements.txt

* Specify maintainers and thanks to contributors

* Removing test-url for pip-uload. This is now live!

* refactoring sidebar

* Flask-Login, refactoring bootup

* Move logout-button and beautify

* remove arg_config and add -p to mkdir

* Make authentication optional in settings

* fix tests

* reestablished some changes

* style fix and hide login if no auth

* show error mesasge on login if bitcoind is not running

* better logging, skipping tests, renaming rpcpassword and other things

Co-authored-by: Stepan Snigirev <snigirev.stepan@gmail.com>
2020-02-27 01:28:50 +01:00
Kim Neunert
556ec5f961
Releasing procedure with pip (#69)
* automate pip-packages-gen + upload for gittags
release documentation
proper package including and  static + templates

* Change import- and start  logic, removed cli.py

* project-renaming to cryptoadvance.specter
propoer packaging
include proper dependencies

* Adding requirements.txt

* Specify maintainers and thanks to contributors

* Removing test-url for pip-uload. This is now live!
2020-02-20 13:00:53 +01:00
Kim Neunert
d9b9b2bc69
Some minor things to consolidate and some guidelines for Development.md (#63)
* Some minor things to consolidate and some guidelines for Development.md
* Add a SpecterError derived from Exception
* Adding vue.js, see #63
* bugfix introduced in #66 missing import pyserial and serial
2020-01-30 21:52:28 +01:00
Kim Neunert
69b085ad06 pyinstaller partially working for linux 2020-01-10 13:31:41 +01:00
Kim Neunert
2cc8c8fb1f Removing Authproxy, improving Testframework (#59)
* some test-refactoring and getting rid of python-bitcoinrpc

* Improvements of Errorhandling of Bitcoin-API, faucet and tests based on that

* testing createpsbt method using unconfirmed outputs
2020-01-09 15:18:49 +01:00
Kim Neunert
0493c9fd6e inject addresses for the tests 2019-12-28 10:27:54 +01:00
Kim Neunert
81f88137cf mine for the relevant specter wallet-addresses and some tests 2019-12-19 15:01:07 +01:00
Kim Neunert
a03d998476 get a reasonable cli and port improvements 2019-12-18 17:50:52 +01:00
Kim Neunert
7470f0c202 see #48 fix bitcoind_path issues 2019-12-12 16:28:45 +01:00
Kim Neunert
b61685d660 see #48 refactoring as first step 2019-12-12 15:35:21 +01:00
Kim Neunert
a9599c9e4c travis-CI integration 2019-12-09 16:36:57 +01:00
Kim Neunert
9e7c08816b gitlab integration 2019-12-05 17:42:15 +01:00
Kim Neunert
eac166cee2 fixes #36 and some more testing 2019-11-25 18:02:30 +01:00