-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Issues with current implementation of ABCI++ #16796
Comments
This will be partially resolved by #16898 . I would like to dig deeper into tests, as I think they don't fully reflect what happens with CometBFT calls. Maybe it's ok, but would like to double-check |
I'm experiencing an issue during simulation testing where messages are delivered correctly using |
@hacheigriega are you calling FinalizeBlock and Commit? If not, I would tweak your implementation to use those methods instead. |
Yes, My code if you have time to take a gander: https://github.com/sedaprotocol/seda-chain/blob/8a3e964098f16b37582dfa14ca0d00652c525972/x/vesting/simulation/operations.go#L122 Thank you. |
Actually, it seems the states are not being persisted for SDK's default module simulations, either. |
Sorry, but what is "default module simulations"? Can you provide a link? |
Ah yes I wasn't clear. I was looking specifically at cosmos-sdk/x/gov/simulation/operations.go Line 269 in 7e6948f
Usually its future operation |
For changes to persist, you should ensure you're calling |
All of these issues have been fixed, or are not issues anymore 👌 |
Summary of Bug
On logic:
State in FinalizeBlock is being reset every time (we must ALWAYS get a ready-to-use state in FinalizeBlock, otherwise something went wrong and we didn't call InitChain or ProcessProposal).Necessary because ProcessProposal isn't called on replay.RequestInitChain
with height 0, we should then store 1 asapp.InitialHeight
; otherwise we'll get the wrong context inProcessProposal
(which must never get height 0). In other words: getContextForProposal, doesn’t return the correct context when height == 0. Also this causes an undesired re-set of state inProcessProposal
On tests:
validateFinalizeBlockHeight
) if no commit occurredWithAutomaticFinalizeBlock
shouldn't exist as any msg MUST run inside it instead of after it (integration tests:RunMsg
should turn the msg into txbytes somehow ???)Trying to solve some of these here: #16794
Running
TestAppStateDeterminism
will fail when we remove the (supposedly unnecessary) initialization of finalizeBlockStateI think this happens because
SimulateFromSeed
callsFinalizeBlock
without callingProcessProposal
first.The text was updated successfully, but these errors were encountered: