namada
namada copied to clipboard
Drop write log changes on failed governance proposal
https://github.com/anoma/namada/blob/621cce94399e3ce5088e07dfff842f438b216103/crates/apps/src/lib/node/ledger/shell/governance.rs#L367-L387
Here we match the result of executing the proposals but it looks like we don’t drop the state in the case the execution was not accepted meaning that the changes are kept in the write log. These could be committed later in finalize_block
leading to the governance proposal being effectively executed even if the actual wasm code was rejected. If instead the next call to shell.state
is a drop
instead of a commit
then we should be fine but it means that there is some non-determinism based on what the next call will be to the write log will be.