Skip to content

Conversation

@deanmlittle
Copy link

Problem

A very old issue solana-labs#23219 of the Ed25519 program belonging to System Program rather than the Native Loader program has once again resurfaced. At the time, it was not resolved in a way that results in a consistent program owner across all clusters. As a result, the recent activation of SIMD-0186 has broken the Ed25519 precompile on the testnet cluster due to this branch of code now correctly enforcing the behavior we should have solved for:

if !native_loader::check_id(owner_id) && !PROGRAM_OWNERS.contains(owner_id) {
error_metrics.invalid_program_for_execution += 1;
return Err(TransactionError::InvalidProgramForExecution);
}

Summary of Changes

This PR implements solana-foundation/solana-improvement-documents#417, introducing a feature gate that, when activated on testnet, updates the owner of the Ed25519 program to the Native Loader program and explicitly flags it as executable. All other account fields remain unchanged. No functionality changes occur on mainnet or devnet.

Fixes solana-labs#23219

@mergify mergify bot requested a review from a team November 27, 2025 02:52
),
(
assign_ed25519_precompile_to_native_loader::id(),
"Assign Ed25519 Precompile to native loader",

Choose a reason for hiding this comment

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

I was going to suggest prefixing this message with "Testnet:", but that might actually be more confusing. Leaving this comment here for anyone who might want the prefix.

Comment on lines +5375 to +5380
let new_account = AccountSharedData::from(Account {
owner: native_loader::ID,
executable: true,
data: b"ed25519_program".to_vec(),
..Account::from(account)
});

Choose a reason for hiding this comment

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

You can just use the WritableAccount trait to mutate the retrieved account directly, then store it back.

https://github.com/anza-xyz/solana-sdk/blob/336ebba61c778518a60a781475a4e9e625212b63/account/src/lib.rs#L185

@deanmlittle
Copy link
Author

closing as the testnet validators have finally figured out how to use the ledger tool.

@deanmlittle deanmlittle deleted the assign-ed5519-program-to-native-loader branch December 13, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants