Conversation
| if block == nil { | ||
| logger.Debug("prevote step: ProposalBlock is nil") | ||
| cs.signAddVote(ctx, tmproto.PrevoteType, nil, types.PartSetHeader{}) |
There was a problem hiding this comment.
if we add this here then we probably don't need this part anymore right?
https://github.com/sei-protocol/sei-tendermint/pull/26/files#diff-c27a58d5a8b3c15166169543b3cdb94da91bb60efa27609ef446719474af78c5R1682-R1687
There was a problem hiding this comment.
yeah that's right. Removed
internal/consensus/state.go
Outdated
| proposalBlock := cs.buildProposalBlock(height, block.Header, block.LastCommit, block.Evidence, block.ProposerAddress, txKeys) | ||
| if proposalBlock == nil { | ||
| if block == nil { | ||
| logger.Debug("prevote step: ProposalBlock is nil") |
There was a problem hiding this comment.
Should we make this Error or info instead? Unless we expect the proposal block to be nil often
There was a problem hiding this comment.
yeah this should be Error. Updated
| for _, tx := range cs.ProposalBlock.Txs { | ||
| blockTxKeyToTx[tx.Key()] = tx | ||
| } | ||
| for _, missingTxKey := range missingTxKeys { |
There was a problem hiding this comment.
Any chance of this causing a race condition between different validator nodes?
There was a problem hiding this comment.
this part is likely to run differently for different validators, which is kind of the point of doing it here, since different validators will have different min gas app configs so some txs might be accepted by some vals but rejected by others, and we want those who would reject those txs to reject (i.e. vote nil) its enclosing block right here. Since this isn't part of block processing, difference in validator behaviors should be fine
|
Tested this out e2e with LT cluster on 2.0.0beta, going to merge this |
## Describe your changes and provide context sei-protocol/sei-tendermint#26 ## Testing performed to validate your change
* CheckTx for txs from peer proposal * address comments
[acl] Refactor message dependency mapping to use single key instead module+message
## Describe your changes and provide context sei-protocol/sei-tendermint#26 ## Testing performed to validate your change
## Describe your changes and provide context sei-protocol/sei-tendermint#26 ## Testing performed to validate your change
Describe your changes and provide context
At the moment, if a tx is all of the following:
then
CheckTxwon't be run for it, which could cause problems with ante handlers that are CheckTx-only (e.g. min gas config check).This PR makes it such that for txs from peer proposal that are not already in the local mempool, the validator will run
CheckTxfor them before prevoting the proposed block. Note thatCheckTxwill also insert the tx into the local mempool if the application check passes.Testing performed to validate your change
tested with local chain
will test with multiple nodes with mempool gossiping turned off once merged and released