Skip to content

tests: programs/sbf: use default rent - #16473

Merged
buffalojoec merged 1 commit into
anza-xyz:masterfrom
buffalojoec:sbf-tests-default-rent
Oct 28, 2026
Merged

buffalojoec merged 1 commit into
anza-xyz:masterfrom
buffalojoec:sbf-tests-default-rent

Conversation

@buffalojoec

Copy link
Copy Markdown

Problem

I noticed the default Rent for runtime's genesis_utils::create_genesis_config & family is Rent::free. This is fine for a lot of the test suites that use it - like core - but for programs/sbf this creates a footgun for testing that could be problematic.

Summary of Changes

Switch all of the programs/sbf tests over to use Rent::default.

Since there were already plenty of constructors in runtime/src/genesis_utils.rs, I added one more under DCOU that affirmatively adds the Rent::default parameter. Trying to modify or reuse one of the existing ones was more trouble than it was worth.

Also factors some tests and updates lamports balances throughout, now that rent is required.

Testing

Updates existing tests.

@buffalojoec
buffalojoec marked this pull request as ready for review October 28, 2026 04:14
@buffalojoec
buffalojoec requested a review from a team as a code owner October 28, 2026 04:14
@buffalojoec
buffalojoec enabled auto-merge October 28, 2026 04:14
@buffalojoec
buffalojoec force-pushed the sbf-tests-default-rent branch from ec47daf to afa6a37 Compare October 28, 2026 09:40
@Lichtso

Lichtso commented Oct 28, 2026

Copy link
Copy Markdown

You will have to rebase to silence cargo audit

@buffalojoec
buffalojoec force-pushed the sbf-tests-default-rent branch from afa6a37 to c5db2cf Compare October 28, 2026 10:34
@buffalojoec
buffalojoec force-pushed the sbf-tests-default-rent branch from c5db2cf to 9b4be88 Compare October 28, 2026 11:34
@buffalojoec
buffalojoec added this pull request to the merge queue Oct 28, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.3%. Comparing base (3b99835) to head (9b4be88).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #16473     +/-   ##
=========================================
- Coverage    82.5%    82.3%   -0.2%     
=========================================
  Files         955      955             
  Lines      373598   373609     +11     
=========================================
- Hits       308230   307706    -524     
- Misses      65368    65903    +535     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Merged via the queue into anza-xyz:master with commit 9c0c3d9 Oct 28, 2026
51 checks passed
@buffalojoec
buffalojoec deleted the sbf-tests-default-rent branch October 28, 2026 12:09
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.

3 participants