-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
C:mempoolComponent: MempoolComponent: MempoolT:securityType: Security (specify priority)Type: Security (specify priority)
Description
ABCI gas wanted is an int64, therefore the app can return negative gas wanteds. In the case of the SDK, this happens since we naively cast a uint64 to int64. In the mempool reap / postcheck, we will just allow this to decrement the gas wanted, and we will in essence propose / accept blocks with too much gas.
Potential Fixes:
- Define this as desired behavior (this isn't unreasonable, negative gas wanteds could represent free-ing gas on chain. That would be changing gas from the definition we use, which is to measure computational time due to txs). Then we must make the SDK not naively cast the gas wanted field, since that will allow very overfilled blocks.
- Make ABCI.GasWanted a uint64
- Make the mempool postcheck ensure that gas wanted is positive
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C:mempoolComponent: MempoolComponent: MempoolT:securityType: Security (specify priority)Type: Security (specify priority)