-
Notifications
You must be signed in to change notification settings - Fork 30
Description
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