Date   

Fabric Contributor Meeting - April 27th CANCELLED, Next meeting May 11th

David Enyeart
 

Sorry to cancel Wednesday’s contributor meeting again, many of the regular participants are not able to attend this week. We’ll pick back up May 11th.


Now: Private Chaincode Lab - 04/26/2022 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Private Chaincode Lab

When:
04/26/2022
8:00am to 9:00am
(UTC-07:00) America/Los Angeles

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer: Marcus Brandenburger bur@...

View Event

Description:
Two of the Hyperleger Labs projects (private data objects and private chain code) are collaborating to develop a "private smart contracts" capability.

Join Zoom Meeting https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09 Meeting ID: 518 494 7650 Passcode: 475869


Ways to share about your Hyperledger project at Hyperledger Global Forum in Dublin

David Boswell <dboswell@...>
 

In addition to the general call for proposals for Hyperledger Global Forum sessions, there are a couple of options for sharing about Hyperledger projects that are being reserved for project leads.  We encourage you to take part in these to make the most of the largest Hyperledger event this year.


* Workshops: If you or your team members are attending Global Forum and would like to give a ½ day workshop, please propose one here. We will be able to support a limited number of workshops selected by the Proposals Committee. These are a good way to help people learn how to use and contribute to your project. The submission deadline is Friday, April 29, 2022 at 11:59 PM PDT.


* Meetup: We will be hosting an evening meetup that will be open to the local community and this will allow people who aren’t going to Global Forum to learn more about Hyperledger.  The format will be quick lightning style talks and then time to connect with meetup attendees who want to learn more about what you’re doing.  Please reach out to dboswell@... if you’d like to speak at the meetup.


If you have questions about either of these or about other ways Hyperledger staff can help you with your project, feel free to let us know.  And if you are planning a release or have a big project milestone around the time of Global Forum, let us know and we can help you promote your news.


Thanks,

David


About Hash value seen in transaction in composer-playground

Vivek Vohra
 

Hello Sir/Mam,
All i made a blockchain in Composer-playground, but in the transaction record, i can't find any Hash Value of the block. So how we can say that it is connected to previous authentic block.
Please guide me.
I'm not from Computer science Background. So please Help me regarding this, i have to show my project on supply chain in Blockchain to my professor. Please Help.

Thank you
Vivek


Two virtual Hyperledger meetups this week about Hyperledger Fabric

David Boswell <dboswell@...>
 

There are two virtual Hyperledger meetups this week about Hyperledger Fabric.  The first is in English and is about tokenization and will use Fabric for some of the examples.  The second is in Portuguese and is about a tool to help people write chaincode.

Thursday, April 28 at 15:00 UTC / 17:00 CEST: Hyperledger Budapest hosts "Tokenization on enterprise ledgers"


Since these are virtual anyone anywhere can dial-in, so feel free to join or share the links with people who may be interested.  And if there is something you'd like to share with the community at a meetup, feel free to let me know and I can help you get one organized.

Thanks,
David


Re: Is java deprecated for Fabric

Matthew White
 

Hello;

 

