Skip to content

Implement MaxGas #2310

@ebuchman

Description

@ebuchman

As of #2184 we limit the size of the block in bytes.

Additionally, we'd like to limit the size of the block in terms of some application controlled quantifier of resources, called "gas".

Each DeliverTx returns an amount GasUsed. The total GasUsed by the block must be less than the BlockSize.MaxGas consensus param.

Each CheckTx returns an amount GasWanted. The Application must enforce GasUsed < GasWanted. We must track the GasWanted in the mempool so we can reap txs within the gas limit.

Reap should be limited by Gas & Bytes - whichever limit is reached first.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions