Cosmos-sdk: staking TendermintUpdate Store should be in a transient store

Created on 16 May 2018  路  10Comments  路  Source: cosmos/cosmos-sdk

Tendermint updates will only ever last within a block

** Verify that this may already be happening with caching the existing store implementation?

staking

Most helpful comment

ON this one now!

All 10 comments

I wonder if we should consider this when charging for gas (somehow)?

At the moment we'll charge for storage reads/writes irrespective of whether they actually map to real disk reads/writes.

I don't think it's a problem - we should just have a transient store which is charged at a lower rate (or not at all?)

I don't think it's a problem - we should just have a transient store which is charged at a lower rate (or not at all?)

Agreed, that's what I mean.

From discussion, this is only used as a cache store so never written to disk. Closing for https://github.com/cosmos/cosmos-sdk/issues/1288

not closed? it would be good to make this more obvious as a developer that this only ever lasts in the cache - right now the process train looks the same

Maybe we could introduce store writes that automatically clear at the end of the block, and make it clear when you're writing to this store that this is what happens

Need to make sure implementation would be clean, but I think we could have an option to mount a substore as "transient", and update CacheMultiStore to not write transient stores on .Write().

Can't see where this has been updated in the codebase? reopening

https://github.com/cosmos/cosmos-sdk/pull/1481/files doesn't effect anything in x/staking

ON this one now!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fedekunze picture fedekunze  路  3Comments

rigelrozanski picture rigelrozanski  路  3Comments

cwgoes picture cwgoes  路  3Comments

ValarDragon picture ValarDragon  路  3Comments

kevlubkcm picture kevlubkcm  路  3Comments