hyperledger-composer

what is the best way of image storage on hyperledger composer?

醉酒当歌 提交于 2019-12-01 14:58:24
ipfs or storj hash of image and store file on s3 convert the image to a Base64 string and store string in composer model You can use String and base64 encode it - as a field in an Asset for example. The question has been discussed here: How can I convert MP3 file to a Base64 encoded string? and here: How to deal with forms,images,videos of an asset in hyperledger composer . Storing images, scans, audio files is not a 'best practice' - rather, a cryptographic hash of it (referenced off-chain) is verifiable proof that the source is the exact image/media file that was 'hashed' at the time the

How to store large file in Hyperledger Fabric using Hyperledger Composer

大兔子大兔子 提交于 2019-12-01 14:32:45
Hi I created an asset in Composer model file. asset Car identifiedby assetId{ o String assetId o String data } when I am trying to put large file above 30kb, it is throwing error as data too large. So, what is the limit of data that can be stored in a variable? Is this the wrong way of storing files in blockchain(Hyperledger Fabric using Composer)? there are questions available for storing file in hyperledger fabric/composer. However, there is no question for storing large file. see these answers and guidelines (on what to store etc) on these Stack Overflow resources: is there any size limit

Endorsement policy doesn't work

痴心易碎 提交于 2019-12-01 14:16:04
When I use admin deploy a network with one organization include three peers. My endorsement-policy.json as below , and it not work. { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 } ] } } 1.How can I set the endorsement-policy ? 2. I think the endorsing peer is the only a peer , what's the meaning of 'member' or 'admin' ? So, I want make all of the three peers to be endorsing peers, how to config it ? Let's start from addressing your comment: no.it should be a useage problem.I have three peers in only one org. I need all of three

hyperledger-composer v1.1:unable to instantiate chaincode

好久不见. 提交于 2019-12-01 13:59:15
I am currently working on hyperLedger composer v1.1 and am following the tutorials. I managed to install the chaincode onto the network however it fails at instantiation.Can somebody tell me why? Any help is appreciated. Command: composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card Starting business network tutorial-network at version 0.0.1 Processing these Network Admins: userName: admin ✖ Starting business network definition. This may take a minute... Error: Error

is there any size limit for pdf in hyperledger fabric?

不羁岁月 提交于 2019-12-01 13:53:41
I have created small poc using hyperledger fabric and composer. In my project, I am uploading 2 files, for the first time the file getting uploaded but when I am trying to upload the second file of same size it show error in the composer Unhandled error for request POST /api/UpdateContractDetails: Error: request entity too large at readStream (/home/ttandale/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/raw-body/index.js:196:17) at getRawBody (/home/ttandale/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/raw-body/index.js:106:12)

How to deal with forms,images,videos of an asset in hyperledger composer

只愿长相守 提交于 2019-12-01 13:34:15
While defining an asset in hyperledger composer model file, how do we deal with forms, images, videos? What are the data types available? For example, if my asset is house and I want to store an image of the house how do I define this in an asset? I have referred the documentation, it says the primitive data types available are string, integer, double, DateTime and boolean.] So technically, this is a Node question. Using Javascript, eg. fs.readFileSync(‘yourimageFile.jpg’).toString(‘base64’);, you should be able to convert the image to a Base64 string in your code. So you can define 'String'

How to show transaction input data in a Hyperledger Composer query

半腔热情 提交于 2019-12-01 13:33:56
I'm trying to build a Historian Query that will allow me to see Transactions (and their original inputs). I was kind of trying out an idea based on this issue https://github.com/hyperledger/composer/issues/1850 , but that was fixed in the Composer Playground. So now I'm wondering how I can achieve this in the REST API without relying on events to hold the transaction input information. The query I'm using from following the documentation on queries is: query HistorianRecords { description: "Select from HistorianRecords" statement: SELECT org.hyperledger.composer.system.HistorianRecord } That

is there any size limit for pdf in hyperledger fabric?

回眸只為那壹抹淺笑 提交于 2019-12-01 13:16:56
问题 I have created small poc using hyperledger fabric and composer. In my project, I am uploading 2 files, for the first time the file getting uploaded but when I am trying to upload the second file of same size it show error in the composer Unhandled error for request POST /api/UpdateContractDetails: Error: request entity too large at readStream (/home/ttandale/.nvm/versions/node/v6.11.2/lib/node_modules/composer-rest-server/node_modules/raw-body/index.js:196:17) at getRawBody (/home/ttandale/

Endorsement policy doesn't work

烂漫一生 提交于 2019-12-01 13:10:32
问题 When I use admin deploy a network with one organization include three peers. My endorsement-policy.json as below , and it not work. { "identities": [ { "role": { "name": "member", "mspId": "Org1MSP" } } ], "policy": { "1-of": [ { "signed-by": 0 } ] } } 1.How can I set the endorsement-policy ? 2. I think the endorsing peer is the only a peer , what's the meaning of 'member' or 'admin' ? So, I want make all of the three peers to be endorsing peers, how to config it ? 回答1: Let's start from

hyperledger-composer v1.1:unable to instantiate chaincode

亡梦爱人 提交于 2019-12-01 12:45:15
问题 I am currently working on hyperLedger composer v1.1 and am following the tutorials. I managed to install the chaincode onto the network however it fails at instantiation.Can somebody tell me why? Any help is appreciated. Command: composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card Starting business network tutorial-network at version 0.0.1 Processing these Network