Motivation
SIMD-0194 is now active on mainnet-beta at epoch 943
The kit SDK currently uses the old terminology (lamportsPerByteYear, exemptionThreshold) and should be updated.
The key changes proposed are:
lamports_per_byte_year → renamed to lamports_per_byte (rent is no longer time-based)
DEFAULT_LAMPORTS_PER_BYTE changed from 3480 to 6960 (doubled to absorb the threshold)
exemption_threshold set to 1.0 and deprecated from the protocol
- Minimum balance formula simplified to
(ACCOUNT_STORAGE_OVERHEAD + data_len) * lamports_per_byte
The absolute lamports required for rent exemption does not change — 3480 * 2 = 6960 * 1.
Example use case
After this change, the SysvarRent type uses the updated terminology:
import { fetchSysvarRent } from '@solana/sysvars';
const rent = await fetchSysvarRent(rpc);
// New field name (SIMD-0194)
console.log(rent.lamportsPerByte); // 6960n (Lamports)
// Deprecated — still available for backward compatibility
console.log(rent.lamportsPerByteYear); // same value, marked @deprecated
console.log(rent.exemptionThreshold); // 1.0, marked @deprecated
Details
Affected packages and files
| Package |
File |
Change |
@solana/sysvars |
src/rent.ts |
Add lamportsPerByte to SysvarRent type; deprecate lamportsPerByteYear and exemptionThreshold; update codec field names |
@solana/rpc-parsed-types |
src/sysvar-accounts.ts |
Add lamportsPerByte to JsonParsedRentAccount; deprecate old fields |
@solana/rpc-graphql |
src/schema/type-defs/account.ts |
Add lamportsPerByte field to SysvarRentAccount GraphQL type |
@solana/kit |
src/get-minimum-balance-for-rent-exemption.ts |
Update constants to DEFAULT_LAMPORTS_PER_BYTE: 6960n, remove threshold multiplier (already deprecated, produces same result) |
Important considerations
-
On-chain binary layout is unchanged (17 bytes) — The current Rust Rent struct still occupies the same byte positions:
pub struct Rent {
pub lamports_per_byte: u64, // 8 bytes (renamed from lamports_per_byte_year)
#[deprecated]
pub exemption_threshold: [u8; 8], // 8 bytes (was f64, now raw bytes — same size)
#[deprecated]
pub burn_percent: u8, // 1 byte
}
The exemption_threshold field was changed from f64 to [u8; 8] in the Rust source to avoid floating-point operations, but it still occupies the exact same 8-byte slot. The SDK stores the known f64 bit patterns as byte-array constants (1.0f64 = [0,0,0,0,0,0,240,63]). Our kit codec decoding it as f64 will continue to work correctly since the binary representation is identical.
-
Backward compatibility — lamportsPerByteYear and exemptionThreshold should remain as @deprecated aliases so existing code continues to compile. They can be removed in the next major version.
-
No functional change to lamports amounts — 128 * 3480 * 2 = 128 * 6960 * 1 = 890,880 lamports for a zero-data account. The local getMinimumBalanceForRentExemption function will return the same values.
Questions -
- Should we rename
lamportsPerByteYear → lamportsPerByte as the primary field immediately, keeping the old name as a @deprecated alias or remove the deprecated field entirely?
- Should
exemptionThreshold be removed entirely now or in the next major version (v7)?
Motivation
SIMD-0194 is now active on mainnet-beta at epoch 943
The kit SDK currently uses the old terminology (
lamportsPerByteYear,exemptionThreshold) and should be updated.The key changes proposed are:
lamports_per_byte_year→ renamed tolamports_per_byte(rent is no longer time-based)DEFAULT_LAMPORTS_PER_BYTEchanged from3480to6960(doubled to absorb the threshold)exemption_thresholdset to1.0and deprecated from the protocol(ACCOUNT_STORAGE_OVERHEAD + data_len) * lamports_per_byteThe absolute lamports required for rent exemption does not change —
3480 * 2 = 6960 * 1.Example use case
After this change, the
SysvarRenttype uses the updated terminology:Details
Affected packages and files
@solana/sysvarssrc/rent.tslamportsPerBytetoSysvarRenttype; deprecatelamportsPerByteYearandexemptionThreshold; update codec field names@solana/rpc-parsed-typessrc/sysvar-accounts.tslamportsPerBytetoJsonParsedRentAccount; deprecate old fields@solana/rpc-graphqlsrc/schema/type-defs/account.tslamportsPerBytefield toSysvarRentAccountGraphQL type@solana/kitsrc/get-minimum-balance-for-rent-exemption.tsDEFAULT_LAMPORTS_PER_BYTE: 6960n, remove threshold multiplier (already deprecated, produces same result)Important considerations
On-chain binary layout is unchanged (17 bytes) — The current Rust Rent struct still occupies the same byte positions:
The
exemption_thresholdfield was changed fromf64to[u8; 8]in the Rust source to avoid floating-point operations, but it still occupies the exact same 8-byte slot. The SDK stores the known f64 bit patterns as byte-array constants (1.0f64=[0,0,0,0,0,0,240,63]). Our kit codec decoding it asf64will continue to work correctly since the binary representation is identical.Backward compatibility —
lamportsPerByteYearandexemptionThresholdshould remain as@deprecatedaliases so existing code continues to compile. They can be removed in the next major version.No functional change to lamports amounts —
128 * 3480 * 2 = 128 * 6960 * 1 = 890,880lamports for a zero-data account. The localgetMinimumBalanceForRentExemptionfunction will return the same values.Questions -
lamportsPerByteYear→lamportsPerByteas the primary field immediately, keeping the old name as a@deprecatedalias or remove the deprecated field entirely?exemptionThresholdbe removed entirely now or in the next major version (v7)?