Odd issue with write transactions #fabric


mhdalkhaldibc@...
 

Hello all,

I'm facing an odd issue. My workload module looks like this:
'use strict';

const { WorkloadModuleBase } = require('@hyperledger/caliper-core');

class MyWorkload extends WorkloadModuleBase {
constructor() {
super();
this.txIndex = 0;
}

async initializeWorkloadModule(workerIndex, totalWorkers, roundIndex, roundArguments, sutAdapter, sutContext) {
await super.initializeWorkloadModule(workerIndex, totalWorkers, roundIndex, roundArguments, sutAdapter, sutContext);
 
for (let i=0; i<this.roundArguments.assets; i++) {
const assetID = `${this.workerIndex}_${i}`;
console.log(`Worker ${this.workerIndex}: Creating asset ${assetID}`);
const request = {
contractId: this.roundArguments.contractId,
contractFunction: 'CreateAsset',
invokerIdentity: 'User1',
contractArguments: [assetID,'blue','20','penguin','500'],
readOnly: false
};
console.log(`request create: `, request);


await this.sutAdapter.sendRequests(request);
}
}

async submitTransaction() {
this.txIndex++;
const request = {
contractId: this.roundArguments.contractId,
contractFunction: 'CreateAsset',
invokerIdentity: 'User1',
contractArguments: [this.txIndex,'blue','20','penguin','500'],
readOnly: false
};
await this.sutAdapter.sendRequests(request);
 
}
....
 
As you see in the submitTransaction part I'm sending a write tx. while read txs worked fine before, write txs are failing with error:
error [caliper] [connectors/v2/FabricGateway] Failed to perform submit transaction [CreateAsset] using arguments [3,blue,20,penguin,500],  with error: Error: No endorsement plan available
 
From the peer logs perspective, the error shown is:
[core.comm] ServerHandshake -> ERRO c49 Server TLS handshake failed in 335.049198ms with error EOF server=PeerServer remoteaddress=
 
What is confusing to me is that in the initializeWorkloadModule part of the workload module, Caliper is sending write transactions and creating assets successfully without any issues. If it was a tls issue as it appears it should always fail, right?
 
Any ideas?
Thanks