Data retention: Pay for blockchain payloads
Right now the payer is only charged for payloads that are broadcast on the XMTPD network.
All commits / identityUpdates etc are paid in blockchain money (USDC) by the payer directly to the blockchain.
The operators still incur a cost for storing these and there needs to be a cost associated.
The XIP specifies a cap of 90 days, rather than infinite or similar.
The challenge here is that to calculate the baseFee we must assign a stable timestamp to the payload. This can be done by reading the block time. That is an expensive operation and we definitely do not want to check the block for every event processed by the indexer.
There has to be a better way.
@neekolas @deluca-mike @fbac
Revisiting and bumping this.
Currently we store group messages and identity updates with an expiry of MaxInt64, essentially, forever.
When indexing a new event it comes with a BlockTimestamp field that could be used easily to store it with the 90 days expiration, or even ignore it if the event is older. Same as for calculating fees.
Pulling into iteration for discussion
@mkysel I believe after latest discussions this can be closed?
I would prefer to keep it in the "not today" bucket, since it might come back to haunt us :)