Skip to content

deprecate initialize(), Initialize, AuthorizeWithSeed, and AuthorizeCheckedWithSeed #56

@2501babe

Description

@2501babe

after bpf stake launches we can think about incrementally tightening up the interface and this is the second item on my wishlist after removing sysvars. we should force everyone through InitializeChecked and add a new initialize_checked_with_lockup() builder which returns Vec<Instruction> including a SetLockupChecked. in the next major sdk version (but we control this code so it isnt clear to me how we coordinate the versioning) we can make initialize() a wrapper on one or the other

we may have to support Initialize for all eternity, but this should at least make it safe to eventually remove AuthorizeWithSeed and AuthorizeCheckedWithSeed, which are quite confusing, and (as far as i have been able to divine) useless, except to prevent a case where someone accidentally sets a seed account as an authority, considering such an authority cannot actually be used for any stake operation

pushing users through InitializeChecked ensures they can sign with the withdrawer directly, and the withdrawer can change both authorities

Metadata

Metadata

Assignees

No one assigned

    Labels

    programrelated to the core bpf program itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions