-
Notifications
You must be signed in to change notification settings - Fork 295
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
docs(examples/cbdc): fix successful minting on chaincode results in balance 0 #2739
Comments
@Anusha-Padmanabhan I'll try to answer, but @RafaelAPB and @AndreAugusto11 might have a more up to date picture on this.
If you've set up the example as per the steps, then the ledgers are running on your machine, so you could observe the ledger state by querying those containers in your preferred way.
If I remember correctly you unlock those options on the UI by putting the tokes into escrow first. Let me know if this helps, in the meantime I'm closing the question as answered, but of course feel free to re-open as needed. |
@petermetz Thanks for the response, But the escrow button is not enabled after minting and token balance is also not reflecting in the screen. I believe, once after minting escrow and transfer buttons should get enabled and minted token balance also should be visible in the screen. |
@Anusha-Padmanabhan I went ahead and re-did the steps as well, it won't re-enable. cc: @RafaelAPB @AndreAugusto11 Also closing the other one you opened as a duplicate. |
Hi @petermetz and @Anusha-Padmanabhan thank you for your feedback. I will have a look at this asap, and ping you here |
@AndreAugusto11 Nice, thank you very much for helping!!! |
@petermetz this is definitely a strange one. I checked the chaincode container logs, and the tokens are being minted correctly. So, the problem is in the GET request, which is always returning 0. I haven't changed anything in the code, have there been any breaking changes that might be causing this (also in the Fabric all in one image)? |
@AndreAugusto11 I also checked the chaincode container logs and the computed state keys are inconsistent so something is off with the minting configuration IMO. x509::/OU=org1/OU=client/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com
x509::/OU=client/OU=org1/OU=department1/CN=userA::/C=US/ST=North Carolina/L=Durham/O=org1.example.com/CN=ca.org1.example.com |
@petermetz thanks for providing those logs. So, the Mint function calculates the clientID dynamically based on the request, and the BalanceOf function receives as an argument the clientID provided by the front end. For some reason, those identities got mismatched. I have updated the code such that the Mint function receives the identity just like the Balance function does. I haven't tested because I'm having some issues with my GCP VM (and can't do it in my M1), can you do it @Anusha-Padmanabhan? |
…equests The state keys were not being generated correctly for some reason It was working before without code changes so my best guess is that the Fabric ledger/SDK versions were changed and that's what tripped it up somehow. Fixes hyperledger-cacti#2739 [skip ci] Co-authored-by: Peter Somogyvari <[email protected]> Signed-off-by: André Augusto <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
Sure @AndreAugusto11, I will test and let you know.. |
…equests The state keys were not being generated correctly for some reason It was working before without code changes so my best guess is that the Fabric ledger/SDK versions were changed and that's what tripped it up somehow. Fixes hyperledger-cacti#2739 [skip ci] Co-authored-by: Peter Somogyvari <[email protected]> Signed-off-by: André Augusto <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
…equests The state keys were not being generated correctly for some reason It was working before without code changes so my best guess is that the Fabric ledger/SDK versions were changed and that's what tripped it up somehow. Fixes #2739 [skip ci] Co-authored-by: Peter Somogyvari <[email protected]> Signed-off-by: André Augusto <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
Hi @petermetz @AndreAugusto11 ![]() |
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914 Signed-off-by: André Augusto <[email protected]>
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914 Signed-off-by: André Augusto <[email protected]>
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914 Signed-off-by: André Augusto <[email protected]>
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914 Signed-off-by: André Augusto <[email protected]>
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914 Signed-off-by: André Augusto <[email protected]>
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in #2739 * An initial fix was deployed in #2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR #2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes #2914 Signed-off-by: André Augusto <[email protected]>
…equests The state keys were not being generated correctly for some reason It was working before without code changes so my best guess is that the Fabric ledger/SDK versions were changed and that's what tripped it up somehow. Fixes hyperledger-cacti#2739 [skip ci] Co-authored-by: Peter Somogyvari <[email protected]> Signed-off-by: André Augusto <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
* What I believe has been an update to the Fabric SDK has led the application to break due to having the Fabric identities hardcoded (for the Fabric-Ethereum ID mapping). This was first noted in hyperledger-cacti#2739 * An initial fix was deployed in hyperledger-cacti#2802 but only the Mint was changed, which caused other functions to be breaking at the moment (e.g., Escrow) * This commit changes the crypto material files and reverts the workaround in PR hyperledger-cacti#2802 * The crypto material is only used for testing and to show information in the frontend (e.g., requesting the balance of a specific user based on the identity) * For critical operations, access control is being performed by the chaincode by using the call at the begining of the relevant methods Fixes hyperledger-cacti#2914 Signed-off-by: André Augusto <[email protected]>
Describe the bug
Started the app of CBDC example and front end using the commands as per the given readme.
https://github.com/hyperledger/cacti/tree/main/examples/cactus-example-cbdc-bridging-backend
I am getting the below UI,
I can able to mint and see the transaction logs but after minting where I can view those tokens and what is the next step to do transfer, escrow, bridge out and in.
To Reproduce
clone the repository
cd cactus
from the root of the repository run the below commands:
npm run enable-corepack
npm run configure
npm run start:example-cbdc-bridging-app
Expected behavior
Minted token should reflect somewhere or enable the other buttons of transfer, escrow
Steps to understand the workflow of CBDC example is missing
Logs/Stack traces
Can help maintainers identify root causes
Screenshots
docker run -p 2000:2000 aaugusto11/cactus-example-cbdc-bridging-frontend
npm run start:example-cbdc-bridging-app
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
Either a semantic version of the release you are using such as
1.0.0
or a gitcommit hash if you are directly working with code from the git repository.
Hyperledger Cactus Plugins/Connectors Used
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: