Date   

ANNOUNCEMENT: Hyperledger Fabric fix release v2.4.3 is now available!

David Enyeart
 

Hyperledger Fabric fix release v2.4.3 is now available. See the list of fixes in the release notes:

https://github.com/hyperledger/fabric/releases/tag/v2.4.3

 

 


Re: Extend network with new orderers while is running

David Enyeart
 

Starting in v2.3 the orderer channel participation API and osnadmin client allow you to have any orderer node join/unjoin any channel. This allows you to scale and spread the channel load over as many orderer nodes as you like. See details in the doc at:

https://hyperledger-fabric.readthedocs.io/en/latest/create_channel/create_channel_participation.html

 

 

From: <fabric@...> on behalf of Nikos Karamolegkos <nkaram@...>
Date: Friday, February 25, 2022 at 7:19 AM
To: "fabric@..." <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] Extend network with new orderers while is running

 

Thank you. But in case the orgs have to join many many channels what is the best approach? Should I establish a new network (with new orgs) after a specific number of channels is reached? Or in theory by increasing the orderer nodes or/and the ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd
Thank you. But in case the orgs have to join many many channels what is the best approach? Should I establish a new network (with new orgs) after a specific number of channels is reached? Or in theory by increasing the orderer nodes or/and the resources of the nodes I can some how solve (bypass) the problem?


Fabric-SDK -Golang -API error #fabric-questions

jeff.jo95z@...
 

I was trying to implement Fabric SDK-Golang. I was trying to submit the transactions using api
I got the below error:


2022/02/25 19:53:15 ============ application-golang starts ============
 
Submit Transaction: createBankTrxns  
reqBody: "{\"transactionId\":\"TXN00000003\",\"country\":\"Indonesia\",\"currency\":\"Rupiah\",\"amount\":\"200000\", \"origin\":\"US\",\"date\":
\"29-09-2021\"}"
 
 
 
2022/02/25 19:53:19 http: panic serving [::1]:36944: failed to submit transaction: rpc error: code = Canceled desc = context canceled
 
goroutine 8 [running]:
 
net/http.(*conn).serve.func1(0xc00044c280)
 
        /usr/local/go/src/net/http/server.go:1824 +0x153
 
panic(0x981940, 0xc000077160)
 
        /usr/local/go/src/runtime/panic.go:971 +0x499
 
main.createBankTrxns(0xc000079300, 0xc000030000, 0x99)
 
        /home/jeffin/BankConsortiumHLF-main/application-gateway-go/assetTransfer.go:85 +0x44c
 
main.createBankTrxnsCall(0xae4b40, 0xc0004580e0, 0xc00038e400)
 
        /home/jeffin/BankConsortiumHLF-main/application-gateway-go/assetTransfer.go:60 +0xbc
 
net/http.HandlerFunc.ServeHTTP(0xa5fc90, 0xae4b40, 0xc0004580e0, 0xc00038e400)
 
        /usr/local/go/src/net/http/server.go:2069 +0x44
 
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000e8480, 0xae4b40, 0xc0004580e0, 0xc00038e200)
 
        /home/jeffin/go/pkg/mod/github.com/gorilla/mux@....0/mux.go:210 +0xd3
 
net/http.serverHandler.ServeHTTP(0xc000458000, 0xae4b40, 0xc0004580e0, 0xc00038e200)
 
        /usr/local/go/src/net/http/server.go:2887 +0xa3
 
net/http.(*conn).serve(0xc00044c280, 0xae5480, 0xc000078800)
 
        /usr/local/go/src/net/http/server.go:1952 +0x8cd
 
created by net/http.(*Server).Serve
 
        /usr/local/go/src/net/http/server.go:3013 +0x39b


SDK file is attached along with this for reference


Re: Extend network with new orderers while is running

Nikos Karamolegkos
 

Thank you. But in case the orgs have to join many many channels what is the best approach? Should I establish a new network (with new orgs) after a specific number of channels is reached? Or in theory by increasing the orderer nodes or/and the resources of the nodes I can some how solve (bypass) the problem?


Re: Extend network with new orderers while is running

Param
 

what happens if the number of channel increase more than 50? Can I add one more orderer node in the orderer org without affecting the network? I mean how scalable is that? Is there any upper threshold?

Based on the resource allocation, we may find performance issues.  It is well explained in the same section:

"And because, each channel an ordering node participates in is, logically, a separate Raft instance, an orderer participating in 100 channels is actually doing 100x the work as an ordering node in a single channel."

Running update to the ordering service is supported: It is documented here: https://hyperledger-fabric.readthedocs.io/en/latest/raft_configuration.html?highlight=adding%20orderer#reconfiguration



Re: Extend network with new orderers while is running

