namada icon indicating copy to clipboard operation
namada copied to clipboard

Drop write log changes on failed governance proposal

Open grarco opened this issue 10 months ago • 0 comments

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.

grarco avatar Apr 15 '24 09:04 grarco