Assessment reports>Chainflip Backend>Threat Model>Function: force_witness

Function: force_witness

Allows any call to be forcefully dispatched by the root, provided that

  • The epoch_index has not expired.

  • The call hash and epoch_index have at least one registered vote:

    ensure!(Votes::::contains_key(epoch_index, call_hash), Error::::InvalidEpoch);

The function does not check that the hash is not registered in CallHashExecuted pallet storage to prevent replays; however, it does insert the hash there to record that the call has been made. So, the function may replay a call, but it prevents other methods of executing a call (directly witnessing and executing, or scheduling — ideally) from executing in the future.

Zellic © 2024Back to top ↑