Nikos Karamolegkos
 

Extending the previous question, if I use the test-network and deploy multiple channels where the same orgs are joining then the same configtx file is used for all the channels. Correct? Also, as I have seen I can not delete a channel. However, is it possible for the joined orgs to leave the channel? If yes, how can I do that?


Re: About endorsing policies

J K
 

As far as I can tell - the endorsement will only happen in the second call, as you are only reading values in the first one and transacting in the second (writing to ledger)..


On Thursday, 30 December, 2021, 01:01:43 am IST, Marcos Sarres <marcos.sarres@...> wrote:


Hello Fabrizio,

 

If you separated your chaincode in 2 transactions it means each one of then will have to apply the chaincode endorsing policy in order to change the channel ledger.

 

Remember that each chaincode transaction returns only a proposal from the org it has been endorsed. No ledger updating at this point. After that, this proposal needs to be tied with other proposals from other orgs and then submitted to the orderer for endorsing policy verification and channel updating.

 

Using 1 transaction instead of 2 is an option only if both transactions can be registered at the same ledger state.

 

Regards,

 

Marcos Sarres | CEO | +55 61 98116 7866

 

 

De: fabric@... <fabric@...> Em nome de famar
Enviada em: quarta-feira, 29 de dezembro de 2021 05:18
Para: fabric@...
Assunto: [Hyperledger Fabric] About endorsing policies

 

Hello everyone,

I have a question regarding the endorsing process.

The app I am creating involves calling two transactions via Java SDK. The first one creates an asset, checks that its type is present in a list and returns a boolean value. At this point, if the return is true, the second transaction is started and operates the modification of another asset.

From what I understand, the endorsing process should start every time a transaction modifies the ledger state, but considering that, even if there are two transactions, the general process is unique, would it be possible to make only one check when the first transaction starts?

I hope I have been clear enough.

Thanks


Re: Fabric-SDK -Golang error #fabric-questions

Andrew Coleman
 

The 'Details' field within the error will give you a clue as to why it failed to endorse.  Take a look at this sample code for how to extract the details.


Extend network with new orderers while is running

Nikos Karamolegkos
 

An other hot question. My network consist of 4 organizationσ. Specifically, 3 are peer orgs (2 peers each one) and 1 orderer org (has 2 nodes-for availability). These orgs can join many channels in case is needed (more than 100). I have seen that:

"The optimal number of ordering nodes for your ordering service ultimately depends on your use case, your resources, and your topology. However, clusters of three, five, seven, or nine nodes, are the most popular, with no more than about 50 channels per orderer."

My question is what happens if the number of channel increase more than 50? Can I add one more orderer node in the orderer org without affecting the network? I mean how scalable is that? Is there any upper threshold?

Thanks

-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: invoke transactions using JSON

Matthew White
 

Hello…

 

The short answer is yes if you use the ContractAPI for the smart contract; especially so if you are able to use strongly typed language such as Java TypeScript, and Go

 

More detail:

 

From the client application, the `submitTransaction()` method takes an array of strings, the first being the name of the transaction function in the contract to run, and then the parameters. One of these parameters could be the JSON string of the ‘object’ that you want to pass.

 

Inside the contract you can create something like this; assuming typescript here.

 

    @Transaction()

    @Returns("Complex")

    public async getComplexAsset(ctx:Context): Promise<Complex>{

        let c = new Complex();

        c.id = "OBJECT_2";

        c.value = 100;

        c.description = new Description();

        c.description.colour="Vermillion"

        c.description.owners=["Alice","Bob"]

 

        return c;

    }

 

The `Complex` type is defined as

 

import {Object as DataType, Property} from 'fabric-contract-api';

 

@DataType()

export class Description {

  @Property()

  public colour: string;

 

  @Property('owners','string[]')

  public owners: string[]

}

 

@DataType()

export class Complex {

 

    @Property()

    public id: string;

 

    @Property()

    public value: number;

 

    @Property()

    public description: Description;

 

}

 

 

If you read the following stackoverflow answer I expand on how this is then represented in the Contracts metadata.. This can be used as a template to create similar JSON structures client side.

 

https://stackoverflow.com/questions/71157206/return-type-of-transaction/71163063#71163063

 

Hope this helps!

 

From: fabric@... <fabric@...> On Behalf Of Nikos Karamolegkos
Sent: 23 February 2022 14:58
To: fabric <fabric@...>
Subject: [EXTERNAL] [Hyperledger Fabric] invoke transactions using JSON

 

I would like to build BC network where the BC client will collect sensors measurements for a time window. When the window is full will calculate the hash of the data and will init a transaction with the data of the window and the hash for this ZjQcmQRYFpfptBannerStart

This Message Is From an External Sender

