Skip to content

Fix precompiles build with solana-rent 3.x#318

Closed
rolnimar wants to merge 1 commit intoLiteSVM:masterfrom
rolnimar:fix/solana-rent-3-precompiles
Closed

Fix precompiles build with solana-rent 3.x#318
rolnimar wants to merge 1 commit intoLiteSVM:masterfrom
rolnimar:fix/solana-rent-3-precompiles

Conversation

@rolnimar
Copy link
Copy Markdown

@rolnimar rolnimar commented Apr 8, 2026

Summary

Fix the precompiles feature build when litesvm resolves solana-rent 3.0.0.

Problem

litesvm declares:

solana-rent = "3.0"

but the precompiles path currently uses:

solana_rent::DEFAULT_LAMPORTS_PER_BYTE

That constant is not available in solana-rent 3.0.0, so precompiles fails to compile in a valid dependency resolution within the declared supported range.

## Why this fix is correct

The value is assigned to:

rent_account.lamports_per_byte_year

so solana_rent::DEFAULT_LAMPORTS_PER_BYTE_YEAR is the correct constant for that field.

This change keeps the fix narrowly scoped to that one issue and restores compatibility across the declared 3.x support range.

Use DEFAULT_LAMPORTS_PER_BYTE_YEAR when initializing the rent sysvar for the precompiles feature. litesvm declares solana-rent = "3.0", and DEFAULT_LAMPORTS_PER_BYTE_YEAR exists across the supported 3.x range, while DEFAULT_LAMPORTS_PER_BYTE is not available in solana-rent 3.0.0.
@rolnimar rolnimar force-pushed the fix/solana-rent-3-precompiles branch from 062b006 to a2cadf1 Compare April 8, 2026 12:07
@kevinheavey
Copy link
Copy Markdown
Collaborator

slop

@kevinheavey kevinheavey closed this Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants