Skip to content

feat: add surfnet_offlineAccount RPC method#566

Merged
MicaiahReid merged 9 commits intosolana-foundation:mainfrom
CanardMandarin:main
Mar 26, 2026
Merged

feat: add surfnet_offlineAccount RPC method#566
MicaiahReid merged 9 commits intosolana-foundation:mainfrom
CanardMandarin:main

Conversation

@CanardMandarin
Copy link
Contributor

This PR aims to fix #563 by adding a new cheatcode that prevents downloading an account and accounts its owns.

Half of the work was already done thanks to the existing closed_accounts logic.
I just renamed it blocked_accounts to be more generic.

/// Tracks accounts that have been explicitly closed by the user.
/// These accounts will not be fetched from mainnet even if they don't exist in the local cache.
pub closed_accounts: HashSet<Pubkey>,

The filtering happens at fetch time in SurfnetSvmLocker::filter_downloaded_account_result that I call in get_account_local_then_remote and get_multiple_accounts_with_remote_fallback.

@MicaiahReid MicaiahReid self-requested a review March 18, 2026 16:10
@MicaiahReid MicaiahReid force-pushed the main branch 5 times, most recently from 5419677 to 2129ad9 Compare March 23, 2026 19:40
Copy link
Collaborator

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @CanardMandarin!

@MicaiahReid MicaiahReid changed the title feat: block accounts per program id feat: add surfnet_offlineAccount RPC method Mar 26, 2026
@MicaiahReid MicaiahReid merged commit 4521c6e into solana-foundation:main Mar 26, 2026
2 of 4 checks passed
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.

Create surfnet_blockAccountDownload cheatcode

2 participants