Commit Graph

181 Commits

Author SHA1 Message Date
Mariano Sorgente 4a14bde38d More genesis tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente 6d8e0e0473 More progress on validation 2021-01-12 17:00:51 -05:00
Mariano Sorgente ec76b746de Start making changes to update tests 2021-01-12 17:00:51 -05:00
Gene Hoffman b7e9f53e39 Fix MD lint, more missing imports, more black 2021-01-12 17:00:50 -05:00
Mariano Sorgente c83f2907d9 change some test constants 2021-01-12 17:00:50 -05:00
Richard Kiss 46cce43474 Use `service_kwargs_for_wallet`. 2020-10-13 14:40:12 -07:00
Richard Kiss 421b8e1987 Some minor bug fixes. Make `bt.config` return a deep copy. 2020-10-13 13:48:14 -07:00
Richard Kiss f333def7dd Use `service_kwargs_for_full_node(_simulator)?`. 2020-10-12 17:46:40 -07:00
Richard Kiss 589d7a0621 Use `service_kwargs_for_farmer`. 2020-10-12 16:05:20 -07:00
Richard Kiss 9c6f00c3d7 Use `service_kwargs_for_[timelord|introducer]`. 2020-10-12 15:28:17 -07:00
Richard Kiss f5ff886df4 Test `service_kwargs_for_harvester`. 2020-10-12 11:54:32 -07:00
Richard Kiss 7bbf64fa18 Greatly simplify `Service`. 2020-10-09 15:56:52 -07:00
fchirica 62dbbf7f81 Try to fix simulation test. 2020-10-01 11:07:12 -07:00
Florin Chirica 5b17e1cf23 Peer gossip. (#414)
* Initial commit.

* mypy

* Fix start service logic.

* Fix AddressManager tests.

* Experimentally increase timeout.

* Attempt to fix test.

* Flake8 typo

* Print traceback for CI build.

* Revert exception catching to gain more logs.

* Add serialization.

* Try to hack simulation test.

* Add debug info. Connect peers more often.

* Try to fix full node gossip.

* Remove introducer protocol from full node.

* Update request_peers test.

* Flake8 the test.

* Add sqlite.

* Address some review comments.

* Try to remove Peers() everywhere but introducer.

* flake8

* More linting.

* Limit other types of inbound connections.

* Initial commit new code.

* AddressManager tests working.

* flake8, mypy, some tests.

* More flake8.

* Tweak gossip protocol.

* Catch more connection failures.

* First attempt wallet gossip.

* Add wallet gossip test.

* Add back global signal handler.

* Resolve some SuperLinter issues.

* Fix some bugs.

* More linting.

* Lint.

* Attempt to improve network connectivity.

* Small fixes.

* Lint.

* Lint.

* Checkpoint address relay.

* Some fixes.

* Fix db path.

* Lint.

* Small fixes.

* Fix bugs.

* flake8, improve speed test simulation.

* py.black

* LGTM, other small fixes.

* Don't self connect.

* py.black

* Punish self connections even more.

* One more attempt to fix self connection.

* Don't connect to the introducer if I have all peers.

* Catch bugs.

* Fix typo.

* Type checking.

* Lint, catch timestamp bug.
2020-10-01 11:07:12 -07:00
Gene Hoffman 4107cbebe0 black tests/ 2020-10-01 11:07:12 -07:00
Mariano Sorgente 966b5bb989 Reformat using python black 2020-10-01 11:07:12 -07:00
Mariano Sorgente 5303db737b Test passing 2020-10-01 11:07:12 -07:00
Mariano Sorgente b791bf1da8 Cleaner send_transaction flow and more wallet rpc testing 2020-10-01 11:07:12 -07:00
Yostra d37a8978ce don't run in tests 2020-09-14 15:38:55 -07:00
Gene Hoffman 57c5e19353 Move to Super Linter 3.9.2 - now lint Black, flake8, mypy (#390)
* Try Super Linter at 3.9.0 and add linters

* 3.9.1 and set validate all to false

* Back to 3.9.1 and use only true VALIDATE_

* Place superlint in debug mode

* Try fix from 3.9.2

* black source. Start fixing flake8 issues

* Black tests, out of debug

* Black setup.py do to merge conflict
2020-09-14 15:38:55 -07:00
Mariano Sorgente 700eaad9e0 Ms.1.8bugs3 (#326)
* harvester fixes
* Improve networking stability
* Fix wallet shutdown
* Allow chia keys sign and chia keys verify
* Dislpay the public key also
* Retry loading invalid plots, handle drive disconnection
* Confirm before deleting plots
* Improve error message WIP
* XImproved error message for importing keys
* Uncomment process.kill
* Fix merge error with restore backup
* Fixed markdown
* Switch button order, and fix request_peers
* Consolidate styles
* Set ci's to timeout after 60 minutes has elapsed
* plot directories and memory buffer
* Fix flake8
* Update chiapos, chiavdf, chiabip158, and blspy

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
2020-07-27 16:01:18 -07:00
Richard Kiss 470b0c8c76 Use attributes instead of dictionary keys. 2020-07-27 16:01:18 -07:00
Yostra 4042871ae6 user setitngs 2020-07-27 16:01:18 -07:00
Richard Kiss 52091044e4 Use `constants` instead of `dic` overrides for tests set-up. 2020-07-27 16:01:18 -07:00
Richard Kiss afb5d32fb2 Use `ConsensusConstants` in Harvester. 2020-07-27 16:01:18 -07:00
Mariano Sorgente 550642c789 Minor repairs and fix BIP39 and add tests (#310)
* Logging of plot num, num proofs found, and fix rpc edge case
* Revert add -> append, and python black
* Fix list/set issue
* Correct BIP39 spec and test vectors
* Fix create mnemonic UI
2020-07-16 13:05:43 -07:00
Mariano Sorgente 194e0c24ea New blspy, key formats, and new plot format (#309)
* Bump blspy-ietf
* wip lots of errors
* Respond to bram feedback, use eip 2334 for keys
* Fix most tests, use latest blspy
* Improve simulation test constants
* Fixed issue with plotting and reading plots
* Fix simulation test
* Override puzzle hash if we don't have key, for safety. Bump protocol version
* Fix superlint issue
* Switch to 1.0 proof of space format
* Temporary genesis block
* Update chiabip158, chiavdf versions

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Alex Wice <alex@chia.net>
2020-07-16 13:05:43 -07:00
Yostra 49deb0d93b post merge cleanup 2020-07-16 13:05:43 -07:00
Yostra 24297ff26e formatting and constants for simulation 2020-07-16 13:05:43 -07:00
Mariano Sorgente 04edeb5255 Speed up tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 2ee946c371 chia plots cli program 2020-07-16 13:05:43 -07:00
Mariano Sorgente 4367ed36e7 Fix local simulation 2020-07-16 13:05:43 -07:00
Mariano Sorgente 2fc6f89603 Keychain with pbkdf2 and passphrase support 2020-07-16 13:05:43 -07:00
Mariano Sorgente a1b4392bb1 Tests passing 2020-07-16 13:05:43 -07:00
Mariano Sorgente 0dea6db7cd Remove raw keychain keys, update block tools with new protocol 2020-07-16 13:05:43 -07:00
Mariano Sorgente fdee2f2d5c Replace plots.yaml with in-file keys 2020-07-16 13:05:43 -07:00
Richard Kiss 7dd0df2a50 Use `bt.root_path` instead of global. 2020-07-16 13:05:43 -07:00
Richard Kiss 617d6896e2 Pass `starting_height` explicitly, not in `dic`. 2020-07-16 13:05:43 -07:00
Richard Kiss 9220b90373 Explicitly pass `discriminant_size_bits` to `TimeLord`. 2020-07-16 13:05:43 -07:00
Richard Kiss 0175cf64eb Use `constants_for_dic`. 2020-07-16 13:05:43 -07:00
Richard Kiss f8d06946cd Use `make_test_constants_with_genesis`. 2020-07-16 13:05:43 -07:00
Richard Kiss e4f3050667 Use `ConsensusConstants` in many more places. 2020-07-16 13:05:43 -07:00
Richard Kiss 13525e824f Pass in `consensus_constants` to `TimeLord`. 2020-07-16 13:05:43 -07:00
Richard Kiss be8f973fa2 Pass constants into `Farmer`. 2020-07-16 13:05:43 -07:00
Richard Kiss aa66d1d13d Remove `from src.consensus.constants import constants`. 2020-07-16 13:05:43 -07:00
Mariano Sorgente 8c67ead4f4 Fix connection issues 2020-07-16 13:05:43 -07:00
Mariano Sorgente 7d87638b8b Remove localhost references, and fix connection bug 2020-07-16 13:05:43 -07:00
Mariano Sorgente 2c8efb7db2 Some more small improvements 2020-07-16 13:05:43 -07:00
Mariano Sorgente fa39350758 Fix some more tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente 116ee138b8 Remove sleeps from tests 2020-07-16 13:05:43 -07:00
Mariano Sorgente c0441391b8 Start working on test speeds 2020-07-16 13:05:43 -07:00
Mariano Sorgente 35822c8796 Ms.networking2 (#284)
* Improve test speed with smaller discriminants, less blocks, less keys, smaller plots
* Add new RPC files
* Refactor RPC servers and clients
* Removed websocket server
* Fixing websocket issues
* Fix more bugs
* Migration
* Try to fix introducer memory leak
* More logging
* Start client instead of open connection
* No drain
* remove testing deps
* Support timeout
* Fix python black
* Richard fixes
* Don't always auth, change testing code, fix synced display
* Don't keep connections alive introducer
* Fix more LGTM alerts
* Fix wrong import clvm_tools
* Fix spelling mistakes
* Setup nodes fully using Service code
* Log rotation and fix test
2020-07-16 13:05:43 -07:00
fchirica c6015c98aa Try to resolve the error in Ubuntu python 3.8 2020-07-16 13:05:43 -07:00
fchirica 03e0788e82 Yield sanitizer as well. 2020-07-16 13:05:43 -07:00
fchirica a9445fb8d1 Fix introducer task. 2020-07-16 13:05:43 -07:00
fchirica 284c5a50a0 Initial commit sanitizer 2020-07-16 13:05:43 -07:00
Mariano Sorgente c9bf65377f Apply black formatting 2020-06-08 17:17:48 -07:00
Richard Kiss 1c262ac77f Make `Timelord._shutdown` sync. 2020-06-08 17:17:48 -07:00
Richard Kiss 0335623368 Use `Harvester.__init__` instead of `create`. 2020-06-08 17:17:48 -07:00
Richard Kiss 4f67cc2641 Have `timelord._manage_discriminant_queue` push messages into queue itself. 2020-06-08 17:17:48 -07:00
Richard Kiss 62564b998d Refactor `start_harvester` into `start_service`. 2020-06-08 17:17:48 -07:00
Richard Kiss d1f0483023 Make `start_server` return an `asyncio.AbstractServer`. Wait
on that for servers.
2020-06-08 17:17:48 -07:00
Richard Kiss c65a78fb7f Factor out `start_server`. 2020-06-08 17:17:48 -07:00
Richard Kiss fff78556ab Move config out of `Introducer`. 2020-06-08 17:17:48 -07:00
Richard Kiss 1b1ee7bc4b Factor out `_start_bg_tasks` from timelord. 2020-06-08 17:17:48 -07:00
Mariano Sorgente 0da0a630ae Create plots filenames, chia keys API, and harvester reload plots fix (#243)
* Create plots filenames, chia keys API, and harvester reload plots fix
* Colon to hyphen
* Only refresh config file when reload_plots is called
* Use test root, and pass in root to wallet_node
2020-06-01 08:56:59 -07:00
Yostra b964d86a5f Electron react (#226)
* clean react
* add material ui
* add word list
* mnemonic v0
* jeepney backup
* keychain usage
* wallet api
* mnemonic ui
* mnemonics redux state
* handle exceptions correctly
* dashboard
* wallets
* get puzzle hash
* tx history
* sidebar
* start stop wallet node
* use existing mnemonics
* status info
* create cc wallet
* theme should be outside of switch
* create offer
* dbus alternative for linux
* key migration
* don't autocomplete, don't reset simulator db
* reset mnemonics
* Refactor keychain, and key migration
* Implement UI for changing keys
* Removing keys and mnemonic button
* Start making farmer and harvester RPCs
* start rpx for simulator
* Harvester and farmer websocket, and basic UI
* Plot display and deletion
* launch daemon on start
* State changes from full node, harvester, farmer, and full node ui improvements
* split balances in react
* pending change balance
* plotter
* dev config
* maintain connection / retry
* Remove electron-ui, and style fixes
* Better farmer and full node control
* Remove electron ui references
* Uncomment out starting the dameon
* Remove timelord tab, and change full node style
* Clean up new wallet login
* Refactor RPCs
* Now that the GH runner uses python 3.7.7 - use for windows installer
* add balance split to coloured coin wallet
* spendable balance fix
* Import private key from UI fix
* mac build/installer

Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
Co-authored-by: Lipa Long <lipa@chia.net>
Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
2020-06-01 08:56:59 -07:00
Mariano Sorgente 1d21a6d777 Ms.sync full sync improvements (#218)
* Refactor blockchain.py into a few different files (difficulty_adjustment.py, block_header_validation.py)
* Faster sync pipelining of requests, and parallel verification (13 minutes to 9 minutes on 2 cores)
* Memory usage of node during sync is significantly reduced, only the latest blocks are in memory
* Networking fixes and logging levels changed
* SPECIFIC delivery which allows you to send messages to a specific node id
* Check plots acts like the normal harvester
2020-06-01 08:56:59 -07:00
Mariano Sorgente 1c8815ab1a
Ms.double handshake (#203)
* Fix create plot issue, do not recreate plots that exist on another drive
* Fix double harvester handshake with farmer
* Full node sends ping to wallet
* Async constructor for harvester, and instance threadpool
2020-04-30 14:02:35 +09:00
Yostra a41ca36054 fix db path 2020-04-28 13:39:11 -07:00
Mariano Sorgente ca8f8e1549
Fix test teardown 2020-04-28 19:17:32 +09:00
Mariano Sorgente f4d8c22f94
Store unfinished blocks on disk, tips/lca, db changes, cleanup 2020-04-28 17:09:18 +09:00
Mariano Sorgente ffd439e79b
Start refactor 2020-04-27 22:10:32 +09:00
Matthew Howard 12c3df3ffb -python black format
-investigating multicolour spends and parent discovery
2020-04-22 16:03:40 -07:00
Yostra 988d9935bb unlink correct path 2020-04-22 16:02:58 -07:00
Yostra 8e6662d8dc don't use random bytes for db name, unlink path for testing 2020-04-22 16:02:50 -07:00
Mariano Sorgente f6762b80fd
New hash to prime (breaking change) (#184)
* Uses new chia-vfd (chiavdf=0.12.7)
* Migration script replaces old puzzle hashes with new ones (as long as CHIA_ROOT is not set)
* New genesis block
* Fix bug in genesis block generation
* Increment protocol version to 0.14
2020-04-22 16:24:59 +09:00
Richard Kiss 2eb4fd7b8e Squashed commit of merge conflicts. 2020-04-21 23:31:20 -07:00
Mariano Sorgente 83635f7c01 Small networking fixes 2020-04-21 22:55:21 -07:00
Yostra 299753fd22 just use new ssl 2020-04-21 22:55:21 -07:00
Mariano Sorgente b2d3d9353b
Fix chia init plots issue 2020-04-08 18:33:42 +09:00
Mariano Sorgente 281b65a39c
Lint and fix wallet server startup 2020-04-08 17:02:04 +09:00
Richard Kiss 6ded806fa2
Add `chia init` and refactor out many global references to the config directory (#153)
* Tweak subcommand template.
* Don't hack the .chia/beta-* directory when invoking `chia`.
* Get `chia init` working. Factor out all global paths.
* Reverse order of migration bases.
* Update README.
2020-04-08 16:47:17 +09:00
Mariano Sorgente 02aa39a667
Fix race condition in select coins, and order coins by age 2020-04-08 15:29:34 +09:00
Yostra d4fe5e5cb3 Merge branch 'beta-1.1' into beta-1.2 2020-04-07 11:40:49 -07:00
Mariano Sorgente b5ebf6c494
Refactor puzzle store, tests, generate future puzzle hashes 2020-04-07 18:17:44 +09:00
Mariano Sorgente 2e47378ab7
Remove useless host configs. Run rpc servers not on localhost. 2020-04-05 18:08:40 +09:00
Yostra 8ebf55bff7 simplify setup 2020-04-04 14:12:03 -07:00
Mariano Sorgente 920043c1d4
Tweak block validation, rename some files, and concentrate error codes 2020-03-31 02:27:22 +09:00
Yostra 6e01eca711 db lock issue, use one connection 2020-03-29 18:32:51 -07:00
Mariano Sorgente 81f41f7764
Fix puzzle store bug, no recursive JSON, big ints as strings in JSON 2020-03-25 17:15:31 +09:00
Mariano Sorgente d7d3be2ab7
DB path for wallet, and search block field 2020-03-25 00:50:02 +09:00
Mariano Sorgente b3040a3623
Add full node display to electron 2020-03-24 21:18:07 +09:00
Yostra d881eafe41 format 2020-03-20 22:33:41 -07:00
Yostra 7e4bc9fae0 fix vdf 2020-03-20 22:29:39 -07:00
Yostra c7a4764c62 multipl wallets ui 2020-03-19 22:12:49 -07:00
Mariano Sorgente 324cae8dba
Progress on fast sync 2020-03-19 14:15:06 +09:00
Mariano Sorgente 90e8287926
Merge branch 'integration' of github.com:Chia-Network/chia-blockchain into light-verification 2020-03-18 17:18:20 +09:00
Mariano Sorgente b1778095d6
New difficulty change and min_iters change, and light header verification 2020-03-18 17:17:59 +09:00
Yostra 10f5300805 propagate mempool on connect, test 2020-03-17 12:38:36 -07:00