-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement FISCO BCOS adapter #515
Conversation
A great addition, 👍 |
Hi, thanks for this PR and I'm sorry it is taking so long to get it reviewed We are keen to get this into the code base though there are a few (small) hurdles first:
We welcome any conversation on the above both here and in the rocket chat channel: https://chat.hyperledger.org/channel/caliper-contributors Thanks! |
Yes, I'm glad to accept that 2 requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vita-dounai Thanks for this PR 👍 Just a few minor review comments. The sample really helps - we should probably get this into the CI build too so that we can ensure continued operation. Happy to assist you with that either as part of this PR, or in a new PR
Looks like fiscoBcosApi.js has an unused import os
too
* @return {Promise<object>} The promise for the result of the execution. | ||
*/ | ||
async invokeSmartContract(context, contractID, contractVer, args, timeout) { | ||
const fiscoBcosSettings = CaliperUtils.parseYaml(this.configPath)['fisco-bcos']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it required to parse this here, or could it be cached? The invokeSmartContract
is a hot path, so if repeated parsing can be avoided, it will be more efficient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved :)
* @return {any} The result of the query. | ||
*/ | ||
async queryState(context, contractID, contractVer, key, fcn) { | ||
const fiscoBcosSettings = CaliperUtils.parseYaml(this.configPath)['fisco-bcos']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as that in invokeSmartContract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved :)
"branches": 8, | ||
"functions": 7, | ||
"lines": 5 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are also including a license checker now, to ensure that all files have the correct license during the CI build process. This is performed at the package level, with the check being started as a pre test
phase. Would you be willing to include/use the same settings as the other packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test is valid now
In order to enable a merge, you will need to sign the commits - the DCO bot will prevent merge without doing so. Details here |
This pull request introduces 1 alert when merging 385ec32 into 6ddd600 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging dbbbff6 into 6ddd600 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging cb2a5a9 into 6ddd600 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging bee69f6 into 6ddd600 - view on LGTM.com new alerts:
|
Thanks for your reviewing! I will improve my code after Oct. 7th because I am a little busy recently for doing another stuff :) |
This pull request introduces 11 alerts when merging 6c76e34 into 3f9293a - view on LGTM.com new alerts:
|
This pull request introduces 11 alerts when merging e740461 into 3f9293a - view on LGTM.com new alerts:
|
signature now is off |
Hello, I've revised my code by following your modification opinions, please take a look:) @nklincoln |
author Chenxi Li <[email protected]> 1565147492 +0800 committer Chenxi Li <[email protected]> 1569833600 +0800 implements FISCO BCOS adapter Signed-off-by: Chenxi Li <[email protected]>
@nklincoln Hi,could you please review this PR?^_^ |
@vita-dounai - we're trying to get this running locally but the adaptor does not appear to be registering transaction, which means that there are no transaction statistics being made available ... can you confirm that this is working for you on the current code base please? You can run against the latest code with:
When in the caliper-samples directory, though please note you will need to add the following to your benchmark config file:
|
I'm not sure about the meaning of registering transaction, but on my local computer, caliper with FISCO BCOS adapter can run smoothly. For example, in If you can not run FISCO BCOS adaptor, please contact me and send the logs to me to analyze the cause, thanks! |
@vita-dounai I have the same problem as Nick. Pulled your changes the following way (basically emulating a pr merge) :
Then ran the command as specified by Nick. |
@vita-dounai So the problem is, that you used the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some fixes to be applied post merge
FISCO BCOS is a secure and reliable financial-grade open-source blockchain platform led by Chinese enterprises. Its performance has reached over 10,000 TPS with single-chain setup. The platform provides rich features including group architecture, cross-chain communication protocols, pluggable consensus mechanisms, privacy protection algorithms, OSCCAapproved (Office of state Commercial Cryptography Administration) cryptography algorithms, and distributed storage. Its performance, usability and security has been testified by many institutional users and successful business applications in live production environment.
For more information about FISCO BCOS, please refer: https://fisco-bcos-documentation.readthedocs.io/en/latest/
This PR contains the implementation of Caliper adaptor for FISCO BCOS.