Skip to content

Conversation

@tobias-nd
Copy link
Contributor

No description provided.

@joncinque joncinque requested a review from rustopian November 7, 2025 14:18
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Also asking for a recommendation about create_account_allow_prefund, but maybe we wait to include that until it's been enabled

Comment on lines +315 to +320
/// # Security issues
///
/// Using this function is a security issue if the `to_address` is predictable
/// by an attacker. The attacker can prefund the address with lamports and
/// thereby prevent the successful execution of the `create_account` call. This
/// can DoS an on-chain program.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This makes sense to me! Should we add a call-out to use create_account_allow_prefund to avoid the error? cc @rustopian

Copy link
Contributor

Choose a reason for hiding this comment

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

Excellent. Yes, we should recommend CreateAccountAllowPrefund here in any case where to_address could be predictable ... once the feature is active.

Copy link
Contributor

@rustopian rustopian left a comment

Choose a reason for hiding this comment

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

Looks great. We can amend to additionally mention CreateAccountAllowPrefund as a safer alternative later, after activation.

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@joncinque joncinque merged commit 488a3ca into anza-xyz:master Nov 7, 2025
26 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.

3 participants