This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd

I would like to build BC network where the BC client will collect sensors measurements for a time window. When the window is full will calculate the hash of the data and will init a transaction with the data of the window and the hash for this deviceID. Something like:

{"function":"WriteAsset","Args":["deviceID","window_values, hash"]}

The chaincode will parse the windows_values and If the data are according the chaincode rules will write the hash to ledger (the format of the ledger will be something like {key=deviceID, value=hash}). My question is what is the best way to pass these data (window_values) to the chaincode through the transaction. For example, can I pass a JSON as argument?

-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Fabric-SDK -Golang error #fabric-questions

jeff.jo95z@...
 

I was trying to implement fabric SDK-Golang. Only a single organization is there in the network
While submitting the transaction got this error:

 
createCar:
 
Submit Transaction: createCar  
panic: failed to submit transaction: rpc error: code = Aborted desc = failed to endorse transaction, see attached details for more info
 
 
 
goroutine 1 [running]:
 
main.createCar(0xc00023ff18)
 
        /home/jeffin/FabricNetwork-2.x-singleOrg/application-gateway-go/assetTransfer.go:80 +0x23a
 
main.main()
 
        /home/jeffin/FabricNetwork-2.x-singleOrg/application-gateway-go/assetTransfer.go:67 +0x377
 
exit status 2

Attaching the sdk file for the reference


Re: Multihost setting of fabric-samples causing : problem creating channel: 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies

mohitbt@...
 

I meant (same crypto/channel config files) *


Multihost setting of fabric-samples causing : problem creating channel: 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies

mohitbt@...
 

Hi,

I have modified first-network from fabric samples (using fabric v2.2) to work with 2 or 3 orgs (based on a flag) from the get go (by default only 2 orgs come up on ./network.sh up). Everything works great when I run it locally, now I copy all the generated crypto material and tx configuration files generated locally to AWS EC2 instances (1 org per instance) and then try to run ./network.sh up. All the instances are connected with an overlay network made with docker swarm. In the multi-host setting, I have been able to run the 2 org setting (after copying all the generated crypto material/tx configurations) but when I run the 3 org setting (./network.sh up) I get the following error:
 problem creating channel: 0 sub-policies were satisfied, but this policy requires 1 of the 'Writers' sub-policies

Looking at the orderer logs I see the following error:

Invalid identity: certificate subject=CN=peer0.org3.example.com,OU=peer,L=San Francisco,ST=California,C=US serialnumber=102093448807241263107452389077900109213 error="MSP Org3MSP is not defined on channel"


I am not sure what is causing this error, because I am able to run this exact setting locally (sample crypto/channel config files)


Re: Fabric-SDK -Golang error #fabric-questions

Mark Lewis
 

Make sure you are using a Fabric v2.4 peer with the Gateway service enabled (which it is by default). The Gateway service is not available in Fabric versions prior to v2.4 so you won't be able to use the Fabric Gateway client API with older Fabric versions.

See: https://hyperledger-fabric.readthedocs.io/en/release-2.4/sdk_chaincode.html


Re: Submit large amount of data

Mark Lewis
 

Depending on how important your data integrity is, you might consider a more robust hash algorithm than MD5:

https://en.wikipedia.org/wiki/Hash_function_security_summary

Hardware acceleration for SHA256 is commonly available in modern processors so you might even find that it's faster in addition to being much more secure than MD5.


Re: invoke transactions using JSON

Sam Venzi
 

Hi Nikos,

You most certainly can send a json object as a parameter. You have two options as I see it:

1. pass the json in string format and then convert it to an object in the chaincode (you might have to do some character scaping)
2. pass the json as an object (no string quotes), but that might be a problem when writing the command (using an SDK that would be way easier)

If you are using a chaincode written in Go you can receive this json argument as map[string]interface{} which is supported in the contract API: https://github.com/hyperledger/fabric-contract-api-go/blob/main/tutorials/getting-started.md#writing-contract-functions

Best,

Samuel Venzi
CTO @ GoLedger


On 23 Feb 2022 11:58 -0300, Nikos Karamolegkos <nkaram@...>, wrote:

I would like to build BC network where the BC client will collect sensors measurements for a time window. When the window is full will calculate the hash of the data and will init a transaction with the data of the window and the hash for this deviceID. Something like:

{"function":"WriteAsset","Args":["deviceID","window_values, hash"]}

The chaincode will parse the windows_values and If the data are according the chaincode rules will write the hash to ledger (the format of the ledger will be something like {key=deviceID, value=hash}). My question is what is the best way to pass these data (window_values) to the chaincode through the transaction. For example, can I pass a JSON as argument?

--  
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


invoke transactions using JSON

Nikos Karamolegkos
 

