Validate current assumption of ledger behavior
Description
PR #501 assumes -- as experiments with fabric seemed surprisingly to have shown .. -- that fabric always returns only the commit value, even if the chaincode in the current transaction has issued a putState. On the other hand, fpc currently allows multiple putStates (with the last one counting). As fabric behaviour seems a bit surprising and we might have missed some other subtleties which could lead to behavior which is unexpected to chaincode developer (and potentially insecure) we should cross-check with fabric maintainers ...
Link to feature or bug
Link to dependent issues
Notes:
at the time #501 was merged, FPC updates the read/write set in shim.cpp and behaves as follows for a given key k:
- only the hash of the first
read(k)is stored - the values of subsequent
read(k)calls (to Fabric) are checked against the stored hash; if the hash is different, the read fails - only the value of the most recent
write(k,v)is stored