fabric-private-chaincode
fabric-private-chaincode copied to clipboard
define 'static' state trap
it's common for C programmer to define state in static variable. With the current single peer-reuse-enclave version this actually works "nicely" -- i (MST) accidentally tested it :-) -- but obviously not as intended. If a C-based chaincode type remains, we might consider ways to reduce this risk:
- e.g., adding to cmake a script which issues a warning if fpc code contains static (unless they contain a pre-defined marker as comment or alike)
- some function/classes where the programmer can use this 'define static variable' approach and it is transparently read/written from state.