I would like to build BC network where the BC client will collect sensors measurements for a time window. When the window is full will calculate the hash of the data and will init a transaction with the data of the window and the hash for this deviceID. Something like:

{"function":"WriteAsset","Args":["deviceID","window_values, hash"]}

The chaincode will parse the windows_values and If the data are according the chaincode rules will write the hash to ledger (the format of the ledger will be something like {key=deviceID, value=hash}). My question is what is the best way to pass these data (window_values) to the chaincode through the transaction. For example, can I pass a JSON as argument?

-- 
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


Re: Submit large amount of data

Ahmet Orkun Gedik
 

Hi Sam,

Yes I changed my code to use MD5 checksum instead of whole string at blockchain level. Thank you for your time and helps.

Best regards.

Orkun Gedik

Saygılarımla/Best regards/Mit freundlichen Grüßen,

 

Ahmet Orkun Gedik
Sap Basis İzmir Yönetici Takım Lideri / SAP Basis Executive Team Leader
Sap Basis İzmir Yönetici Takım Liderliği


KoçSistem
Bilgi ve İletişim Hizmetleri A.Ş.
T: +90 (232) 242 0699
M:+90 (549) 742 3219

KoçSistem Logo

 

Image



From: fabric@... <fabric@...> on behalf of Sam Venzi <samuel.venzi@...>
Sent: Wednesday, February 23, 2022 5:13:26 PM
To: fabric@... <fabric@...>; Mark Lewis <Mark.S.Lewis@...>
Subject: Re: [Hyperledger Fabric] Submit large amount of data
 
I agree with Mark that, depending on the application, a hash of the data might be enough. In other applications, I’ve seen the need to trace all of the changes to a given asset and in that case the complete information must be in the ledger. 

I think it’s a balance between what’s important for the application and it is the responsibility of the network architect to do. Just know that you might be losing performance due to huge payloads.

Samuel Venzi
CTO @ GoLedger


On 23 Feb 2022 11:07 -0300, Mark Lewis <Mark.S.Lewis@...>, wrote:
Just an aside since your technical questions on how to make this work have been answered... is the ledger really the correct place to store such large amounts of data? An option to consider might be to store large pieces of data in a separate data store (database or anything else suitable), and then record a hash of that data on the ledger so you can be sure you are seeing the correct data associated with a given transaction.

Gizlilik Sınıflandırması : KoçSistem İçi Paylaşım

Bu e-posta mesaji kisiye özel olup, gizli bilgiler iceriyor olabilir. Eger bu e-posta mesaji size yanlislikla ulasmissa,  icerigini hic bir sekilde kullanmayiniz ve ekli dosyalari acmayiniz. Bu durumda lutfen e-posta mesajini kullaniciya hemen geri gonderiniz  ve  tum kopyalarini mesaj kutunuzdan siliniz. Bu e-posta mesaji, hic bir sekilde, herhangi bir amac icin cogaltilamaz, yayinlanamaz ve para karsiligi satilamaz.  Bu e-posta mesaji viruslere karsi anti-virus sistemleri tarafindan taranmistir. Ancak yollayici, bu e-posta mesajinin - virus koruma sistemleri ile kontrol ediliyor olsa bile - virus icermedigini garanti etmez ve meydana gelebilecek zararlardan dogacak hicbir sorumlulugu kabul etmez.
This message is intended solely for the use of the individual or entity to whom it is addressed , and may contain confidential  information. If you are not the intended recipient of this message or you receive this mail in error, you should refrain from making any use of the contents and from opening any attachment. In that case, please notify the sender immediately and return the message to the sender, then, delete and destroy all copies. This e-mail message, can not be copied, published or sold for any reason. This e-mail message has been swept by anti-virus systems for the presence of computer viruses. In doing so, however,  sender  cannot warrant that virus or other forms of data corruption may not be present and do not take any responsibility in any occurrence.


Fabric-SDK -Golang error #fabric-questions

jeff.jo95z@...
 

Hi team,

I was trying to do the transactions with the help of Fabric-sdk-Go lang

While executing I got the following error:

panic: failed to submit transaction: rpc error: code = Unimplemented desc = unknown service gateway.Gateway

What was the cause of this issue?


Error message explanation and resolve issue request

asaduzzaman.rakib.10@...
 

I got this following error:
Error: received bad response, status 500: access denied for [GetChainInfo][mychannel]: [Failed evaluating policy on signed data during check policy on channel [mychannel] with policy [/Channel/Application/Readers]: [implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Readers' sub-policies to be satisfied]]

Before this error I executed this following command :
peer channel getinfo -c mychannel

I tried to add an additional organization and I also added blockchain explorer to see the changes.

Can anyone please explain me about this error and how to resolve this error?