You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current ABCI 1.0 implementation (v0.47) allows the app to pick up transactions until it reaches the block tx payload size limit but not based on the block gas limit. There is a case that might happen the proposer pick-up transactions meet the block transaction payload size but the total gas consumes exceeds the block gas limit (unless the setup can fulfill the block tx payload before reaching the block gas limit or the chain has the unlimited gas block). Therefore, the SDK set the BlockMaxGas during the BeginBlock stage, and then the CometBFT running DeliverTx to the app, the app will return runTx fail due to the block out-of-gas. In the end, some proposed transactions cannot be processed and will be removed from the mempool of the app. It will decrease blockchain transaction and data efficiency.
Proposal
Add BlockGasMeter to PrepareProposal/ProcessProposal, and then the handlers can use it to fulfill a new block based on it. But it also relies on the anti-handler to return correct tx gasused info during runTx under this two runTxMode.
The text was updated successfully, but these errors were encountered:
See the comment in the PR body. Since we do not execute the entire proposal (i.e. execute the messages) in the SDK's default handlers, we cannot know if block gas will be exceeded.
Problem Definition
The current ABCI 1.0 implementation (v0.47) allows the app to pick up transactions until it reaches the block tx payload size limit but not based on the block gas limit. There is a case that might happen the proposer pick-up transactions meet the block transaction payload size but the total gas consumes exceeds the block gas limit (unless the setup can fulfill the block tx payload before reaching the block gas limit or the chain has the unlimited gas block). Therefore, the SDK set the
BlockMaxGas
during theBeginBlock
stage, and then the CometBFT runningDeliverTx
to the app, the app will returnrunTx
fail due to the block out-of-gas. In the end, some proposed transactions cannot be processed and will be removed from the mempool of the app. It will decrease blockchain transaction and data efficiency.Proposal
Add BlockGasMeter to PrepareProposal/ProcessProposal, and then the handlers can use it to fulfill a new block based on it. But it also relies on the anti-handler to return correct tx gasused info during
runTx
under this two runTxMode.The text was updated successfully, but these errors were encountered: