Skip to content

Commit

Permalink
PIP-31: add pending consumptions (#199)
Browse files Browse the repository at this point in the history
* PIP-31: add pending consumptions

* PIP-31: add pending consumptions
  • Loading branch information
b00f authored Nov 14, 2024
1 parent 1dc2c3c commit 3a69ca0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions PIPs/pip-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ Transactions are sequences of bytes that validators decode, process, and store i
Consumption is defined as the number of bytes stored over the last 8,640 blocks [^1]
for a specific account that signed the transactions.

If an account has any pending transactions in the pool,
these are considered "pending consumption" and contribute to the account's overall consumption value.

#### Coefficient

The coefficient is a unitless number that starts at zero and grows naturally: $0, 1, 2, 3, \dots $
Expand Down Expand Up @@ -104,6 +107,9 @@ increasing the value for each address by the size of its transactions.
Simultaneously, the block from 8640 blocks ago would be retrieved,
and the value for each address would be decreased by the size of its transactions.

To calculate pending consumption, we iterate over all transactions in the pool
to determine the pending consumption for each specific account.

#### New Account Detection

To determine if an account is new and hasn't sent any transactions yet,
Expand Down

0 comments on commit 3a69ca0

Please sign in to comment.