hyperledger / hyperledger/fabric-private-chaincode
define 'static' state trap
Open
- Dominant language
- Go
- Stars
- 174
- Forks
- 98
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.