Comments (7)
here we have the reference shim we need to follow. https://github.com/hyperledger/fabric/blob/13447bf5ead693f07285ce63a1903c5d0d25f096/core/chaincode/shim/interfaces_stable.go
I guess what you are supposing is, that we want to extend the shim in a way that the chaincode developer can perform logging easily.
Currently, a chaincode developer can just include common/logging.h
and use LOG_DEBUG
, LOG_INFO
, and LOG_ERROR
.
from fabric-private-chaincode.
Clearly we don't want to add new bell's and whistle for logging, just (a) i think FPC chaincode should only use services from shim.h when interacting with infrastructure and (b) the logging namespace should be separated between logging done by the shim itself vs logging done by the FPC chaincode.
from fabric-private-chaincode.
yes, this sounds right to me
from fabric-private-chaincode.
Note PR #137 added some (tentative) function prototypes to shim.h
but no implementation yet ..
from fabric-private-chaincode.
Observations on #137 prototypes by Marcus ...
Seems this is aligned with Fabric 1.4.x. This is good.
In Fabric 2.0, however, chaincode logging is the responsibility by the chaincode developer.
https://hyperledger-fabric.readthedocs.io/en/master/logging-control.htmlSince this is not easily possible with FPC I still think its a good idea to provide this logging to the user. I believe we can only reduce the number of different log levels we want to support. Maybe just ERROR | WARNING | INFO | DEBUG ?
We definitely still should have logging-level edl functions as eventually with our own untrusted stub/shim we still want to be able to route (trusted) shim log-messages to peer. Given that we do not really have a full libc available, i think we also still would have to provide some logging functionality to user, but then on untrusted side might just throw it directly to stdout (rather than as right now to logger which then passes it to stdout ..)
from fabric-private-chaincode.
This might be semi-obsolete for fabric v2 as chaincode logging completely disappeared and everything is "punted" to stdout/stderr. Although given that by default an enclave doesn't have stdout/stderr, we might though still have some "official" debug api (or at least officially promote printing to stdout/stderr to shim.h?
from fabric-private-chaincode.
This might be semi-obsolete for fabric v2 as chaincode logging completely disappeared and everything is "punted" to stdout/stderr. Although given that by default an enclave doesn't have stdout/stderr, we might though still have some "official" debug api (or at least officially promote printing to stdout/stderr to shim.h?
ack - FPC should provide a simple logging API for debugging. I would say keeping logging.h
and give FPC chaincode developers the chance to include it whenever they need it.
from fabric-private-chaincode.
Related Issues (20)
- Update ECDSA signature
- Add support for: (i) Proposal's Transient and (ii) Idemix HOT 1
- test.sh: peer-cli-assist command does not exist in '/project/src/github.com/hyperledger/fabric-private-chaincode/utils/fabric' HOT 2
- How to interact with FPC go simple asset tutorial chaincode from a new terminal HOT 1
- Failed to connect to 127.0.0.1 port 8080: Connection refused HOT 7
- I cannot run `make` successfully, hint "Options file not found" HOT 2
- How could I obtain the keys of the enclave in chaincode? HOT 1
- Upgrade ego to v1.2 HOT 3
- Docker commands are not found inside the development environment HOT 5
- Problem of Build Fabric Private Chaincode HOT 4
- Upgrade yq from v3.x to v4.x HOT 1
- CI, Golint Check before building PR HOT 2
- Correct steps for Option 1 in readme to contemplate alternatives
- Restructure Readme to more of a tree like approach HOT 7
- CI CD build error HOT 4
- Get error if use different chaincode with Fabric Smart Client
- Fabric image missing when running sample HOT 1
- Use caching CI builds HOT 10
- pull access denied for fpc/fpc-simple-asset-go-hw, failed to parse connections: EOF HOT 5
- Improve OpenSSF Scorecard report
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabric-private-chaincode.