sugarchain-project / sugarchain

Sugarchain: one-CPU-one-vote, the world's fastest PoW blockchain
https://bitcointalk.org/index.php?topic=5177722.0
MIT License
128 stars 63 forks source link

GetPoWHash_cached() #23

Closed cryptozeny closed 4 years ago

cryptozeny commented 4 years ago

https://github.com/ResistancePlatform/resistance-core/commit/a73d69465c8884e6289ecbdec58331e8fdc0376a

https://github.com/KotoDevelopers/koto/commit/79f47982c6947af3e293def66207d96707c3ac4e

yespower_cache

However, even if you use or introduce CBlockHeader::GetPoWHash() caching may still be desirable as the PoW hash is commonly requested 4 times per block fetched during a node's initial blockchain sync (once during prefetch of block headers, and 3 times more during validation of a fully fetched block).

https://github.com/cryptozeny/sugarchain-v0.16.3/issues/122 https://github.com/cryptozeny/sugarchain-v0.16.3/issues/117

cryptozeny commented 4 years ago

https://github.com/sugarchain-project/sugarchain/pull/22

cryptozeny commented 4 years ago

okoto benchmark https://gist.github.com/okoto-xyz/c8eead8d7eb8ffc01310abda267bec93

https://twitter.com/okoto_xyz/status/1189556610210754561 image

in this case, koto had no -reindex-chainstate option

cryptozeny commented 4 years ago

https://github.com/sugarchain-project/sugarchain/pull/26

cryptozeny commented 4 years ago

https://github.com/sugarchain-project/sugarchain/pull/22

cryptozeny commented 4 years ago

https://github.com/sugarchain-project/synctime

cryptozeny commented 4 years ago

image

cryptozeny commented 4 years ago

fixed https://github.com/sugarchain-project/sugarchain/pull/22