Commit Graph

4978 Commits

Author SHA1 Message Date
Mariano Sorgente
a83d1650ca
Only log warning when more than 10 seconds. (#8556)
Pre-validation can take a while since it's validating many blocks at once, including clvm and VDFs.
2021-09-22 10:43:44 -07:00
Niraj Pathak
d6f495145e
create beta installers (#8539)
Upload installer binaries to S3 whenever main is updated
2021-09-21 13:31:44 -06:00
Arvid Norberg
c41ccf6109
improve log formatting (#8543)
* don't use scientific notation for coin_store timing log

* improve logging of timings in add_spendbundle

* improve timing logging of pre_validate_spendbundle. Pass in spend_name

* improve block validation timing logging

* enable coin_store timing logging unconditionally at DEBUG log level

* validation time formatting

* farmer response time formatting
2021-09-21 10:48:44 -07:00
Arvid Norberg
600a5f90a0
CoinStore benchmark and performance improvements (#8514)
* add coin_store benchmark

* optimize _set_spent in CoinStore

* simplify _add_coin_record, since we won't use it to replace an entry anymore

* use executemany in add_coin_record and set_spent

* disable sqlite sync
2021-09-21 10:43:43 -07:00
William Blanke
40f4e12707
updated gui to ec64bddae3 2021-09-20 11:51:26 -07:00
Adam Kelly
e9bf0ec12b
Reply type decorator (#8276)
* Check types of messages returned from other peers

* Check message type data structures at startup, check that no peeer messages that expect replies are broadcast, and dynamically check return types of messages that do expect replies.

* Type hint protocol message type check functions

* lint

* typo

* add replay_type decorator

* add api reply decorations

* typo

* Don't check non full-node broadcast messages

* Distinguish internal vs peer protocol error
Added Changelog
Moved static check to import time
Moved protocol timeouts to chia/protocols/protocol_timing.py
Comment typos
Rename create_request -> send_request
Comment that INVALID_PROTOCOL_MESSAGE is bannable, not temporary

* Call static check at module import time

* Rename message_response_ok

* Improve protocol checking for outgoing message validation

* Type-o

* reset submodule

Co-authored-by: almog <almogdepaz@gmail.com>
2021-09-20 11:31:15 -07:00
Yostra
5766a8d367
Fullnode related changes from wallet protocol and unharded derivation (#8522)
* fullnode related changes from wallet protocol and unharded derivation

* limit total subscriptions per peer

* reset counter on disconnect

* dict not a set

* check membership

* remove unused tests, lint
2021-09-18 10:27:34 -07:00
Arvid Norberg
31dab2ae5f
Rust only conditions (#8467)
* no need to check announcements in python, it's all done in rust

* remove python condition parsing, use rust unconditionally

* no need to assert_my_amount, it's done in rust

* assert my puzzlehash is done in rust, no need to check it in python

* parent id is checked in rust, no need to do it in python

* my coin ID is checked in rust, no need to do it in python

* reorder condition checks to have to ones we won't see at the end

* no need for the RUST_CONDITION_CHECKER constant anymore

* update pool tests to use get_name_puzzle_condition
2021-09-18 10:25:19 -07:00
Chris Marslender
4d3823bb70
Add a config option for peer_connect_timeout (#8516)
* Add a config option for peer_connect_timeout

* Add configure option for peer connect timeout

* Fix linter complaints
2021-09-17 18:35:06 -07:00
Arvid Norberg
f5dca63048
improve CoinStore test (#8495)
* improve CoinStore test by using pytest parameters (instead of for loops) and use a context manager for the DB connection

* use temporary filename for sqlite db
2021-09-17 14:09:02 -07:00
Chris Marslender
1abfd4d3f4
Update channel to direct users to in install.sh (#8517) 2021-09-17 13:59:09 -07:00
Chris Marslender
c7255a78a9
Move software_version to after the error checking in ws_connection (#8518) 2021-09-17 13:57:30 -07:00
Chris Marslender
9359adbbe2
Add version to ws_connection for crawler (#8512) 2021-09-17 10:59:32 -07:00
dustinface
43bb4f1888
changelog: Drop trailing whitespaces (#8474) 2021-09-17 10:55:31 -07:00
Jeff Cruikshank
fb086bcdc1
Switched from using asyncio.to_thread to threading.Thread as to_thread is only available in Python 3.9 (#8481) 2021-09-17 10:54:53 -07:00
dustinface
4f98891877
typo: passphase -> passphrase, Passphase -> Passphrase (#8473) 2021-09-17 10:52:50 -07:00
Earle Lowe
6d37d5477c
configurable max message size (#8500) 2021-09-17 10:51:37 -07:00
Arvid Norberg
b748bb1356
Disable sqlite sync (#8319)
* change sqlite pragma synchronous=FULL to pragma synchronous=NORMAL to improve disk I/O performance. In the case of catastrophic (hardware, power or kernel) failure, our database can be rebuilt

* removed redundant database pragmas in wallet
2021-09-17 10:47:34 -07:00
Arvid Norberg
b66db03528
log timing of applying additions and removals to the coin store (#8493) 2021-09-17 10:41:23 -07:00
Arvid Norberg
55baeb532a
remove CoinStore's dependency on FullBlock. Just pass in the parts of the block necessary to add the block. Even though this is a net increase in lines of code (for now), it improves encapsulation of the CoinStore class and enables simpler tests of it (#8496) 2021-09-17 10:40:44 -07:00
paulhainsworth-chia
4c69dfd83e
changelog 1.2.7 (#8503) 2021-09-16 15:34:01 -07:00
Arvid Norberg
e4b9db08cd
execute the sqlite pragmas only once, at the lever where the database is opened. Also, say FULL instead of 2, to make it clearer what the pragma is doing (#5993) 2021-09-15 10:57:13 -07:00
Oliver
8c9b7e2bfb
Special case height 0 to avoid querying all unspent coins (#8413) 2021-09-14 10:40:37 -07:00
Matt Hauff
e18a71376d
Make SpendBundle.debug() use the default genesis challenge by default (#8431) 2021-09-14 10:39:40 -07:00
Don Kackman
9d59079bfa
add ids to the return response of start_plotting (#7416)
* add ids to the return response of start_plotting

* black formatting

* Update chia/daemon/server.py

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>

* Update server.py

updated a comment in order to get build actions to rerun

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
2021-09-14 10:38:10 -07:00
William Blanke
a7e3c23277
updated gui to 0ef042ac3a 2021-09-13 14:29:23 -07:00
Tobias "Knight" S
f21d14d02d
Fix shown permissions (#8450) 2021-09-13 13:20:52 -07:00
dustinface
ada12b3f42
tests: Fix rmtree call in create_pool_plot (#8463) 2021-09-13 13:20:36 -07:00
Jeff Cruikshank
fd7bba6ae5
Ensure that config.yaml and keyring.yaml aren't partially written-to (#8379)
* Ensure that the initial config isn't partially written-to

* Fixed linter error

* Use os.replace instead of shutil.move

* Tests for reading/writing config.yaml

* Linter fixes
2021-09-13 13:20:19 -07:00
Jeff Cruikshank
1ac7e58140
Added validate_keyring_passphrase RPC. Includes a test in test_daemon. (#8325)
Some minor refactoring to support writing tidier RPC tests.
2021-09-13 13:19:52 -07:00
Chris Marslender
d172efa3a3
Allow host to be configurable for timelord launcher (#8434)
* Let the timelord laucher connect to a configurable hostname

* Use 'host' to be more consistent with the other config sections

* Add timelord launcher host to initial config
2021-09-10 17:00:10 -07:00
paulhainsworth-chia
5d75defa1e
Changelog1.2.6 (#8423)
* changelog 1.2.6
2021-09-09 16:11:16 -07:00
dustinface
ab9ae7e990
plotting: Some refactoring of PlotManager.refresh_batch.process_file (#8380)
* plotting: Refactor file exists check in `process_file`

* plotting: Refactor processing of the `ThreadPoolExecutor.map()` result

I might miss something but imo the use of `reduce` here just reduces
readability and has no value.

* plotting: Let `process_file` return `Optional[PlotInfo]`
2021-09-08 15:23:01 -07:00
William Blanke
f692360aa2
updated bls to 1.0.6 2021-09-08 14:47:44 -07:00
Arvid Norberg
0b92c89e7d
Conditions parser (#8393)
* tests for invalid list terminators in conditions

* bump clvm_rs version
2021-09-08 14:46:25 -07:00
dustinface
85e176fe31
pre-commit: Update some hooks (#8309)
* pre-commit: Update `flake8` to 3.9.2

* pre-commit: Update `pre-commit-hooks` to 4.0.1

* pre-commit: Update `black` to 21.8b0
2021-09-07 18:18:43 -07:00
dustinface
ba293f65c8
plotting: Drop some redundant code (#8308)
* plotting: Drop some redundant `None` checks

* plotting: Drop redundant `stat_info`
2021-09-07 18:18:17 -07:00
dustinface
fe6837218c
plotting: Don't reload all plot paths for each batch, do it once upfront (#8368) 2021-09-07 16:29:09 -07:00
dustinface
64a8249d75
plotting|tests: Fix two PlotsRefreshParameter instantiations (#8367)
* tests: Set `batch_size` to `2` in `setup_plots`

The idea here was to test something smaller than the plots we load.

Fix after 17dea1b708.

* plotting: Set `batch_sleep_milliseconds` to `0` in `check_plots`

The idea here was to have less sleep time since we don't need to give 
other threads the chance to jump in. It was `1` before but `0` makes 
more sense imo.

Fix after 17dea1b708.
2021-09-07 14:02:19 -07:00
Yostra
c353048efb
Bugfix for the task queue buildup (#8315)
* fix bug

* remove except
2021-09-07 14:01:23 -07:00
matt-o-how
0096f755a1
DID Update Merge (#8129)
* fixed the bugs related to DID puzzles

* change test so that wallets recover into other wallets

* fix parent_info fetching when recovering

* fix did_test

* delete did tests related to singleton behaviours as that is tested elsewhere

* linting fixes

* update hash commit for did_innerpuz.clvm

* update DID wallet RPC calls

* more lint fixes

* delete further references to deprecated did_spend function

* fix bug in wallet state manager related to falsely detecting pool create

* added did_rpc test

* make sure amounts are uint64

* lint fixes

* Fix deadlock in DID wallet creation, and introduce create_new_did_wallet API call

* rename solution_to_pool_state

* Remove tests dir from packages

* added potential fix

* Allow getting unconfirmed balance from wallet_state_manager when under lock

* Remove a deadlock from create_new_did_wallet

* Update DID wallet test to use async check for farmed chia in wallet setup

* Fix unsigned arithmetic error

* Make DID wallet tests compatible with WalletStateManager lock checking

* check if removal belongs to the wallet

* unconfirmed

* did test cleanup

* fix temppuzhash to be an innerpuz

* clean up DID Wallet, add test for previously broken case

* added state_change call when coin added
added did_info for transaction sent

* update delete wallet parameters

* add comments to DID innerpuz

* fix duplicating bug with tx store

* re-enable did tests

* fix cc wallet bare raise

* remove unused assignation

* fix bare spend in did_wallet

* fix small bug

* messages are a cons box where the first value denotes type of message

* cc_wallet uses new parameter for get_confired_balance

* updates to the puzzle based upon suggestion by Richard

* update git submodule chia-blockchain-gui to did_branch

* updated gui to did_branch 76f9e6cea9f58a30984580b594631f3ae2679752

* updated gui to 041ac79be4

Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: William Blanke <wjb98672@gmail.com>
2021-09-07 12:48:41 -07:00
William Blanke
cd38fc3ec6
updated gui to 041ac79be4 2021-09-07 10:51:36 -07:00
dependabot[bot]
4ef9a84661
Bump sortedcontainers from 2.3.0 to 2.4.0 (#5387) 2021-09-07 09:04:47 -07:00
Arvid Norberg
6d60bfd58d
add debug option to log all SQL commands (#8324) 2021-09-03 14:13:45 -07:00
dustinface
2db9944687
plotting|util: Adjust plot refresh parameter (#8275) 2021-09-02 08:23:52 -07:00
dustinface
17cb41ae16
plotting|tests: Cache plot data in PlotManager (#8009) 2021-09-02 08:22:48 -07:00
Chris Marslender
8ef39bb6bb
Revert "bugfix" (#8298)
* Revert "bugfix (#3280)"

This reverts commit 0fb0dd43b9.

* Remove duplicate check
2021-09-01 17:10:29 -07:00
maohuazhu
0fb0dd43b9
bugfix (#3280) 2021-09-01 10:58:57 -07:00
Kyle Altendorf
5ef8202f2c
Use negative amount to indicate send in wallet get_transactions output (#7990)
* Use negative amount to indicate send in wallet get_transactions output

* label as Amount sent: / Amount received:, not 1 / -1
2021-09-01 09:50:40 -07:00
dustinface
17dea1b708
plotting|util|tests: Fix and test re-trying of plots which failed to load (#8279)
* Revert "plotting: Fix failed_to_open_filenames re-try interval"

This reverts 8a8abc41a8 which is part of 
#7848. Seems like i confused myself there.

* plotting|util: Introduce `retry_invalid_seconds` in plot refresh params

* plotting: Cleanup `failed_to_open_filenames`

* tests: Test re-try of plots which failed to load
2021-09-01 09:21:29 -07:00