Client: forbid origination of contracts containing timelock instructions
Context
This MR adds a check before originating a contract and rejects any contracts containing timelock opcodes, following the recent discovery of a vulnerability.
Manually testing the MR
dune exec tezt/tests/main.exe -- --verbose --file timelock.ml
Or try to originate a contract containing a timelock instruction in mockup:
tezos-client --mode mockup originate contract timelock transferring 0 from bootstrap1 running file:src/proto_alpha/lib_protocol/test/integration/michelson/contracts/timelock.tz --init "0xaa" --burn-cap 1
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR