Commit Graph

161 Commits

Author SHA1 Message Date
Mariano Sorgente a76446eba9
Speedup normal sync and wallet sync (#5590)
* Correctly return from bytes without parsing

* Huge speedup for wallet sync

* Lint

* Only construct CoinRecord when necessary

* Punt on creation of coin

* Removing warning log

* Flaky test

* Finally fix flaky test
2021-05-20 10:42:22 -07:00
Adam Kelly 15d4938a8c
Please add comments (#5565)
* Please add comments

* Fix issue

* More blocks

Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Mariano <sorgente711@gmail.com>
2021-05-20 11:40:36 +09:00
Bill Blanke 207c83eabb tweak timeouts 2021-05-19 16:25:58 -07:00
Bill Blanke 18ccda9310 wait after farm_new_transaction_block 2021-05-19 13:44:09 -07:00
Bill Blanke 50ff07e687 wait after farm_new_transaction_block 2021-05-19 13:40:36 -07:00
Bill Blanke a0927402ac wait after farm_new_transaction_block 2021-05-19 13:30:42 -07:00
Yostra 108647112c
Wallet (#4887)
* spent height

* handle generator reorg

* tx cache

* coin cache

* rebuild cache if write fails

* save last few messages new_peak while syncing

* don't use dupe func

* tx reorg test

* lock not needed

* lint

* lock

* modify properly

* this shouldn't hit a disk ever

* use same number

* notify wallet only once, lock when getting a balance

* lock only if unspent coin records is None

* assert spent

* lint

* Add test for prev generator

Co-authored-by: Mariano <sorgente711@gmail.com>
2021-05-19 12:06:48 -07:00
Nikolaj Kuntner cbc9141689
add all none's (#4503)
Co-authored-by: Nikolaj Kuntner <>
2021-05-10 22:05:45 -07:00
matt-o-how 637177519a
Add announcements for standard tx (#3023)
* changed bahviour of wallet and wallet tools for standard solutions

* black formatting wallet_tools

* added a test for hypothetical stolen zero_output coin

* swap to sha256 from sha256tree for message

* fix wallet_tools version, address lint issues

* correctly int_from_bytes

* fix uninstantiated key in dict

* Comment out broken test

* Fix types (used SerializedProgram)

Co-authored-by: Mariano <sorgente711@gmail.com>
2021-04-30 03:13:00 +09:00
matt-o-how c1846b0f49
Singleton improvements (#2286)
* Changed singleton to take puzzlehash as origin.
Updated DID wallet to use this

* fixed hex and sha256tree for singleton puzzle

* require more signature for DID spends

* fix singleton tests
black format did wallet

* fix broken test
fix linting
switch to inline functions

* remove unused defuns from singleton_top_layer
2021-04-27 11:25:33 -07:00
Yostra 328e4cd276
Blockchain timestamps fix (#2302)
* incomplete push for debugging

* block timestamp in mempool

* rename

* farm tx block

Co-authored-by: matt <matt@chia.net>
2021-04-21 16:43:02 -07:00
matt 1b81c2f14f fix broken test 2021-04-20 18:18:24 -07:00
arvidn 6b4d060758 pass through max cost all the way down to where we execute the CLVM code 2021-04-17 10:34:13 -07:00
Mariano Sorgente a2ca057b49
Ms.aggsig me challenge (#1843)
* Start aggsig me

* Pass in genesis challenge

* Update DID, and remove useless functions from coinbase.py

* Unused imports

* Revert GUI

* Use a different constant so forks of chia can easily change it
2021-04-14 14:03:14 +09:00
Yostra 773adfade5
Lock for all writes (#1758)
* lock for all writes

* use async  with where convinant

* wrapper

* more

* lint

* update wallet

* rl wallet

* indentation

* fix tests

* bad path merged into main

* wallet lock

* refacoted by mistake

* re-raise

* memory/disk inconsistency

* more inconsitency

* asyncio.cancelled is baseexception in 3.8 and 3.9
2021-04-10 19:07:02 -07:00
matt-o-how 5e1bf6d5f3
Merge DID into main (#1720)
* rebase DID off main

* fix indentation and imports

* lint fixes

* fix test_compilation paths for new puzzles

* added _init__.py for did_wallet

* mypy typing fixes

* included did_wallet in setup.py module list

* stored pubkey & puzhash so that recovery_spend can choose not take them

* black missing comma
2021-04-06 19:31:44 -07:00
Richard Kiss 569ca16f50 Use `sed` to change imports from `src` to `chia`. 2021-04-04 21:41:39 -07:00
Richard Kiss 8a3e00548a Rename `src` to `chia`. 2021-04-04 21:41:39 -07:00
Mariano Sorgente 05b4659633
Ms.offline signing2 (#1530)
* Offline transaction signing

* Create signed transaction from python

* More work on offline

* Get transaction signing working for many outputs.
2021-03-31 17:04:10 +09:00
Mariano Sorgente ee81a0e088
Improve chia show (#1593)
* Improve chia show

* Fix default ports on all commands, add missing __init__.py files.
2021-03-30 11:43:30 -07:00
Adam Kelly f59acccf51 Add github workflow tool 2021-03-25 12:05:54 -07:00
Adam Kelly 68a15a5ff5 Move slow tests 2021-03-25 12:05:54 -07:00
Mariano Sorgente 764d425b95
Don't use the cache to get transactions (#1301)
* Don't use the cache to get transactions

* Increase timeout
2021-03-15 13:48:01 -07:00
Yostra d1f037be8a
Wallet Address (#1253)
* use current addressg

* keep track of current

* fix wallet test

* cmd
2021-03-11 19:36:28 -08:00
Adam Kelly e50d14b0a9
Generator reference (#1209)
* added chialisp deserialisation puzzle

* Update clvm-deserialization-in-chialisp. Add test

* added new test_chialisp_deserialisation tests

* fix tests

* Reduce accepted atom size to 1MB during ChiaLisp native deserialization

* add lower_level generator
updates to python_lowerlevel

* add black formatting to lowerlevel

* fix puzzles references

* lowlevel generator improvement
lint fixes

* chialisp.py remove git ditritus

* pass the second arg to the block_program in low level generator

* use slightly more optimised string for lower level generator

* Restore cc.clvm to f79152d1ab

* Adjust compilation sanity checks - remove generator.clvm, add chialisp_deserialisation.clvm

* Update tests for building clvm assembly from python

* Adjust sha256tree commitments for puzzles

* black formatting for lint

* add #noqas to long hexstrings

Co-authored-by: matt <matt@chia.net>
Co-authored-by: Adam Kelly <aqk@aqk.im>
2021-03-10 13:24:17 -08:00
Mariano Sorgente 1c6c372044
Ms.new breaking changes (#1182)
1. The formula for computing iterations is simplified, so that only one division is necessary, and inverting the (1-x) into just x.
2. There are new timestamp rules. A block N must have a greater timestamp than block N-1. Also, a block's timestamp cannot be more than 5 minutes in the future.
3. A List[Tuple[uint16, str]] is added to the handshake. These are the capabilities that the node supports, to add new features to the protocol.
4. The message_id is now before the data in each message.
2021-03-10 17:14:13 +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
Mariano Sorgente d33d16591d
blspy to 0.9, replace infinity, update clvm, puzzle hash (#1146)
* blspy to 0.9

* replace infinity with default constructor

* infinity

* Update clvm, puzzle hash

* Fix tests with new blspy

* prefarm in config instead of constants

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Bill Blanke <wjb2002@flex.com>
2021-03-04 00:54:03 -08:00
Richard Kiss f79152d1ab
Bump clvm and replace `((c P A))` with `(a P A)`. Add some cc fixes prior to audit. (#1133)
* Bump clvm versions and replace `((c P A))` with `(a P A)`. Again.

* Modernize some clvm.

* Fix some comments and naming in `cc.clvm`.

* Prohibit `CREATE_ANNOUNCEMENT` in inner puzzle.

* fix cc.clvm

initial commit for innerpuz announcement test

Co-authored-by: matt <matt@chia.net>
2021-03-03 14:12:04 -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
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 26e037d46c post rebase clean 2021-02-17 12:57:12 -08:00
Yostra 2e407fe35a block tool fix, colour coins multi coin spend fix, wallet max send amount 2021-02-17 12:57:12 -08:00
Yostra f0a317761a fn speedup, transaction cost limit, max send amount 2021-02-17 12:57:12 -08:00
Mariano Sorgente 5cc3407b65
Support for plots with pool address (#920)
* Updated gui with sub block changes

* Move some files, validate fees in mempool

* Support for plots with pool address

* Fix test and new blocks

* chia-blockchain-gui good commit

* changelof

* Fix edge cases with unfinished blocks

* Update gui

* Add test fixtures
2021-02-16 01:15:24 -08:00
Mariano Sorgente a3684dc8eb
Remove sub blocks and chia wallet cli fixes (#913)
* Remove sub block start

* Intermediate commit, many replacements

* Fix wallet table name

* Fix tests

* chia wallet cli fixes
2021-02-12 12:24:33 -08:00
Mariano Sorgente dabdce5df0
Ms.remove height (#880)
* First pass at removing height

* Fix test

* Remove useless files

* Rename sub_block_height to block_height everywhere

* A few more replaces. Don't migrate old addresses. Don't replace addresses

* lru cache for blocks

* cc fixes rebased

* race

* close check full node task

* lint

* more race

Co-authored-by: Yostra <straya@chia.net>
2021-02-09 20:49:47 -08:00
Yostra 99d656ca88 trades 2021-02-09 13:07:24 -05:00
Yostra 89eb231af5 blck 2021-02-09 13:07:24 -05:00
Yostra d81dd150e4 cc and program 2021-02-09 13:07:24 -05:00
Mariano Sorgente 4156c34cd6
Change sync logic: backtrack sync and batch sync, fix bugs (#737)
Improve sync and fix issues with sub block record cache
2021-01-26 23:38:39 +09:00
Mariano Sorgente 76426b3e32 Speed up tests 2021-01-19 22:25:45 -08:00
Mariano Sorgente 927e0d6913 Fix prevalidation and optimize some tests 2021-01-19 10:53:04 -08:00
Gene Hoffman 2486cceccd rename test to bech32m and place in wallet test run 2021-01-18 11:49:14 -08:00
matt 55e8bdf0e3 fix rl_tests to use bech32m name 2021-01-18 11:49:14 -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
Gene Hoffman 99503adcbf Other wallet test timeout to 100 2021-01-13 16:58:21 -08:00
Gene Hoffman 148916a155 wallet_sync timeout to 100s 2021-01-13 16:58:21 -08:00