Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lock, keep cache consistent #3051

Merged
merged 5 commits into from
Apr 29, 2021
Merged

Add lock, keep cache consistent #3051

merged 5 commits into from
Apr 29, 2021

Conversation

Yostra
Copy link
Contributor

@Yostra Yostra commented Apr 29, 2021

No description provided.

@@ -55,7 +55,7 @@ async def create(cls, db_wrapper: DBWrapper, cache_size: uint32 = uint32(60000))

await self.coin_record_db.execute("CREATE INDEX IF NOT EXISTS coin_spent on coin_record(spent)")

await self.coin_record_db.execute("CREATE INDEX IF NOT EXISTS coin_spent on coin_record(puzzle_hash)")
await self.coin_record_db.execute("CREATE INDEX IF NOT EXISTS coin_puzzle_hash on coin_record(puzzle_hash)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah.

@Yostra Yostra force-pushed the mem_race_cache_fix branch from 20a77b9 to bb4ed35 Compare April 29, 2021 03:48
mariano54
mariano54 previously approved these changes Apr 29, 2021
@lgtm-com
Copy link

lgtm-com bot commented Apr 29, 2021

This pull request introduces 2 alerts when merging b4552da into 7cfc07d - view on LGTM.com

new alerts:

  • 2 for Unused import

@mariano54 mariano54 merged commit 5f9f631 into main Apr 29, 2021
@mariano54 mariano54 deleted the mem_race_cache_fix branch April 29, 2021 07:13
wjblanke added a commit that referenced this pull request Apr 29, 2021
* Added new issue templates (#3033)

* added new issue templates for support and requestes

* spelling is hard...

* Add lock, keep cache consistent (#3051)

* execute task decorator

* use blockchain lock

* indentation

* lint

* execute_task

* Ms.empty blocks3 (#3064)

* Fix empty blocks

* Remove error log

* Missing imports

* .header_hash instead of .prev_hash in simulator

Co-authored-by: J Eckert <sargonas@users.noreply.github.com>
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
wjblanke added a commit that referenced this pull request Apr 29, 2021
* Added new issue templates (#3033)

* added new issue templates for support and requestes

* spelling is hard...

* Add lock, keep cache consistent (#3051)

* execute task decorator

* use blockchain lock

* indentation

* lint

* execute_task

* Ms.empty blocks3 (#3064)

* Fix empty blocks

* Remove error log

* Missing imports

* .header_hash instead of .prev_hash in simulator

* Fix typo (#3069)

* Use secure coin ids (#3095)

* 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>

* cache VDF validation results (per process) (#3110)

Co-authored-by: J Eckert <sargonas@users.noreply.github.com>
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Antonio Borrero Granell <me@antoniobg.com>
Co-authored-by: matt-o-how <48453825+matt-o-how@users.noreply.github.com>
Co-authored-by: Mariano <sorgente711@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
wjblanke added a commit that referenced this pull request Apr 30, 2021
* Added new issue templates (#3033)

* added new issue templates for support and requestes

* spelling is hard...

* Add lock, keep cache consistent (#3051)

* execute task decorator

* use blockchain lock

* indentation

* lint

* execute_task

* Ms.empty blocks3 (#3064)

* Fix empty blocks

* Remove error log

* Missing imports

* .header_hash instead of .prev_hash in simulator

* Fix typo (#3069)

* Use secure coin ids (#3095)

* 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>

* cache VDF validation results (per process) (#3110)

* Update GUI for plot refresh issue (#3135)

Co-authored-by: Adam Kelly <aqk@aqk.im>

Co-authored-by: J Eckert <sargonas@users.noreply.github.com>
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Antonio Borrero Granell <me@antoniobg.com>
Co-authored-by: matt-o-how <48453825+matt-o-how@users.noreply.github.com>
Co-authored-by: Mariano <sorgente711@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
Co-authored-by: Adam Kelly <aqk@aqk.im>
wjblanke added a commit that referenced this pull request Apr 30, 2021
* Added new issue templates (#3033)

* added new issue templates for support and requestes

* spelling is hard...

* Add lock, keep cache consistent (#3051)

* execute task decorator

* use blockchain lock

* indentation

* lint

* execute_task

* Ms.empty blocks3 (#3064)

* Fix empty blocks

* Remove error log

* Missing imports

* .header_hash instead of .prev_hash in simulator

* Fix typo (#3069)

* Use secure coin ids (#3095)

* 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>

* cache VDF validation results (per process) (#3110)

* Update GUI for plot refresh issue (#3135)

Co-authored-by: Adam Kelly <aqk@aqk.im>

* remove commit and not needed query (#3148)

* Copyright 2021 Chia Network in LICENSE (#3153)

* just filter limit (#3152)

Co-authored-by: J Eckert <sargonas@users.noreply.github.com>
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Antonio Borrero Granell <me@antoniobg.com>
Co-authored-by: matt-o-how <48453825+matt-o-how@users.noreply.github.com>
Co-authored-by: Mariano <sorgente711@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
wjblanke added a commit that referenced this pull request Apr 30, 2021
* Added new issue templates (#3033)

* added new issue templates for support and requestes

* spelling is hard...

* Add lock, keep cache consistent (#3051)

* execute task decorator

* use blockchain lock

* indentation

* lint

* execute_task

* Ms.empty blocks3 (#3064)

* Fix empty blocks

* Remove error log

* Missing imports

* .header_hash instead of .prev_hash in simulator

* Fix typo (#3069)

* Use secure coin ids (#3095)

* 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>

* cache VDF validation results (per process) (#3110)

* Update GUI for plot refresh issue (#3135)

Co-authored-by: Adam Kelly <aqk@aqk.im>

* remove commit and not needed query (#3148)

* Copyright 2021 Chia Network in LICENSE (#3153)

* just filter limit (#3152)

* fix plot dupe (#3154)

* increase ratio (#3155)

* wait to end of process to avoid zombies (#3160)

* fix takes 1 positional argument but 2 were given (#3202)

* Update CLI tools to use EiB when appropriate. (#3117)

* Improve streamable (#3031)

* Avoid importing `test_constants` as it takes a long time.

* Factor out `parse_*` functions.

* First crack at refactoring `Streamable.parse`.

* Don't add `_parse_functions` attribute to `Streamable`.

This no longer requires an extra `_parse_functions` attribute on a
`Streamable`, as it may be confusing serializers or other functions
that use `__annotations__`.

* Fix lint problems with `black`.

* Fix `parse_tuple`.

* Defer some parsing failures to parse time rather than class-creation time.

* Tidy up & remove some obsolete stuff.

* Decorate `RequestBlocks` as `streamable`.

* Fix wrong uses of Streamable class

Revert an earlier commit and error out on class creation in case a
Streamable subclass is instantiated incorrectly, e.g. containing a
non-serializable member.

Fix cases where Streamable parent class was forgotten.

* Fix wrong types when creating DerivationRecord and WalletCoinRecord

* additional unit tests for streamable parsers

* add type annotations (#3222)

Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
Co-authored-by: arvidn <arvid@libtorrent.org>

* Tests skipping mempool (#3065)

* Avoid importing `test_constants` as it takes a long time.

* Some new tests that circumvents mempool.

* Fix lint problems.

Co-authored-by: J Eckert <sargonas@users.noreply.github.com>
Co-authored-by: Yostra <straya@chia.net>
Co-authored-by: Mariano Sorgente <3069354+mariano54@users.noreply.github.com>
Co-authored-by: Antonio Borrero Granell <me@antoniobg.com>
Co-authored-by: matt-o-how <48453825+matt-o-how@users.noreply.github.com>
Co-authored-by: Mariano <sorgente711@gmail.com>
Co-authored-by: Arvid Norberg <arvid@libtorrent.org>
Co-authored-by: Adam Kelly <338792+aqk@users.noreply.github.com>
Co-authored-by: Adam Kelly <aqk@aqk.im>
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Co-authored-by: Joel <34619326+joelcho@users.noreply.github.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
Co-authored-by: Richard Kiss <him@richardkiss.com>
Co-authored-by: Rostislav <rostislav@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants