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

Add public API BlockStore.Rollback #8574

Closed
wants to merge 2 commits into from

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented May 18, 2022

The context: #8223 (comment), #8493

So although the newest tendermint has implemented the "validate block before persist", but since the production node could be still using the old version, and when app hash mismatch happens, the pending block is already persisted, so we still want to be able to delete that pending block manually.
By exposing this public API, we can do the block store rollback in the application side.

CHANGELOG_PENDING.md Outdated Show resolved Hide resolved
@cmwaters
Copy link
Contributor

but since the production node could be still using the old version, and when app hash mismatch happens

We did backport these changes to v0.34. I just don't think we've cut a point release yet

@yihuang
Copy link
Contributor Author

yihuang commented May 20, 2022

but since the production node could be still using the old version, and when app hash mismatch happens

We did backport these changes to v0.34. I just don't think we've cut a point release yet

Since the current production nodes are running with old versions, and even if we release a new patch version, they don't necessarily all upgrade in time, so I think it's good to support an optional --delete-pending-block flag in the rollback command in cosmos-sdk (only in 0.45). For example, we already have a case at hand, where there's a pending block, without this functionality, we need to create some ad-hoc tool to delete that pending block anyway (it also needs a public API for convenience, otherwise we need to deal with the raw keys).

@cmwaters
Copy link
Contributor

By pending block you mean a block that has been committed but hasn't been executed yet?

@yihuang
Copy link
Contributor Author

yihuang commented May 25, 2022

By pending block you mean a block that has been committed but hasn't been executed yet?

Yeah, more specifically, it's in the block store, but not state store.
To make sure we can rollback a block in state, we have to delete that block in block store.

@github-actions
Copy link

github-actions bot commented Jun 4, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale for use by stalebot label Jun 4, 2022
@yihuang
Copy link
Contributor Author

yihuang commented Jun 7, 2022

don't stale

@github-actions github-actions bot removed the stale for use by stalebot label Jun 8, 2022
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale for use by stalebot label Jun 18, 2022
@github-actions github-actions bot closed this Jun 22, 2022
arno01 pushed a commit to arno01/cometbft that referenced this pull request Nov 14, 2023
Based on tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372
arno01 pushed a commit to arno01/cometbft that referenced this pull request Nov 14, 2023
Based on tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5
arno01 pushed a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
Based on tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5
arno01 pushed a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
Based on tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5
arno01 pushed a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
Based on tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5
arno01 pushed a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
Based on tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5
arno01 added a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
- add TestRollback tests

Based on HuangYi work tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5
arno01 added a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
- add TestRollback tests

Based on HuangYi work tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5

---------

Co-authored-by: HuangYi <huang@crypto.com>
arno01 added a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
- add TestRollback tests

Based on HuangYi work tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

Depends on cosmos/cosmos-sdk@51d2de5

---------

Co-authored-by: HuangYi <huang@crypto.com>
arno01 added a commit to arno01/cometbft that referenced this pull request Nov 15, 2023
- add TestRollback tests

Based on HuangYi work tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

---------

Co-authored-by: HuangYi <huang@crypto.com>
arno01 added a commit to arno01/cometbft that referenced this pull request Nov 16, 2023
- add TestRollback tests

Based on HuangYi work tendermint/tendermint#8574/81344ac9464db02421fa115041f162ab9ace9372

---------

Co-authored-by: HuangYi <huang@crypto.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale for use by stalebot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants