Closed ebuchman closed 5 years ago
We shouldn't assume that the version won't change in a KVStore with no empty blocks. Many apps will still have per-block updates (e.g. background updates at EndBlocker) that will modify the state. Lets implement something for ResponseEndBlock that tells Tendermint to stop. We discussed this in Berkeley, not sure if you commented here before or after that discussion.
not sure if you commented here before or after that discussion.
After.
For some reason I thought it was an issue in the IAVL, but Frey pointed out it was in the MultiStore. Still don't understand what benefit we get from hashing the version in the multistore.
Many apps will still have per-block updates
Sure, but why not make it easier for those that don't ? Many apps will only have changes based around txs.
Lets implement something for ResponseEndBlock that tells Tendermint to stop.
Sure. It adds some complexity, and hard to prioritize given everything else going on. There also seem to be some existing issues with no-empty-blocks that we're working through, eg. see
So we need to make sure that's all fixed up first
Opened https://github.com/tendermint/tendermint/issues/1909
I still think we should remove the version from the CommitID if we can to simplify this for users where the state doesn't necessarily transition every block. Eg. we should be able to provide a basecoin that doesn't have to use EndBlock to do this.
I agree with the proposal. Unless there is a concrete reason why version should be in the commit ID hash, we shouldn't include it imo. I can't think of any safety concern here.
Can we move this to proposal accepted @jaekwon @ebuchman ?
@ebuchman Any timeline on when this will be merged?
How did this issue end up? Will the suggested change be merged, or are there any plans to support not creating empty blocks in some other way?
@jackzampolin @alexanderbez @jaekwon @ValarDragon can we put this as "proposal accepted"?
I just made a PR with the above fix, along with a simple test. I don't actually use cosmos-sdk, but it bothers me seeing this question from so many projects.
Anyone who wants this functionality for your project, please review / comment on https://github.com/cosmos/cosmos-sdk/pull/4613
@haasted This is for you in particular
@ebuchman why the app hash changes when there are no transactions but there is the staking module, even if the stake and validators don't changes?
in cosmos-sdk some modules change the app-hash in each height: like slashing and distribution. In case you want to keep app-hash same you need to modify these modules. Go ahead!
Unclear what benefit we get from storing the version in the CommitID, especially since it inhibits no-empty-blocks
Thanks @ethanfrey for the investigation in https://github.com/confio/weave/issues/72#issuecomment-398676457
Here's a diff that just hashes the tree hash without the version, without changing any other code:
If we remove staking/slashing from baseapp (which we should, otherwise its not a basecoin!), then no-empty-blocks works with this change