Coin Brief ENDE

Agave removes the code that rewrote an account's rent epoch depending on writability

Anza merged pull request #16914 into Agave on 25 November, deleting the logic in the Solana Virtual Machine that set or adjusted an account's rent epoch depending on whether the account was writable in a transaction. The reason given is that the default rent epoch for both Account and AccountSharedData is now Epoch::MAX, which makes the adjustment pointless: AccountPrivateFields always carries Epoch::MAX.

The field is a leftover of rent collection. Solana charged accounts rent until exemption became effectively universal, and rent_epoch marked when an account would next be looked at. Once accounts are rent exempt the value is conventionally set to u64::MAX, the same number as Epoch::MAX, so code that recomputed it during execution was writing a constant in a roundabout way while leaving the impression that the number still meant something.

The change is confined to the SVM: the pull request removes all code setting or adjusting rent_epoch from is_writable and leaves the private field constant. Coverage checks on the pull request report that all modified lines are covered by tests, with project coverage at 81.8%.

Agave removes the code that rewrote an account's rent epoch depending on writability
Agave removes the code that rewrote an account's rent epoch depending on writability — Coin Brief

Why it matters

A field that is always the same value but is still being written by execution code is a trap for anyone reading it later, and for anyone implementing a second client against observed behaviour. Removing the write is smaller than removing the field, and it makes the remaining constant honest.

Written by Victoria Shinder.