osmosis-labs / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
14 stars 34 forks source link

fix: Remove locks to fix testnet halt #389

Closed ValarDragon closed 1 year ago

ValarDragon commented 1 year ago
ValarDragon commented 1 year ago

See comments from me in prior issues, for why the race conditions are actually the race sensor being broken. Going to sleep now, so can't chase down links, but should be eventually linked to from here: https://github.com/osmosis-labs/cosmos-sdk/pull/158

ValarDragon commented 1 year ago

Yikes, this fix does not maintain correctness in the generic case. (So would not be ok for the state machine long term, is fine to revive the testnet).

So need to do the deeper cache KV store data store correction

One note: currently we provide no guarantees about iterating during insertion... if you write to a btree (insert/delete), you invalidate all iterators currently iterating on that tree. I don't see that changing any time soon. (source https://github.com/google/btree/issues/28#issuecomment-437956533)

We deem this sufficient for testnet, so not going to merge this, but will instead make a testnet-only rc, as we make a better cache kv

czarcas7ic commented 1 year ago

Closing as I believe this is no longer needed