Hi,
I am looking into small fixes that could improve the situation with regard to concurrency, as described in this thread, and as implemented in this MR.
The various small fixes that I have in mind are the following:
- A self-lock preventing re-entrency by default. Re-entrency is a common vector of attacks, and except when it is actively needed, it might be good to disallow it by default.
- Add a flag to be called as a DFS contract. All operations calling a contract with this flag are treated as
DFS
operations. - Add a
MAKE_STERILE
instruction, that prevents an internal operation from spawning children operations. (After more thinking about it, it is less useful than envisioned, but possibly, other people have other ideas.)
From @murbard’s comment:
- Preventing
MAKE_DFS
in contracts called by legacy contracts. - Explicitly adding an opcode
ALLOW_DFS
that lets children contracts useMAKE_DFS
.