multisig icon indicating copy to clipboard operation
multisig copied to clipboard

Add functionality to ensure that a program referenced in a `Transaction` struct has not been updated by the time the transaction is executed

Open paul-schaaf opened this issue 2 years ago • 1 comments

paul-schaaf avatar Apr 03 '22 17:04 paul-schaaf

This could e.g. be achieved by adding a program_last_modified: Option<Slot> field to the Transaction struct that is None for < bpf3 programs and bpf3 programs where the upgrade authority is None and Some(X) for bpf3 programs with an upgrade authority where X equals the slot field on the Program Data account field at the time the Transaction is first proposed.

Inside execute_instruction the slot field on the Program Data account would be checked and the tx would fail if the slot != program_last_modified

paul-schaaf avatar Apr 03 '22 17:04 paul-schaaf