Bug found by auditors:
Due to the way action handling is done, unexpected behaviors can be noted.
a transactions action's stateful checks are ran together in parallel. Then the actions are executed.
Action 1 -> check_stateful()
Action 2 -> check_stateful()
...
Action 1 -> Execute()
Action 2 -> Execute()
This means that certain actions could have unforseen consequences. Imagine 2 BridgeSudoChangeAction actions which have been bundled into 1 tx, they would both execute even if the first action changes the sudo address because the stateful checks of both actions are executed before the execute
async fn check_stateless(&self) -> anyhow::Result<()> {
ensure!(!self.actions.is_empty(), "must have at least one action");
for action in &self.actions {
match action {
┆Issue Number: ENG-666
Bug found by auditors:
┆Issue Number: ENG-666