Commit Graph

183 Commits

Author SHA1 Message Date
Florin Chirica 07f8ed198f Make sure we don't call dns in tests. 2021-05-14 14:05:12 -06:00
Nikolaj Kuntner 2faab1ea83
Improve style consistency in root directory docs files (#4493)
* Improve style consistency

* black python required blank

Co-authored-by: Nikolaj Kuntner <>
2021-05-12 13:12:30 -07:00
Yostra 69b18b5ec5 daemon test 2021-04-08 13:22:48 -07:00
Richard Kiss 569ca16f50 Use `sed` to change imports from `src` to `chia`. 2021-04-04 21:41:39 -07:00
Florin Chirica 43625e60f8
Sanitize WP only. (#1463)
* Initial commit.

* Try sanitize_weight_proof_only.

* Use challenge blocks.

* Try spawn compact task only in simulation test.

* Small rewrite.

* Typo.

* Use default sanitize_wp_only if not present in config.
2021-03-29 21:18:38 -07:00
Yostra 398f4768c1
Network wait (#1218)
* don't use gen challenge

* service wait for gen

* FullNode, Timelord wait

* Don't disconnect if receiving disconnected VDF

* Fix test

* api for ui, start wallet but delay wallet_blockchain init

* rebase cleanup

Co-authored-by: Mariano <sorgente711@gmail.com>
2021-03-10 15:43:02 -08:00
Mariano Sorgente f3a367c2a0
Migrate to testnet. increase weight proof recent blocks, and increase… (#1222)
* Migrate to testnet. increase weight proof recent blocks, and increase temp RAM

* Remove unnecessary logic, and make number of blocks sent safer

* Revert block validation change

* Revert changes

* revert failed test

* Reduce max k
2021-03-10 10:57:38 -08:00
Mariano Sorgente 4d15f86715
Ms.rate limits (#1204)
Implements rate limiting for full node.
2021-03-10 15:48:34 +09:00
Gene Hoffman b5ce8c9e66
Isort take 3 (#1213)
* isort in a black friendly way

* isort but debug superlinter later
2021-03-09 18:27:27 -08:00
Yostra 19b7a8247b daemon't tests expects genesis to be None 2021-03-04 18:48:11 -08:00
Mariano Sorgente 2c8bdce181
Fix daemon issue and uncompact blocks issue (#1150)
* Fix daemon issue and uncompact blocks issue

* Don't add repeated entries

* fix sampling validation

* temp skip segment validation

* fix condition

* Disconnect if weight proof validation throws

* Wallet long sync from closer

* Fix test

* uncomment WP validations, fix compact vdf bug

* fix log

Co-authored-by: almog <almogdepaz@gmail.com>
2021-03-04 09:22:23 -08:00
Yostra d0383d989c
Daemon alerts (#1132)
* daemon alerts fetch, simple server, validation

* launch services, alert server, wait on gen

* config

* not ready alert creation signing

* get status daemon rpc

* gene's key

* lgtm

* config

* prefix

* rebase artifacts
2021-03-03 14:19:26 -08:00
Florin Chirica bac6e36c05
Bluebox weight proof. (#1028)
* Initial commit weight proof bluebox.

* More verification, fix linting.

* Checkpoint testing.

* Checkpoint verify compact proofs.

* First attempt already seen compact proofs.

* Try bigger timeouts.

* Try passing first without ICC EOS.

* Try to uniformly sanitize by field_vdf.

* Try to fix vdf.py

* Temporary change: check if simulation is slow or stalled.

* Try fixing VDFProof erros in tests.

* Checkpoint: address some comments.

* Checkpoint is_fully_compactified.

* First attempt compact blocks fixture.

* Add tests.

* Test simulation should eventually pass.

* Test full node store passing.

* Use the proper fixture.

* Try lighter test_simulation.

* Bump chiavdf, use correct fixture db, try test cache.

* Update fixtures.py

* Try bigger timeouts.

* First attempt split tests.

* Rename workflow files.

* Relax test simulation since it's still failing.

* Update test cache.
2021-03-03 13:13:08 -08:00
Yostra 1d91a20112
Network settings (#1019)
* rpc get network settings

* breakpoints

* don't log canceled

* fix test coin store

* cancel task on exit

* use network prefix for prefarm

* rebase and change network type

* network type

* missing config

* add timeout
2021-03-03 12:58:27 -08:00
Yostra 480768d83d move overrides to block tool | start 2021-02-24 00:17:30 -05:00
Yostra ea1f8d6bfb add tests 2021-02-24 00:17:30 -05:00
Yostra b76486041b
fix simulator (#950)
* fix simulator

* remove arg

* remove unused import
2021-02-18 14:49:36 -08:00
Mariano Sorgente 71ccc8f47b
Ms.slot catch up (#947)
* Slot catch-up, windows migrate, higher sub_slot_iters in the beginning

* Fix typo in filename

* reverse directory names

* comment flaky test

* Dont migrate addresses for now
2021-02-18 11:09:56 -08:00
Mariano Sorgente e05e5f9d8c
Ms.config changes2 (#941)
* This allows configuring a new testnet  only by changing the config file, no code changes required. 
* We can theoretically join either testnet1 (beta27) or testnet2 (rc) with this codebase
* There is a new constant: DIFFICULTY_CONSTANT_FACTOR, this number is a constant multiplied by the difficulty. It is set to 2**65 now, to make difficulty smaller (we can start the mainnet with a difficulty of 5 for example). 
* If you want to run a new testnet, you can change DIFFICULTY_CONSTANT_FACTOR in the config, and create a new entry for it
* Also, the databases now contain the GENESIS_CHALLENGE in them, so that if you run on two testnets, the DBs will be different
* Don't double load duplicate plots
 
 
 
Sample config:
 ```
 network_overrides: &network_overrides
  testnet4:
    DIFFICULTY_CONSTANT_FACTOR: 33554432
    DIFFICULTY_STARTING: 16777216
    GENESIS_CHALLENGE: "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b"  # std_hash(b"1")
    GENESIS_PRE_FARM_POOL_PUZZLE_HASH: "23b039a829f3ed14a260355b9fc55d9ccc4539f05bd4bf529fd2630de1751d52"
    GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: "23b039a829f3ed14a260355b9fc55d9ccc4539f05bd4bf529fd2630de1751d52"
  mainnet:
    GENESIS_CHALLENGE: "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35" # std_hash(b"2")

selected_network: &selected_network "testne4"
 ```
2021-02-19 02:00:25 +09:00
Yostra 3d27a7d660 Use TLS Certificate hash as node id ssl id (#740)
* create CA

* create CA chain, pin public, private, auth

* build scripts

* refactor rpc

* test logging
2021-02-04 01:27:59 -08:00
Mariano Sorgente 63924f8188 Improve mempool performance 2021-02-04 01:27:59 -08:00
Mariano Sorgente 927e0d6913 Fix prevalidation and optimize some tests 2021-01-19 10:53:04 -08:00
matt 86c17ee06c replace chech32m with bech32m 2021-01-18 11:49:14 -08:00
matt 1fcec881cb rename to check32m
add tests
2021-01-18 11:49:14 -08:00
Yostra 1640de53f7 wallet tests 2021-01-12 17:00:54 -05:00
Mariano Sorgente 88cf51ad82 Mypy for src 2021-01-12 17:00:53 -05:00
Mariano Sorgente c018b26716 Coin store reorgs and mempool tests 2021-01-12 17:00:53 -05:00
Mariano Sorgente 9fff8e54e9 More node tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente 6d8c8be087 Separate out timelord api 2021-01-12 17:00:52 -05:00
Mariano Sorgente a501f2adff Factor out waiting for a specific response 2021-01-12 17:00:52 -05:00
Mariano Sorgente ab8e36e310 Allow launching service without connecting to daemon 2021-01-12 17:00:52 -05:00
Yostra ed08e25655 flake8 tests 2021-01-12 17:00:52 -05:00
Yostra 11e59b085a fix all 2021-01-12 17:00:52 -05:00
Yostra ba021fcbfa setup nodes 2021-01-12 17:00:52 -05:00
Yostra f9319a1669 full node checkpoint 2021-01-12 17:00:52 -05:00
Yostra afb83e7923 rpcs 2021-01-12 17:00:52 -05:00
Yostra c874bf3ad2 add wallet tests 2021-01-12 17:00:52 -05:00
Yostra 7c079cf143 networking 2021-01-12 17:00:52 -05:00
almog 44fa74c6d1 refactor finishes_sub_epoch 2021-01-12 17:00:52 -05:00
Mariano Sorgente e9d2b1f761 IPS-> slot iters. Faster tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente ad2cffd0c4 Add reorg tests and fix reorg bug 2021-01-12 17:00:52 -05:00
Yostra bdb0a3d88f some after rebase cleanup 2021-01-12 17:00:52 -05:00
Mariano Sorgente 069535e52e More difficulty fixes and tests 2021-01-12 17:00:52 -05:00
Mariano Sorgente 3f064e529c Fix difficulty adjustment bug 2021-01-12 17:00:52 -05:00
Mariano Sorgente bf012e4eea Fixes to cc VDF and tests 2021-01-12 17:00:51 -05:00
Mariano Sorgente a55649847f Switch to signage point based iters 2021-01-12 17:00:51 -05:00
Mariano Sorgente d5143625ff Some reorganization, full node stuff, and timelord protoc9ol 2021-01-12 17:00:51 -05:00
Mariano Sorgente cf46fb8406 Fix block tools icc issue 2021-01-12 17:00:51 -05:00
Mariano Sorgente 230ff44a4c Update timelord protocol 2021-01-12 17:00:51 -05:00
Mariano Sorgente 0c506abfd2 500 blocks 2021-01-12 17:00:51 -05:00