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
Allow error responses for BeginBlock and EndBlock #3755
Comments
You can use
|
Hi @melekes Thanks for the quick response. We already did that setup for our network as you can see from our genesis definition here. Also at our config.toml we got the following config:
But even having that setup two blocks were generated on the same second. At the following wal log you can see how blocks 448299 and 448300 were generated in the second
|
Independently whether or not |
#1909 is somewhat related |
This was an early design decision to process blocks after there is consensus. This means some txs may be invalid. There's been some discussion about at least running checktx before voting to avoid invalid txs. There's also https://github.com/tendermint/tendermint/issues/2639 In any case, until then, it's not clear it would make sense for begin/endblock to return errors as there's no way for tendermint to handle them, since the block was already committed! Do you think we can close this? |
That matches with my latest findings after reverse engineering the code which creates, approve and persists the blocks. As there is no pending work to do on this issue and question was answered I proceed to close the issue. Thanks for the clarification @ebuchman |
Description
At the current implementation of an ABCI Application it is not allowed to return errors, although the ABCI LocalClient does implement the error output. Implementation has been pasted below for verification.
As far as my understanding is, in the current implementation it is not possible to reject/deny a new block in case the block headers are not compliant with the application logic.
For instance, in my particular case, we implement an ethereum compatible blockchain and there is a restriction/validation to not have two consecutive blocks in the same second, and that cannot be prevented with the current implementation.
Code
github.com/tendermint/tendermint/abci/types/application.go
github.com/tendermint/tendermint/abci/types/local_client.go
The text was updated successfully, but these errors were encountered: