ibm / decentralized-energy-fabric-on-ibp20 Goto Github PK
View Code? Open in Web Editor NEWSet up a network on the IBM Blockchain Platform and deploy a decentralized energy smart contract on the network.
License: Apache License 2.0
Set up a network on the IBM Blockchain Platform and deploy a decentralized energy smart contract on the network.
License: Apache License 2.0
please remove 1 section
can you please comment on your last fix? I believe smart contract has problems when submitting a transaction. My IBM free Blockchain test network will expire in 5 days...thanks!
Submit "AddResident" transaction.
2019-05-29T00:38:58.747Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: transaction returned with failure: SyntaxError: Unexpected token � in JSON at position 0
Failed to submit transaction: Error: Endorsement has failed
Hey @ljbennett62 , I am working on adding authentication to the smart contracts to ensure the residents can only send coins that belong to them (as a start). This is in line with the Extending the Code Pattern as described in the ReadMe.md
file.
Should have smart contracts and maybe a new .js
. file to register multiple users with their wallets by end of week, wanted to know if I should do the PR (when I manage to) to the dev branch, or ask for a new one.
Wanted to run the concept by you
Admin enrolls new users with id R1
, R2
and assigns certificates (instead of user1
)
Transaction to add new resident will be submitted using wallet of R1
at which point the ID is added to the resident's schema (The Resident
over here is the equivalent of a participant
as used in composer
)
let cid = new ClientIdentity(ctx.stub);
var resident = { id: cid.getID() }
await ctx.stub.putState('residents', Buffer.from(JSON.stringify(residents)));
At this point we can verify if the id
match, else throw an error
There are a couple of points I want to touch upon, that I will address once I open a complete PR
Do let me know if this is fine by you.
I get this error...
TypeError: window.stitch.buildSigCollectionAuthHeader is not a function
Submit "AddResident" transaction.
2019-05-29T00:38:58.747Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: transaction returned with failure: SyntaxError: Unexpected token � in JSON at position 0
Failed to submit transaction: Error: Endorsement has failed
Hi team,
I've followed the steps carefully and diligently, and have gotten it to work perfectly fine until couple weeks back. Now today, when I try to redo everything again (helping out a friend right now), and I instantiate the Smart Contract (.cds file generated from VSCode plugin), I do not get the "Connect to SDK" option in the Blockchain console. I am guessing it has something to do with the recent update to the platform, and there's no backward compatibility.
But if you could help me understand why that would be happening, it'll be really helpful and I would finally stop pulling my hair.
Cheers!
Recently, I had meet problem as error log below from chaincode container after deployed to IBP 2.0.
(node:15) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
2019-05-07T08:35:00.918Z ERROR [contracts-spi/chaincodefromcontract.js]
{"message":"Unexpected token \u0004 in JSON at position 0","stack":"SyntaxError: Unexpected token \u0004 in JSON at position 0\n at JSON.parse ()\n at new ClientIdentity (/usr/local/src/node_modules/fabric-shim/lib/chaincode.js:253:38)\n at ChaincodeFromContract.invokeFunctionality (/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:290:35)\n at ChaincodeFromContract.Init (/usr/local/src/node_modules/fabric-shim/lib/contract-spi/chaincodefromcontract.js:250:25)\n at handleMessage (/usr/local/src/node_modules/fabric-shim/lib/handler.js:611:47)\n at ChaincodeSupportClient.handleInit (/usr/local/src/node_modules/fabric-shim/lib/handler.js:352:9)\n at ClientDuplexStream. (/usr/local/src/node_modules/fabric-shim/lib/handler.js:293:30)\n at emitOne (events.js:116:13)\n at ClientDuplexStream.emit (events.js:211:7)\n at addChunk (_stream_readable.js:263:12)"}
It would fixed via updated fabric sdk from 1.4.0-beta2 to 1.4.0
Before (won't work)
"fabric-contract-api": "1.4.0-beta2",
"fabric-shim": "1.4.0-beta2"
After (works)
"fabric-contract-api": "1.4.0",
"fabric-shim": "1.4.0"
Could some one take a look at?
Hi,
How can I deploy decentralized energy network app in local host instead of IBM Blockchain Platform?
Thx in advance.
Hello!
Throughout the instantiation of the smart contract, I have faced the following error:
grpc payload is empty: transaction returned with failure: SyntaxError: Unexpected token � in JSON at position 0
Do you have any suggestions where I am wrong?
Cheers!
This are two similar issues: #20, #22
Steps to Reproduce
Following the steps in README:
Logs
╭─debug@bafu-mba4g256 ~/codes/decentralized-energy-fabric-on-IBP20/application/add-participants ‹master*›
╰─$ node addResident.js
Wallet path: /home/debug/codes/decentralized-energy-fabric-on-IBP20/application/_idwallet
Submit "AddResident" transaction.
2020-03-17T09:07:22.540Z - warn: [DiscoveryEndorsementHandler]: _build_endorse_group_member >> G0:0 - endorsement failed - Error: transaction returned with failure: SyntaxError: Unexpected end of JSON input
Failed to submit transaction: Error: Endorsement has failed
Environment
decentralized-energy-fabric-on-IBP20: commit cdd7411
I followed the lab without any issue until the join a peer to channel when clicking "join channel" I'm getting an "the peer could not join the channel" error without any other information.
Is this a known bug? Am I missing something?
I followed the lab without any issue until the step : Start the client "npm run serve"
I followed the lab without any issue until the Create a peer section but once there, when clicking "Submit" I'm getting an "Unable to create peer" error without any other information.
Is this a known bug? Am I missing something?
error in simulation: could not launch chaincode decentralizedenergy:0.0.1: error building chaincode: error building image: external builder failed: external builder failed to build: external builder 'ibp-builder' failed: exit status 3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.