-
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
cherry-pick 8624 for v0.41.x #8782
Conversation
In case anyone has any concerns about event changes in a backport, @marbar3778 tested this change against the cosmos-hub and the node was able to sync from genesis no problem (and MsgUpdateClient msgs have been committed) |
This change is added to enable relayers to do easier misbehaviour monitoring. We don't need a point release immediately, but within the next week or so would be great. Definitely before transfer are enabled |
Dup of #8770? Yes, we have a bot now! 🎉 |
The other pr already has approvals. Can we merge that one and close this one? |
Am I right in thinking that we need to backport this for v0.42 @AmauryM ? |
Wait this is state machine breaking right? |
No, i don't think so #8624 (comment), didn't have a look at the code though |
We checked gas and larger event consideration for this. Gas costs are based on KV store read/writes and this pr does neither. We also checked if adding another event would cause a divergence in the header hash, see comment. Running these changes against the hub did not cause a consensus failure. Is there another consideration we are missing? Edit: for reference, the branch used was |
I thought the same. I was able to sync a node with a branch colin prepared for me. He said this message was executed already, and I was able to sync, so I guess it's not. |
I think going forward, it could be useful to automate syncing a point release to the hub to ensure no consensus failure happens. The SDK is pretty big and understanding exactly what might cause a state-machine breaking change is sometimes unclear or hard to determine. It would be a good preventative measure to ensure we don't do a release which is trivially state-machine breaking |
@marbar3778 can you clarify how events affect consensus generally in TM? It would be nice to have a definitive answer. |
it is defined here:
When delivertxResponse is received we build a tree and use the roothash as the last resultshash. If an event is in beginblock or endblock it is not hashed. From my understanding this is executed as a tx, we should see divergence in this but for some reason I didnt observe this when testing, its unclear if this is a sdk issue or tendermint issue. Will spin up a node tonight to double-check. |
From what I see in the spec just |
Here is where it is in tendermint. Note, events are not included in the hash. Only the And it looks like events are not added into the data (which logically follows) Could we get this backported? |
Thanks @colin-axner ! @marbar3778 could we get the ABCI documentation updated to flag
Ping @clevinson @AmauryM |
It's already there: https://docs.tendermint.com/master/spec/core/data_structures.html#header. I just never checked the specs I rewrote. adding a note in the proto files as well |
Description
Cherry-pick #8624 for backport
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes