From 3a69ca03200493f79c63308974044528d1936b25 Mon Sep 17 00:00:00 2001 From: b00f Date: Thu, 14 Nov 2024 22:01:20 +0800 Subject: [PATCH] PIP-31: add pending consumptions (#199) * PIP-31: add pending consumptions * PIP-31: add pending consumptions --- PIPs/pip-31.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PIPs/pip-31.md b/PIPs/pip-31.md index 968ab97..f01d64a 100644 --- a/PIPs/pip-31.md +++ b/PIPs/pip-31.md @@ -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 $ @@ -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,