So start with the Fabric Gateway SDKs (https://hyperledger.github.io/fabric-gateway/) available in Go ,Nodejs and Java

This will let you connect an application to Fabric, and invoke transactions on the Smart Contract.

 

If you wish then to expose a gRPC server of your own that’s perfectly fine.  We’ve an example of  REST version in fabric-samples that will provide some information about the best map to manage Fabric transactions.

 

As to writing a gRPC server – I’d refer you to googles own docs 😊

 

Cheers, Matthew

 

 

From: fabric@... <fabric@...> On Behalf Of Hi I wanted to check if java sdk is deprecated for Fabric 2.2
Sent: 25 April 2022 07:27
To: fabric@...
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Is java deprecated for Fabric

 

Hi All, I need to implement GRPC as a server to post and query data in fabric using Java sdk . Can you please help me in getting started? Thanks, Upma  On Tue, Mar 29, 2022 at 8:25 PM upma gupta <upma121gupta@...> wrote: ‍ ‍ ‍ ‍ ‍ ‍ ‍

ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

Hi All,

 

I need to implement GRPC as a server to post and query data in fabric using Java sdk . Can you please help me in getting started?

 

Thanks,

Upma 

 

On Tue, Mar 29, 2022 at 8:25 PM upma gupta <upma121gupta@...> wrote:

Hi All,

 

I wanted to check if the Java SDK is deprecated for Fbric 2.2 and higher versions ? Is Java not a choice for fabric implementation?

 

Regards,

Upma 


Re: Is java deprecated for Fabric

Hi I wanted to check if java sdk is deprecated for Fabric 2.2
 

Hi All,

I need to implement GRPC as a server to post and query data in fabric using Java sdk . Can you please help me in getting started?

Thanks,
Upma 

On Tue, Mar 29, 2022 at 8:25 PM upma gupta <upma121gupta@...> wrote:
Hi All,

I wanted to check if the Java SDK is deprecated for Fbric 2.2 and higher versions ? Is Java not a choice for fabric implementation?

Regards,
Upma 


Fabric-sdk connection handling #fabric-sdk

jeff.jo95z@...
 

How to determine the ideal number of connecting points or ideal number of connections which can be accepted by Fabric SDK?
Is there a way to determine the ideal load on fabric sdk, where we can get a high throughput?
How can we configure the sdk with the ideal number of connections and so that it will work smoothly without any downtime or minimal down time?

Please could you answer these queries. My knowledge in this area is minimal


Event: Documentation Workgroup monthly call - 04/22/2022 #cal-reminder

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Reminder: Documentation Workgroup monthly call

When:
04/22/2022
11:00am to 12:00pm
(UTC-04:00) America/New York

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer: Josh Horton joshh@...

View Event

Description:
Schedule, Agendas, Minutes, etc: https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group


Monthly docs call is Friday April 22

Josh Horton
 

At 11:00 a.m. EST - Zoom link is in the agenda: 


fabric channel update issue #fabric

jeff.jo95z@...
 

I am adding a new orderer to the consent set.
while updating the channel config :
peer channel update 

I am getting this error:
 
Error: got unexpected status: BAD_REQUEST -- error applying config update to existing channel 'mychannel': consensus metadata update for channel config update is invalid: invalid new config metadata: duplicate consenter:

what is the reason for this?


Read-write set semantics example

Satya
 

Hi,

In Fabric docs, following example is explained at
https://hyperledger-fabric.readthedocs.io/en/release-2.2/readwrite.html It is
mentioned that all transaction viz., T1 to T5 are based on same snapshot of the
world state DB before their validation.

World state: (k1,1,v1), (k2,1,v2), (k3,1,v3), (k4,1,v4), (k5,1,v5)
T1 -> Write(k1, v1'), Write(k2, v2')
T2 -> Read(k1), Write(k3, v3')
T3 -> Write(k2, v2'')
T4 -> Write(k2, v2'''), read(k2)
T5 -> Write(k6, v6'), read(k5)

T1 passes validation because it does not perform any read. Further, the tuple of
keys k1 and k2 in the world state are updated to (k1,2,v1'), (k2,2,v2')
T2 fails validation because it reads a key, k1, which was modified by a
preceding transaction - T1
T3 passes the validation because it does not perform a read. Further the tuple
of the key, k2, in the world state is updated to (k2,3,v2'')
T4 fails the validation because it reads a key, k2, which was modified by a
preceding transaction T1
T5 passes validation because it reads a key, k5, which was not modified by any
of the preceding transactions

I could not understand, how T3 passes the validation though value of K2 is
modified in T1. By the time T3 is to be validated the read-set acquired by T3
is no longer valid as its value has been modified by T1. Can you please explain
this scenario.

Regards,
Satya
------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
------------------------------------------------------------------------------------------------------------


Fabric-Signing error

jeff.jo95z@...
 

I was adding a new orderer to the existing network
While signing the newly modified structure :

peer channel signconfigtx -f ordorg_update_envelope.pb

I was getting this error:

Error: Invalid channel create transaction : No configtx file name supplied

Why this error comes?
FABRIC_CFG_PATH ws pointing to configtx


Inconsistent results for installed chaincode package query

Arun S M
 

Hi Team,

I wanted to understand the reason behind the cache for lifecycle. Any reference on it will be helpful.

Case: In one of the scenarios, I had a wrong chaincode package installed and then had to reinstall the right chaincode package at the same version. But unfortunately fooling the peer node through deletion in its persistence did not solve the problem for me. The "lifecycle chaincode queryinstalled" "lifecycle chaincode getinstalledpackage" commands were out of sync, query always fetched the cache but I couldn't fetch the package.

What did I expect?
The peer node to be consistent on what is present with it or not. The good solution is to implement a delete package utility. Alternative could be to add a cache validator to run at some interval and make sure it is still valid as opposed to life of cache till the peer's death (current behavior). I saw a Jira item on implementing a feature such as this, but it's still in the backlog. This feature may cause other consequences on already committed channels.

Any thoughts?

Regards,
Arun


Now: Private Chaincode Lab - 04/19/2022 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Private Chaincode Lab

When:
04/19/2022
8:00am to 9:00am
(UTC-07:00) America/Los Angeles

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer: Marcus Brandenburger bur@...

View Event

Description:
Two of the Hyperleger Labs projects (private data objects and private chain code) are collaborating to develop a "private smart contracts" capability.

Join Zoom Meeting https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09 Meeting ID: 518 494 7650 Passcode: 475869


Re: #hyperledger-fabric Contract to call a Contract within the same chaincode #hyperledger-fabric

Matthew White
 

Hello,

 

I’d suggest looking at the `fabric-contract-api-go` that will do exactly what you want. Specifically https://github.com/hyperledger/fabric-contract-api-go/blob/main/tutorials/getting-started.md#declaring-a-contract

 

Thanks Mathew

 

From: fabric@... <fabric@...> On Behalf Of adineshreddy1mt@...
Sent: 18 April 2022 14:29
To: fabric@...
Subject: [EXTERNAL] [Hyperledger Fabric] #hyperledger-fabric Contract to call a Contract within the same chaincode

 

Hello , I am trying to implement multiple contracts in a single chaincode in Go lang. Ref:(https://hyperledger-fabric.readthedocs.io/en/release-2.3/smartcontract/smartcontract.html#terminology) We have a method called `InvokeChaincode(chaincodeName ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

Hello ,

I am trying to implement multiple contracts in a single chaincode in Go lang.

Ref:(https://hyperledger-fabric.readthedocs.io/en/release-2.3/smartcontract/smartcontract.html#terminology)
We have a method called `InvokeChaincode(chaincodeName string, args [][]byte, channel string)` where we will  invoke a method ,from one chaincode to another  method of another chaincode.,

Do we have any methods where a contract will call another contract in a same chaincode in Fabric Go-SDK.

Eg:

Vehicle chaincode{
       Car contract{
           create car,
           query car
        }
       boat contract{
           create boat,
           query boat
        }
       person contract{
           updatevehicles vehicles,
           queryvehicles vehicles
        }
}

Call create car(car contract) and create boat(Boat contract) in person contract 
smart.diagram2

Thanks in-advance.

Thanks,
Dinesh. A


Doubt and error in enrolling a peer and starting its container #docker-compose #docker #fabric-ca

famar
 

Hi all, I am creating a network with CA roots and CA intermediates using fabric CA and docker compose. So far I have been able to correctly create the roots, intermediates, perform registration and enrollment of orderers and start their containers. I have problems with the peers.
I am not using localhost or 0.0.0.0 as docker gives problems if you try to create intermediates that way. I then created hosts within the docker network.

I describe the steps taken as concisely as possible:

Enroll TLS CA admin
docker exec -it tls-ca fabric-ca-client enroll -d -u https://tls-ca-admin:tls-ca-adminpw@tls-ca:7051 --tls.certfiles /tmp/hyperledger/fabric-ca/crypto/ca-cert.pem --home /tmp/hyperledger/fabric-ca/admin/
 
Register peer
docker exec -it tls-ca fabric-ca-client register -d --id.name peer1-ica1-rca-org0 --id.secret peer1-ica1-rca-org0PW --id.type peer -u https://tls-ca:7051 --tls.certfiles /tmp/hyperledger/fabric-ca/crypto/ca-cert.pem --home /tmp/hyperledger/fabric-ca/admin/
 
Enroll ica1-rca-org0 admin
docker exec -it ica1-rca-org0 fabric-ca-client enroll -d -u https://ica1-rca-org0-admin:ica1-rca-org0-adminpw@ica1-rca-org0:7058 --tls.certfiles /tmp/hyperledger/fabric-ca/crypto/ca-cert.pem --home /tmp/hyperledger/fabric-ca/admin --home /tmp/hyperledger/fabric-ca/admin/
Register admin and peer
docker exec -it ica1-rca-org0 fabric-ca-client register -d --id.name admin-ica1-rca-org0 --id.secret admin-ica1-rca-org0pw --id.type admin --id.attrs "hf.Registrar.Roles=client,hf.Registrar.Attributes=*,hf.Revoker=true,hf.GenCRL=true,admin=true:ecert,abac.init=true:ecert" -u https://ica1-rca-org0:7058 --tls.certfiles /tmp/hyperledger/fabric-ca/crypto/ca-cert.pem --home /tmp/hyperledger/fabric-ca/admin/
docker exec -it ica1-rca-org0 fabric-ca-client register -d --id.name peer1-ica1-rca-org0 --id.secret peer1-ica1-rca-org0pw --id.type peer -u https://ica1-rca-org0:7058 --tls.certfiles /tmp/hyperledger/fabric-ca/crypto/ca-cert.pem --home /tmp/hyperledger/fabric-ca/admin/
Enroll peer for identity
docker exec -it ica1-rca-org0 fabric-ca-client enroll -d -u https://peer1-ica1-rca-org0:peer1-ica1-rca-org0pw@ica1-rca-org0:7058 --tls.certfiles /tmp/hyperledger/fabric-ca/crypto/ca-cert.pem --home /tmp/hyperledger/fabric-ca-enrollment/peer1 --mspdir msp


Here i have my first doubt. When i enrolled orderers i used the certificates located in the cacerts folders (rca-org0-7052.pem for the orderer on the rca-org0 for istance) and i was sure i need to use the same strategy for the peer. If i try to follow this way, it result in a "unknown owner" error. So i change the certificate and it work but i'm not very sure about the reason.

However, after enrolling the peer for identity and TLS and the admin, i try to start the peer container.
In my docker compose file i have this line:
 - CORE_PEER_MSPCONFIGPATH=/tmp/hyperledger/ica1-rca-org0/peer1/msp
But i have the following error:
Cannot run peer because cannot init crypto, specified path "/tmp/hyperledger/ica1-rca-org0/peer1/msp" does not exist or cannot be accessed: stat /tmp/hyperledger/ica1-rca-org0/peer1/msp: no such file or directory
The folder exists and it has not restriction but the docker compose can't read the content.

Would anyone be able to suggest why?
Thanks

 


#hyperledger-fabric Contract to call a Contract within the same chaincode #hyperledger-fabric

adineshreddy1mt@...
 

Hello ,

I am trying to implement multiple contracts in a single chaincode in Go lang.

Ref:(https://hyperledger-fabric.readthedocs.io/en/release-2.3/smartcontract/smartcontract.html#terminology)
We have a method called `InvokeChaincode(chaincodeName string, args [][]byte, channel string)` where we will  invoke a method ,from one chaincode to another  method of another chaincode.,

Do we have any methods where a contract will call another contract in a same chaincode in Fabric Go-SDK.

Eg:

Vehicle chaincode{
       Car contract{
           create car,
           query car
        }
       boat contract{
           create boat,
           query boat
        }
       person contract{
           updatevehicles vehicles,
           queryvehicles vehicles
        }
}

Call create car(car contract) and create boat(Boat contract) in person contract 
smart.diagram2

Thanks in-advance.

Thanks,
Dinesh. A


Re: Transaction read/write sets are bleeding into each other

Tsvetan Georgiev
 

Hi Curtis,

I am not aware of limitations related to concurrent requests for endorsement. The unexpected transaction endorsements (the read/write sets) you are getting are likely due to your chaincode behavior and/or client app that sets the endorsement parameters.
An example on what could go wrong inside the chaincode could be the use of static variables -  that can lead to erroneous results during endorsement. Another problem might be incorrect exception handling that may result in endorsement success but with unexpected read/write sets within.

You could add some logging inside the chaincode to understand better what happens when a call comes. By inspecting the chaincode logs you may get a clue on why you get those unexpected read/write sets.

When you get endorsement policy error, this means there are not enough signatures to the transaction to satisfy that policy. Check your client application logic (adding logs always helps) to understand better what transaction proposal and peer signatures you are sending to the ordering service. Have in mind the HLF SDKs have embedded logic that utilize the discovery service to automatically collect the required endorsements before sending the transaction to the ordering service. My guess is that your client application is collecting the endorsements on its own instead of using the discovery service. 


Regards,

Senofi

Tsvetan Georgiev
Director, Senofi Inc.

438-494-7854 | tsvetan@...

www.senofi.ca

www.consortia.io






---- On Thu, 14 Apr 2022 16:59:15 -0400 Curtis Miles <curtis@...> wrote ----

Hey Fabric Community,

 

Thanks for everyone for their suggestions so far, but I’m still seeing issues with my read/write sets being malformed within the endorsement responses when a single peer is trying to endorse multiple non-conflicting transactions at once.

 

Here’s my situation (with updated information that I’ve figured out so far):

  • 4 organizations, each with one (endorsing) peer
  • Nodejs chaincode running in an external container (1 chaincode container per org)
  • MAJORITY endorsement policy (so three endorsements required for each transaction)
  • 5 Fabric client instances (each running in a Kubernetes pod) that are all executing in parallel
  • Each pod pulls a job off a queue and attempts to execute a simple Chaincode transaction that reads/updates one object and creates another (i.e. there should be 2 reads and 2 writes in the read/write set within each endorsement response)
  • When each transaction is executed, 3 endorsement proposals are requested and received from 3 different orgs / peers
  • Unfortunately, some of the read/write sets within the endorsement responses from various org peers are incorrect, leading to ENDORSEMENT_POLICY_FAILURE errors when the transaction is submitted to the orderer and processed in the block by the peers.
    • Some endorsement responses have read/write sets that only contain 1 read and no writes, some contain 3 reads and 1 write, some have other combinations, and some are just fine.
    • None of the data touched by the chaincode transactions executed by these 5 client instances overlap – i.e. there are no MVCC_READ_CONFLICTs
  • All endorsing peers randomly exhibit this same behaviour, so it’s not a problem with one particular org’s peer
  • If I run only one client instance (i.e. 1 kubernetes pod) and process the transactions sequentially, waiting for the block to be delivered before running the next transaction, everything works fine.  But that obviously results in debilitatingly poor performance.

 

So I guess my question is: Are there any known limitations/issues in terms of a single peer responding to multiple (non-conflicting) endorsement requests concurrently?

 

Thanks so much for your help!

Curtis.

 

From: Marcos Sarres <marcos.sarres@...>
Date: Thursday, April 7, 2022 at 10:40 AM
To: 'David Faulstich Diniz Reis' <davidfdr@...>, 'Curtis Miles' <curtis@...>
Cc: 'fabric' <fabric@...>
Subject: RES: [Hyperledger Fabric] Transaction read/write sets are bleeding into each other

Good point David,

 

Please also check for MVCC (Multi Version Concurrent Control) CONFLICT errors at your client and orderer logs.

 

Regards,

 

Marcos Sarres | CEO | +55 61 98116 7866


 

 

De: fabric@... <fabric@...> Em nome de David Faulstich Diniz Reis
Enviada em: quinta-feira, 7 de abril de 2022 08:31
Para: Curtis Miles <curtis@...>
Cc: fabric <fabric@...>
Assunto: Re: [Hyperledger Fabric] Transaction read/write sets are bleeding into each other

 

Just as a complement to Marcos and Tsvetan,

 

I got similar errors due to concurrency control when doing stress tests with the same asset keys.

 

You may check why the transaction fails using QSCC chaincode:

 

1 - Evaluate Transaction Method:

 

/*
* Evaluate a transaction and handle any errors
*/
export const evaluateTransaction = async (contract: Contract, transactionName: string, ...transactionArgs: string[]): Promise<Buffer> => {
 
const transaction = contract.createTransaction(transactionName);
  const
transactionId = transaction.getTransactionId();
 
logger.trace({ transaction }, 'Evaluating transaction');

  try
{
   
const payload = await transaction.evaluate(...transactionArgs);
   
logger.trace(
      {
        transactionId: transactionId
,
       
payload: payload.toString(),
     
},
     
'Evaluate transaction response received',
   
);
    return
payload;
 
} catch (err) {
   
throw handleTXError(transactionId, err);
 
}
}
;

 

 

2 - Check status transaction:

 

/*
* Get the validation code of the specified transaction
*/
export const getTransactionValidationCode = async (qsccContract: Contract, transactionId: string): Promise<string> => {
 
const data = await evaluateTransaction(qsccContract, 'GetTransactionByID', config.channelName, transactionId);

  const
processedTransaction = protos.protos.ProcessedTransaction.decode(data);
  const
validationCode = protos.protos.TxValidationCode[processedTransaction.validationCode];

 
logger.debug({ transactionId }, 'Validation code: %s', validationCode);
  return
validationCode;
};

 

--

 

I use this as part of my retry logic implemented by Event Source and Saga patterns.

 

Best regards.

 

David

 

Em qua., 6 de abr. de 2022 às 20:29, Tsvetan Georgiev <tsvetan@...> escreveu:

Hi Curtis,

 

Marcos has a good point and you should check your client logic.

 

To better understand could you share also how many peers participate in the transaction endorsement? Are those failed/bad transactions part of the block built by the Ordering Service and marked as invalid due to concurrency control version check?

 

If your transactions don't contain the read/write sets you expect then you definitely have to re-check your chaincode and what your client is actually sending to the peers during the endorsement step.

 

Regards,

 

Senofi


Tsvetan Georgiev

Director, Senofi Inc.

438-494-7854 | tsvetan@...

www.senofi.ca

www.consortia.io

 



 

 

 

---- On Wed, 06 Apr 2022 18:54:10 -0400 Marcos Sarres <marcos.sarres@...> wrote ----

 

Please check your Hyperledger Fabric client.

 

The endorsement policy should be fulfilled at your API sending the message proposals the the endorsement peers further receiving and packaging the signed proposals to be transmitted to the orderer.

 

I think your API (HLF Client) is not getting the correct signed proposals from the chaincode endorsing policy orgs.

 

Regards,

 

Marcos Sarres | CEO | +55 61 98116 7866


 

 

De: fabric@... <fabric@...> Em nome de Curtis Miles
Enviada em: sexta-feira, 1 de abril de 2022 10:32
Para: fabric@...
Assunto: [Hyperledger Fabric] Transaction read/write sets are bleeding into each other

 

Hello world!

 

I’ve hit what appears to be a strange situation when testing my soon-to-be production network under a bit of (very light) load.  I have a very simple chaincode function that is doing two things within a single transaction:
1. Retrieving a document of type A by id, updating it, and storing it back (using its same id)

2. Storing a new object of type B by id (the object is passed in a parameter to the chaincode function)

 

When I try to execute a number of these transactions in parallel (e.g. 5) such that they are included in the same block, I’m *randomly* getting a ENDORSEMENT_POLICY_FAILURE error.  This didn’t make any sense to me because each transaction is dealing with distinct objects of type A and B and nothing else is going on in the network at the time.  So I look into the blocks that had the transactions that were failing and noticed something very strange.  It looks like the items in the read/write sets in the transactions are bleeding into each other.  For example, a single block includes the following read/write sets within three different transactions:

 

Transaction 1 (which looks correct to me):

{

    "namespace": "projectXYZ",

    "rwset": {

"reads": [

        {

             "key": "A1",

             "version": {

                 "block_num": "79389",

                 "tx_num": "0"

              }

               },

             {

                     "key": "B1",

             "version": null

             }

       ],

       "range_queries_info": [],

       "writes": [

             {

        "key": "A1",

        "is_delete": false,

        "value": "{\"id\":\"1\”, \"type\":\"A\”}"}"

             },

             {

        "key": "B1",

        "is_delete": false,

        "value": "{\"id\":\"1\”, \"type\":\"B\”}"}"

             }

       ],

       "metadata_writes": []

    },

    "collection_hashed_rwset": []

}

 

Transaction 2 (has an extra read/write of A3, which I would have expected to be in a different transaction):

{

    "namespace": "projectXYZ",

    "rwset": {

"reads": [

        {

             "key": "A2",

             "version": {

                 "block_num": "79389",

                 "tx_num": "0"

              }

               },

               {

                     "key": "A3",

             "version": {

                 "block_num": "79389",

                 "tx_num": "0"

               }

             },

             {

                     "key": "B2",

             "version": null

             }

       ],

       "range_queries_info": [],

       "writes": [

             {

        "key": "A2",

        "is_delete": false,

        "value": "{\"id\":\"2\”, \"type\":\"A\”}"}"

             },

             {

        "key": "A3",

        "is_delete": false,

               "value": "{\"id\":\"3\”, \"type\":\"A\”}"}"

             },

             {

        "key": "B2",

        "is_delete": false,

        "value": "{\"id\":\"2\”, \"type\":\"B\”}"}"

             }

       ],

       "metadata_writes": []

    },

    "collection_hashed_rwset": []

}

 

Transaction 3 (has only a read of A3, with no write of A3 or B3):

{

    "namespace": "projectXYZ",

    "rwset": {

"reads": [

        {

             "key": "A3",

             "version": {

                 "block_num": "79389",

                 "tx_num": "0"

              }

               }

       ],

       "range_queries_info": [],

       "writes": [],

       "metadata_writes": []

    },

    "collection_hashed_rwset": []

}

 

If I only submit one transaction per block, everything is fine (although for performance reasons, that isn’t going to work for me). 

 

Does anyone have any ideas why this might be happening?  Shouldn’t it be fundamentally impossible for these transactions to bleed into each other?  Can you think of anything I might be doing wrong that is causing this?

 

Thanks for any help you can offer!

Curtis.

 

 

 

 

 


 

--







Regarding Hyperledger Mentorship Program #hyperledger-fabric #idemix

Sheetal Jain
 

Hello, Community
I am a pre-final computer science student from India. Recently, I have contributed to the documentation related issues in the repositories of Hyperledger in one of the open-source programs which has motivated me a lot to contribute more to this project and now I am looking forward to contributing to Hyperledger through the Hyperledger Mentorship Program by contributing to "Identity Mixer Support for both Fabric Gateway SDK for Java and Fabric Gateway Client API for Java" project. As I am a complete beginner, I need help from the community on how I can start?
Here is the link to Project: Identity Mixer Support for both Fabric Gateway SDK for Java and Fabric Gateway Client API for Java

I am looking forward to connecting with you all and learning a lot from this community.

Thank you
Sheetal Jain
https://www.linkedin.com/in/sheetaljain225/