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

x/staking/keeper: AppHash depends on non-deterministic block time #18299

Closed
elias-orijtech opened this issue Oct 30, 2023 · 2 comments
Closed

Comments

@elias-orijtech
Copy link
Contributor

When simulating, it's useful to ensure that the AppHash stays the same across multiple runs. However, at least this store,

time := sdkCtx.HeaderInfo().Time

makes the AppHash depend on the block time, which is non-deterministic when running on top of testutil/network.Network.

This may not be a bug per se, but limits the determinism of the simulator. I'll bring this issue up in tomorrow's meeting, @alexanderbez, @odeke-em , @tac0turtle .

@tac0turtle
Copy link
Member

this is done from the time set by comet or the underlying consensus engine. In order to make it consistent we would need to inject a consist time, not sure if that is possible?

@elias-orijtech
Copy link
Contributor Author

Closing this is favor of #18145 (mocking comet for testutil/network).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants