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

fix(cosmic-swingset): enforce consensusMode, not by sniffing $DEBUG #4515

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

michaelfig
Copy link
Member

closes: #4506
refs: #4510

Description

Decouple consensus mode from the $DEBUG variable. Instead, always enable for actual chain, and always disable for sim-chain.

Security Considerations

Better protection of our validator community.

Documentation Considerations

Testing Considerations

@michaelfig michaelfig added the cosmic-swingset package: cosmic-swingset label Feb 9, 2022
@michaelfig michaelfig self-assigned this Feb 9, 2022
@michaelfig michaelfig requested a review from mhofman February 9, 2022 22:29
@mhofman
Copy link
Member

mhofman commented Feb 9, 2022

I believe #2519 talks about being able to spin up a node that would capture vat console info, and thus would run outside of consensus mode. It seems with this change it's no longer possible to have this node be a simple follower node in non-consensus mode without patching the code, is that right?

Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine by me, and easy to update when we need to have non-validating node that generate extra debug info.

@michaelfig
Copy link
Member Author

I believe #2519 talks about being able to spin up a node that would capture vat console info, and thus would run outside of consensus mode. It seems with this change it's no longer possible to have this node be a simple follower node in non-consensus mode without patching the code, is that right?

That's correct. Do note that if you have a follower node (based on current Cosmos SDK), it will abort with CONSENSUS FAILURE even if you turn off this consensusMode flag. We can't have it both ways, simply because any vat behaviour that is outside of consensus will eventually manifest as a divergence in the behaviour that is tracked within consensus.

OTOH, #4510 outlines a way to have a vat-replay-tool, which would disable consensusMode but not worry about divergences.

@michaelfig michaelfig added the automerge:no-update (expert!) Automatically merge without updates label Feb 9, 2022
@mergify mergify bot merged commit cd65fff into master Feb 9, 2022
@mergify mergify bot deleted the mfig-4506-enforce-consensus-mode branch February 9, 2022 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:no-update (expert!) Automatically merge without updates cosmic-swingset package: cosmic-swingset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consensus mode with verbose logging
2 participants