Issue in creating Private data in Hyperledger FabricHyperledger Fabric: peer chaincode instantiation policy violationHyperledger Fabric Private Data CollectionHyperledger fabric network setup for multi organisation multichannelHyperledger Fabric Private data using SDK nodejs is not workingHyperledger Fabric Failed to Instantiate chaincode unsupported protocol scheme “tcp”Hyperledger fabric Kubernetes chaincode instantiation failsCan private data be created between 2 peers in single organisation? Hyperledger FabricUpdate private data collection policy in Hyperledger Fabrictesting custom hyperledger fabric network with hyperledger caliperAdapting hyperledger caliper with custom hyperledger fabric network “fabcar”
Can I use my Chinese passport to enter China after I acquired another citizenship?
What are the ramifications of creating a homebrew world without an Astral Plane?
The baby cries all morning
Why did Kant, Hegel, and Adorno leave some words and phrases in the Greek alphabet?
Should my PhD thesis be submitted under my legal name?
apt-get update is failing in debian
How to be diplomatic in refusing to write code that breaches the privacy of our users
What is the term when two people sing in harmony, but they aren't singing the same notes?
Can a monster with multiattack use this ability if they are missing a limb?
Your magic is very sketchy
when is out of tune ok?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
Where in the Bible does the greeting ("Dominus Vobiscum") used at Mass come from?
Hide Select Output from T-SQL
Star/Wye electrical connection math symbol
Have I saved too much for retirement so far?
Is the destination of a commercial flight important for the pilot?
At which point does a character regain all their Hit Dice?
I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?
Modify casing of marked letters
Greatest common substring
Print name if parameter passed to function
Applicability of Single Responsibility Principle
How to combine multiple text files of different lengths and multiple columns by a column
Issue in creating Private data in Hyperledger Fabric
Hyperledger Fabric: peer chaincode instantiation policy violationHyperledger Fabric Private Data CollectionHyperledger fabric network setup for multi organisation multichannelHyperledger Fabric Private data using SDK nodejs is not workingHyperledger Fabric Failed to Instantiate chaincode unsupported protocol scheme “tcp”Hyperledger fabric Kubernetes chaincode instantiation failsCan private data be created between 2 peers in single organisation? Hyperledger FabricUpdate private data collection policy in Hyperledger Fabrictesting custom hyperledger fabric network with hyperledger caliperAdapting hyperledger caliper with custom hyperledger fabric network “fabcar”
I am trying to create private data on Fabric version 1.2.0.
I have created the collections configuration file for storing private data.
[
"name": "collectionData",
"policy": "OR('Org1MSP.member','Org2MSP.member')",
"requiredPeerCount": 0,
"maxPeerCount": 3,
"blockToLive":1000000,
"memberOnlyRead": true
]
I have instantiated the chaincode using --collections-config flag.I have provided the configuration file correctly and successfully created the network.
I have developed the chaincode using nodejs.
console.log("************************************");
console.log("Private Data Testing");
let sample = "test";
await stub.putPrivateData("collectionData",transactionId,sample.toString());
let response = await stub.getPrivateData("collectionData",transactionId);
console.log("Response",response.toString());
I am doing the operations on behalf of Org1MSP.But I didn't get any response.It returns null while fetching the private details.
Could someone help me to resolve the issue?
hyperledger-fabric hyperledger-chaincode
add a comment |
I am trying to create private data on Fabric version 1.2.0.
I have created the collections configuration file for storing private data.
[
"name": "collectionData",
"policy": "OR('Org1MSP.member','Org2MSP.member')",
"requiredPeerCount": 0,
"maxPeerCount": 3,
"blockToLive":1000000,
"memberOnlyRead": true
]
I have instantiated the chaincode using --collections-config flag.I have provided the configuration file correctly and successfully created the network.
I have developed the chaincode using nodejs.
console.log("************************************");
console.log("Private Data Testing");
let sample = "test";
await stub.putPrivateData("collectionData",transactionId,sample.toString());
let response = await stub.getPrivateData("collectionData",transactionId);
console.log("Response",response.toString());
I am doing the operations on behalf of Org1MSP.But I didn't get any response.It returns null while fetching the private details.
Could someone help me to resolve the issue?
hyperledger-fabric hyperledger-chaincode
try (where Key1 is your key) -await stub.putPrivateData("collectionData","Key1",Buffer.from(sample.toString()));thenlet response = await stub.getPrivateData('collectionData',"Key1");(not sure if you're usingtransactionIdas a key in your scenario..) toString should default toutf8
– Paul O'Mahony
Mar 8 at 10:11
@PaulO'Mahony I have tried as you mentioned. But still same issue persists.Any other suggestion??
– cmr
Mar 8 at 11:47
@PaulO'Mahony I am using version 1.2.1. Is this issue related to Fabric version?
– cmr
Mar 8 at 12:24
PD came in with 1.2 hyperledger-fabric.readthedocs.io/en/release-1.2/… - these are the official Fabric releases FYI github.com/hyperledger/fabric#releases
– Paul O'Mahony
Mar 8 at 16:50
ps. You may be also be aware thatGetPrivateDatadoesn't read data from the private writeset, which has not been committed to thecollection. In other words,GetPrivateDatadoesn't consider data modified by `PutPrivateData - that has not been committed.
– Paul O'Mahony
Mar 10 at 17:14
add a comment |
I am trying to create private data on Fabric version 1.2.0.
I have created the collections configuration file for storing private data.
[
"name": "collectionData",
"policy": "OR('Org1MSP.member','Org2MSP.member')",
"requiredPeerCount": 0,
"maxPeerCount": 3,
"blockToLive":1000000,
"memberOnlyRead": true
]
I have instantiated the chaincode using --collections-config flag.I have provided the configuration file correctly and successfully created the network.
I have developed the chaincode using nodejs.
console.log("************************************");
console.log("Private Data Testing");
let sample = "test";
await stub.putPrivateData("collectionData",transactionId,sample.toString());
let response = await stub.getPrivateData("collectionData",transactionId);
console.log("Response",response.toString());
I am doing the operations on behalf of Org1MSP.But I didn't get any response.It returns null while fetching the private details.
Could someone help me to resolve the issue?
hyperledger-fabric hyperledger-chaincode
I am trying to create private data on Fabric version 1.2.0.
I have created the collections configuration file for storing private data.
[
"name": "collectionData",
"policy": "OR('Org1MSP.member','Org2MSP.member')",
"requiredPeerCount": 0,
"maxPeerCount": 3,
"blockToLive":1000000,
"memberOnlyRead": true
]
I have instantiated the chaincode using --collections-config flag.I have provided the configuration file correctly and successfully created the network.
I have developed the chaincode using nodejs.
console.log("************************************");
console.log("Private Data Testing");
let sample = "test";
await stub.putPrivateData("collectionData",transactionId,sample.toString());
let response = await stub.getPrivateData("collectionData",transactionId);
console.log("Response",response.toString());
I am doing the operations on behalf of Org1MSP.But I didn't get any response.It returns null while fetching the private details.
Could someone help me to resolve the issue?
hyperledger-fabric hyperledger-chaincode
hyperledger-fabric hyperledger-chaincode
asked Mar 7 at 11:38
cmrcmr
11
11
try (where Key1 is your key) -await stub.putPrivateData("collectionData","Key1",Buffer.from(sample.toString()));thenlet response = await stub.getPrivateData('collectionData',"Key1");(not sure if you're usingtransactionIdas a key in your scenario..) toString should default toutf8
– Paul O'Mahony
Mar 8 at 10:11
@PaulO'Mahony I have tried as you mentioned. But still same issue persists.Any other suggestion??
– cmr
Mar 8 at 11:47
@PaulO'Mahony I am using version 1.2.1. Is this issue related to Fabric version?
– cmr
Mar 8 at 12:24
PD came in with 1.2 hyperledger-fabric.readthedocs.io/en/release-1.2/… - these are the official Fabric releases FYI github.com/hyperledger/fabric#releases
– Paul O'Mahony
Mar 8 at 16:50
ps. You may be also be aware thatGetPrivateDatadoesn't read data from the private writeset, which has not been committed to thecollection. In other words,GetPrivateDatadoesn't consider data modified by `PutPrivateData - that has not been committed.
– Paul O'Mahony
Mar 10 at 17:14
add a comment |
try (where Key1 is your key) -await stub.putPrivateData("collectionData","Key1",Buffer.from(sample.toString()));thenlet response = await stub.getPrivateData('collectionData',"Key1");(not sure if you're usingtransactionIdas a key in your scenario..) toString should default toutf8
– Paul O'Mahony
Mar 8 at 10:11
@PaulO'Mahony I have tried as you mentioned. But still same issue persists.Any other suggestion??
– cmr
Mar 8 at 11:47
@PaulO'Mahony I am using version 1.2.1. Is this issue related to Fabric version?
– cmr
Mar 8 at 12:24
PD came in with 1.2 hyperledger-fabric.readthedocs.io/en/release-1.2/… - these are the official Fabric releases FYI github.com/hyperledger/fabric#releases
– Paul O'Mahony
Mar 8 at 16:50
ps. You may be also be aware thatGetPrivateDatadoesn't read data from the private writeset, which has not been committed to thecollection. In other words,GetPrivateDatadoesn't consider data modified by `PutPrivateData - that has not been committed.
– Paul O'Mahony
Mar 10 at 17:14
try (where Key1 is your key) -
await stub.putPrivateData("collectionData","Key1",Buffer.from(sample.toString())); then let response = await stub.getPrivateData('collectionData',"Key1"); (not sure if you're using transactionId as a key in your scenario..) toString should default to utf8– Paul O'Mahony
Mar 8 at 10:11
try (where Key1 is your key) -
await stub.putPrivateData("collectionData","Key1",Buffer.from(sample.toString())); then let response = await stub.getPrivateData('collectionData',"Key1"); (not sure if you're using transactionId as a key in your scenario..) toString should default to utf8– Paul O'Mahony
Mar 8 at 10:11
@PaulO'Mahony I have tried as you mentioned. But still same issue persists.Any other suggestion??
– cmr
Mar 8 at 11:47
@PaulO'Mahony I have tried as you mentioned. But still same issue persists.Any other suggestion??
– cmr
Mar 8 at 11:47
@PaulO'Mahony I am using version 1.2.1. Is this issue related to Fabric version?
– cmr
Mar 8 at 12:24
@PaulO'Mahony I am using version 1.2.1. Is this issue related to Fabric version?
– cmr
Mar 8 at 12:24
PD came in with 1.2 hyperledger-fabric.readthedocs.io/en/release-1.2/… - these are the official Fabric releases FYI github.com/hyperledger/fabric#releases
– Paul O'Mahony
Mar 8 at 16:50
PD came in with 1.2 hyperledger-fabric.readthedocs.io/en/release-1.2/… - these are the official Fabric releases FYI github.com/hyperledger/fabric#releases
– Paul O'Mahony
Mar 8 at 16:50
ps. You may be also be aware that
GetPrivateData doesn't read data from the private writeset, which has not been committed to the collection. In other words, GetPrivateData doesn't consider data modified by `PutPrivateData - that has not been committed.– Paul O'Mahony
Mar 10 at 17:14
ps. You may be also be aware that
GetPrivateData doesn't read data from the private writeset, which has not been committed to the collection. In other words, GetPrivateData doesn't consider data modified by `PutPrivateData - that has not been committed.– Paul O'Mahony
Mar 10 at 17:14
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55042906%2fissue-in-creating-private-data-in-hyperledger-fabric%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55042906%2fissue-in-creating-private-data-in-hyperledger-fabric%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
try (where Key1 is your key) -
await stub.putPrivateData("collectionData","Key1",Buffer.from(sample.toString()));thenlet response = await stub.getPrivateData('collectionData',"Key1");(not sure if you're usingtransactionIdas a key in your scenario..) toString should default toutf8– Paul O'Mahony
Mar 8 at 10:11
@PaulO'Mahony I have tried as you mentioned. But still same issue persists.Any other suggestion??
– cmr
Mar 8 at 11:47
@PaulO'Mahony I am using version 1.2.1. Is this issue related to Fabric version?
– cmr
Mar 8 at 12:24
PD came in with 1.2 hyperledger-fabric.readthedocs.io/en/release-1.2/… - these are the official Fabric releases FYI github.com/hyperledger/fabric#releases
– Paul O'Mahony
Mar 8 at 16:50
ps. You may be also be aware that
GetPrivateDatadoesn't read data from the private writeset, which has not been committed to thecollection. In other words,GetPrivateDatadoesn't consider data modified by `PutPrivateData - that has not been committed.– Paul O'Mahony
Mar 10 at 17:14