Date   

RAFT based orderer crash #fabric-orderer #raft #fabric

mariya.k@...
 

Hi 

I successfully deployed orderer and 3 raft node part of network(kubernate based cluster)  and dont see any error.  But below error after I restart just orderer node (orderer + raft0, raft1,raft2 raft3) 

I could delete all nodes and deploy again, but if any reason in production orderer node restarted (kubernate deployment) dont see any way to recover without shutdown and restart

channel=e2e-orderer-syschan node=1 panic: tocommit(6) is out of range [lastIndex(5)]. Was the raft log corrupted, truncated, or lost? goroutine 130 [running]: 

Mariya

------------------------------
Setup:

 Version: 2.0.1

 Commit SHA: 1cfa5da

 Go version: go1.13.4

 OS/Arch: linux/amd64

 

Error:
-------------------------------
020-03-22 07:21:06.745 UTC [orderer.common.server] Main -> INFO 3de Starting orderer: Version: 2.0.1 Commit SHA: 1cfa5da Go version: go1.13.4 OS/Arch: linux/amd64 2020-03-22 07:21:06.746 UTC [orderer.common.server] Main -> INFO 3df Beginning to serve requests 2020-03-22 07:21:06.760 UTC [grpc] HandleSubConnStateChange -> DEBU 3e0 pickfirstBalancer: HandleSubConnStateChange: 0xc0000aaab0, READY 2020-03-22 07:21:06.760 UTC [grpc] HandleSubConnStateChange -> DEBU 3e1 pickfirstBalancer: HandleSubConnStateChange: 0xc0000aad40, READY 2020-03-22 07:21:06.762 UTC [grpc] HandleSubConnStateChange -> DEBU 3e2 pickfirstBalancer: HandleSubConnStateChange: 0xc0003e0f90, READY 2020-03-22 07:21:08.952 UTC [orderer.common.cluster] Step -> DEBU 3e3 Connection from raft0.fabric(10.1.0.205:38250) 2020-03-22 07:21:08.955 UTC [orderer.common.cluster.step] handleMessage -> DEBU 3e4 Received message from raft0.fabric(10.1.0.205:38250): ConsensusRequest for channel e2e-orderer-syschan with payload of size 28 2020-03-22 07:21:08.956 UTC [orderer.consensus.etcdraft] Step -> INFO 3e5 1 [term: 1] received a MsgHeartbeat message with higher term from 2 [term: 2] channel=e2e-orderer-syschan node=1 2020-03-22 07:21:08.956 UTC [orderer.consensus.etcdraft] becomeFollower -> INFO 3e6 1 became follower at term 2 channel=e2e-orderer-syschan node=1 2020-03-22 07:21:08.956 UTC [orderer.consensus.etcdraft] commitTo -> PANI 3e7 tocommit(6) is out of range [lastIndex(5)]. Was the raft log corrupted, truncated, or lost? channel=e2e-orderer-syschan node=1 panic: tocommit(6) is out of range [lastIndex(5)]. Was the raft log corrupted, truncated, or lost? goroutine 44 [running]: github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc0000de6e0, 0x0, 0x0, 0x0) /go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc000012300, 0x4, 0x1085297, 0x5d, 0xc000aa9440, 0x2, 0x2, 0x0, 0x0, 0x0) /go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x100 github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...) /go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159 github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(0xc000012308, 0x1085297, 0x5d, 0xc000aa9440, 0x2, 0x2) /go/src/github.com/hyperledger/fabric/common/flogging/zap.go:74 +0x7c github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft.(*raftLog).commitTo(0xc00014b650, 0x6) /go/src/github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft/log.go:203 +0x131 github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft.(*raft).handleHeartbeat(0xc000a35e00, 0x8, 0x1, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /go/src/github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft/raft.go:1324 +0x54 github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft.stepFollower(0xc000a35e00, 0x8, 0x1, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /go/src/github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft/raft.go:1269 +0x459 github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft.(*raft).Step(0xc000a35e00, 0x8, 0x1, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /go/src/github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft/raft.go:971 +0x1398 github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft.(*node).run(0xc0009aa060, 0xc000a35e00) /go/src/github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft/node.go:357 +0x10d0 created by github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft.StartNode /go/src/github.com/hyperledger/fabric/vendor/go.etcd.io/etcd/raft/node.go:233 +0x407

 


Re: Error while Approving chaincode for ORG.

Adhav Pavan
 

Hello David,

Thank you so much for the quick reply.

I have checked the peer signed certificate and it has OU as a peer.

Subject: C = US, ST = California, L = San Francisco, OU = peer, CN = peer0.org1.example.com

The weird thing is, it worked previously and suddenly started giving the mentioned error.

Thank you.

Heartfelt Regards,

Pavan Adhav
Blockchain Developer, Infinichains
phone:  8390114357
email:  pavan@...
------
Please excuse my brevity.


On Sun, Mar 22, 2020 at 2:12 AM David Enyeart <enyeart@...> wrote:

Make sure your peer certificate has "OU=peer" in the Subject.

You can view your certificate using openssl, e.g.:
openssl x509 -in <mspConfigPath>/msp/signcerts/peer0.org1.example.com-cert.pem -noout -text

For more details about identity classifications:
https://hyperledger-fabric.readthedocs.io/en/latest/msp.html#identity-classification


Dave Enyeart

"Adhav Pavan" ---03/21/2020 11:22:11 AM---Hello Experts, I am creating a network using fabric 2.0.

From: "Adhav Pavan" <adhavpavan@...>
To: hyperledger-fabric <hyperledger-fabric@...>
Date: 03/21/2020 11:22 AM
Subject: [EXTERNAL] [Hyperledger Fabric] Error while Approving chaincode for ORG.
Sent by: fabric@...





Hello Experts,

I am creating a network using fabric 2.0.

As per the new lifecycle method, I am following as mentioned in the test-network.

I have 2 Org having 2 peers in each, not using CLI.

Steps:
1)  Channel Artifacts Creation (Genesis Block, Channel.tx)
2) Channel Creation
3) Deploying Chaincode
    • Package Chaincode
    • Install Chaincode
    • QueryInstalled Chaincode
    • Approve for My Org
I am getting an error while approving for my organization.

Here is the command
    peer lifecycle chaincode approveformyorg \
     -o localhost:7050  \
     --ordererTLSHostnameOverride orderer.example.com \
     --tls $CORE_PEER_TLS_ENABLED \
     --cafile $ORDERER_CA \
     --channelID $CHANNEL_NAME \
     --name fabcar \
     --version ${VERSION} \
     --init-required \
     --package-id ${PACKAGE_ID} \
     --sequence ${VERSION}

 Environmental Variables:
Getting the following error:

Peer log:
VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection _implicit_org_Org1MSP chaincode _lifecycle in tx 5:0 failed: signature set did not satisfy the policy

Just above this error, getting following
[cauthdsl] func2 -> DEBU 197cf 0xc0037051e0 identity 0 does not satisfy principal: The identity is not a [PEER] under this MSP [Org1MSP]: The identity does not contain OU [PEER], MSP: [Org1MSP].

Default Policy:
LifecycleEndorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Endorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"



 Please correct me If I am mistaken somewhere. I am following test-network.

 Let me know for more network information.

Thank you so much for your help.

Heartfelt Regards,

Pavan Adhav
Blockchain Developer, Infinichains
phone:  8390114357
email:  adhavpavan@...
------
Please excuse my brevity.




Re: Error while Approving chaincode for ORG.

David Enyeart
 

Make sure your peer certificate has "OU=peer" in the Subject.

You can view your certificate using openssl, e.g.:
openssl x509 -in <mspConfigPath>/msp/signcerts/peer0.org1.example.com-cert.pem -noout -text

For more details about identity classifications:
https://hyperledger-fabric.readthedocs.io/en/latest/msp.html#identity-classification


Dave Enyeart

"Adhav Pavan" ---03/21/2020 11:22:11 AM---Hello Experts, I am creating a network using fabric 2.0.

From: "Adhav Pavan" <adhavpavan@...>
To: hyperledger-fabric <hyperledger-fabric@...>
Date: 03/21/2020 11:22 AM
Subject: [EXTERNAL] [Hyperledger Fabric] Error while Approving chaincode for ORG.
Sent by: fabric@...





Hello Experts,

I am creating a network using fabric 2.0.

As per the new lifecycle method, I am following as mentioned in the test-network.

I have 2 Org having 2 peers in each, not using CLI.

Steps:
1)  Channel Artifacts Creation (Genesis Block, Channel.tx)
2) Channel Creation
3) Deploying Chaincode
    • Package Chaincode
    • Install Chaincode
    • QueryInstalled Chaincode
    • Approve for My Org
I am getting an error while approving for my organization.

Here is the command
    peer lifecycle chaincode approveformyorg \
     -o localhost:7050  \
     --ordererTLSHostnameOverride orderer.example.com \
     --tls $CORE_PEER_TLS_ENABLED \
     --cafile $ORDERER_CA \
     --channelID $CHANNEL_NAME \
     --name fabcar \
     --version ${VERSION} \
     --init-required \
     --package-id ${PACKAGE_ID} \
     --sequence ${VERSION}

 Environmental Variables:
Getting the following error:

Peer log:
VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection _implicit_org_Org1MSP chaincode _lifecycle in tx 5:0 failed: signature set did not satisfy the policy

Just above this error, getting following
[cauthdsl] func2 -> DEBU 197cf 0xc0037051e0 identity 0 does not satisfy principal: The identity is not a [PEER] under this MSP [Org1MSP]: The identity does not contain OU [PEER], MSP: [Org1MSP].

Default Policy:
LifecycleEndorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Endorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"



 Please correct me If I am mistaken somewhere. I am following test-network.

 Let me know for more network information.

Thank you so much for your help.

Heartfelt Regards,

Pavan Adhav
Blockchain Developer, Infinichains
phone:  8390114357
email:  adhavpavan@...
------
Please excuse my brevity.




Error while Approving chaincode for ORG.

Adhav Pavan
 

Hello Experts,

I am creating a network using fabric 2.0.

As per the new lifecycle method, I am following as mentioned in the test-network.

I have 2 Org having 2 peers in each, not using CLI.

Steps:
1)  Channel Artifacts Creation (Genesis Block, Channel.tx)
2) Channel Creation
3) Deploying Chaincode
  • Package Chaincode
  • Install Chaincode
  • QueryInstalled Chaincode
  • Approve for My Org
I am getting an error while approving for my organization.

Here is the command
peer lifecycle chaincode approveformyorg \
 -o localhost:7050  \
 --ordererTLSHostnameOverride orderer.example.com \
 --tls $CORE_PEER_TLS_ENABLED \
 --cafile $ORDERER_CA \
 --channelID $CHANNEL_NAME \
 --name fabcar \
 --version ${VERSION} \
 --init-required \
 --package-id ${PACKAGE_ID} \
 --sequence ${VERSION}

 Environmental Variables:
CHANNEL_NAME="mychannel"
CC_RUNTIME_LANGUAGE="golang"
VERSION="1"
CC_SRC_PATH="./artifacts/src/github.com/fabcar/go/"

export CORE_PEER_TLS_ENABLED=true
export ORDERER_CA=${PWD}/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

export PEER0_ORG1_CA=${PWD}/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt 
export FABRIC_CFG_PATH=${PWD}/artifacts/channel/config/
export CORE_PEER_LOCALMSPID="Org1MSP"

export CORE_PEER_TLS_ROOTCERT_FILE=$PEER0_ORG1_CA
  
export CORE_PEER_MSPCONFIGPATH=${PWD}/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@.../msp
    
export CORE_PEER_ADDRESS=localhost:7051

Getting the following error:

Peer log:
VSCC error: stateBasedValidator.Validate failed, err validation of endorsement policy for collection _implicit_org_Org1MSP chaincode _lifecycle in tx 5:0 failed: signature set did not satisfy the policy

Just above this error, getting following
[cauthdsl] func2 -> DEBU 197cf 0xc0037051e0 identity 0 does not satisfy principal: The identity is not a [PEER] under this MSP [Org1MSP]: The identity does not contain OU [PEER], MSP: [Org1MSP].

Default Policy:
LifecycleEndorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"
Endorsement:
Type: ImplicitMeta
Rule: "MAJORITY Endorsement"



 Please correct me If I am mistaken somewhere. I am following test-network.

 Let me know for more network information.

Thank you so much for your help.

Heartfelt Regards,

Pavan Adhav
Blockchain Developer, Infinichains
phone:  8390114357
email:  adhavpavan@...
------
Please excuse my brevity.


Re: Does Hyperledger Fabric support RSA key? #hyperledger-fabric #fabric-ca

Matthew Sykes
 

Fabric does not support RSA keys.


On Fri, Mar 20, 2020 at 10:56 AM shrugupt via Lists.Hyperledger.Org <shrugupt=microsoft.com@...> wrote:
Hi,

As per fabric-ca release-1.4 user guide and MSP documentation, hyperledger fabric support only ECDSA keys. However, latest fabric-ca user guide says that fabric-ca supports RSA key algorithm as well.

Can you please clarify if hypereldger fabric supports RSA keys or not? If this is a newly added feature, then in which release it has been added?

Thanks,
Shruti Gupta



--
Matthew Sykes
matthew.sykes@...


Hyperledger Fabric Documentation Workgroup call - Western hemisphere - Fri, 03/20/2020 #cal-notice

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

Hyperledger Fabric Documentation Workgroup call - Western hemisphere

When:
Friday, 20 March 2020
4:00pm to 5:00pm
(GMT+00:00) Europe/London

Where:
https://zoom.us/j/6223336701

Organizer:
a_o-dowd@... +441962816761

Description:
Documentation workgroup call.
Agenda, minutes and recordings :https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group


Upcoming Event: Hyperledger Fabric Documentation Workgroup call - Western hemisphere - Fri, 03/20/2020 4:00pm-5:00pm #cal-reminder

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

Reminder: Hyperledger Fabric Documentation Workgroup call - Western hemisphere

When: Friday, 20 March 2020, 4:00pm to 5:00pm, (GMT+00:00) Europe/London

Where:https://zoom.us/j/6223336701

View Event

Organizer: Anthony O'Dowd a_o-dowd@... +441962816761

Description: Documentation workgroup call.
Agenda, minutes and recordings :https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group


Does Hyperledger Fabric support RSA key? #hyperledger-fabric #fabric-ca

shrugupt@...
 

Hi,

As per fabric-ca release-1.4 user guide and MSP documentation, hyperledger fabric support only ECDSA keys. However, latest fabric-ca user guide says that fabric-ca supports RSA key algorithm as well.

Can you please clarify if hypereldger fabric supports RSA keys or not? If this is a newly added feature, then in which release it has been added?

Thanks,
Shruti Gupta


Hyperledger Fabric Documentation Workgroup call - Eastern hemisphere - Fri, 03/20/2020 #cal-notice

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

Hyperledger Fabric Documentation Workgroup call - Eastern hemisphere

When:
Friday, 20 March 2020
6:00am to 7:00am
(GMT+00:00) Europe/London

Where:
https://zoom.us/j/6223336701

Organizer:
a_o-dowd@... +441962816761

Description:
Documentation workgroup call.
Agenda, minutes and recordings: https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group


Documentation Workgroup: Agenda for Friday, 20 March

Anthony O'Dowd <a_o-dowd@...>
 

All,

We will hold the documentation workgroup call this Friday this week -- with both an Eastern hemisphere and Western hemisphere call. Please feel free to come along, especially if in these difficult times you'd like to just have a chat with some friendly people. If you're in Europe and wish to join the Western hemisphere call, it's an hour earlier than usual!

You can read all about last week's call at https://wiki.hyperledger.org/display/fabric/2020+03+13+DWG+Agenda It included the now regular V2.x status update from Pam and Joe. Chris and Jim shared a super update on the Hyperledger Global forum event in Phoenix, and Nik walked us through the create channel tutorial in V2. We completed with a remind for doc contributors (of which there are now many), to sign their commits! See below in this week's agenda that Joe will provide a practical walk through on how to do a small doc change. See how easy it is to get going!

btw, all the sessions from the global forum are on YouTube: https://www.youtube.com/playlist?list=PL0MZ85B_96CFY3isYUplorFSenn04WwBt

You can catch up with the recording: https://wiki.hyperledger.org/display/fabric/Recordings

You'll see that there are lots of interesting items for this week, including the above mentioned documentation change walk through from Joe! See  https://wiki.hyperledger.org/display/fabric/2020+03+20+DWG+Agenda for the full agenda.

Please feel free to contribute using the wiki, including helping to build next week's agenda: https://wiki.hyperledger.org/display/fabric/2020+03+27+DWG+Agenda

Thanks!

Pam, Anthony,  Joe, Nik

Meeting Details
-------------
Please use the following link to attend the meeting:  https://zoom.us/j/6223336701

The meeting times are as follows: https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group

Meeting 120A: Friday 20 March
                   1130 India Standard Time
                   1400 China Standard Time
                   1500 Japan Standard Time
                   1700 Australia Eastern Time
                   1400 Singapore Time
                   1000 Gulf Standard Time
                   0900 Moscow Standard Time
                   0600 Greenwich Mean Time
                   0700 Central European Time    

Meeting 120B: Friday 20 Mar
              1100 Central Daylight Time
                   1200 Eastern Daylight Time
                   0900 Pacific Daylight Time
                   1400 Brasil Time (BRT)
                   1600 Greenwich Mean Time
                   1700 Central European Time
                   1800 Moscow Standard Time


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Re: Can chaincode send multiple events in one transaction?

Mr.Phuwanai Thummavet
 

Ok,  I see. Thanks for the clarification.


On Thu, 19 Mar 2020, 20:56 Morgan Bauer, <mbauer@...> wrote:

This is the correct behavior. There is only space for a single event. For example https://github.com/hyperledger/fabric-chaincode-go/blob/2d8992/shim/stub.go#L26

We can see the implementation replaces whatever was previously present https://github.com/hyperledger/fabric-chaincode-go/blob/2d8992/shim/stub.go#L749-L756

This implementation matches the behavior you see.


On 3/18/20 9:52 PM, Mr.Phuwanai Thummavet wrote:
Hi All,

I'm trying to send multiple events from my Go chaincode using SetEvent(). I use NodeJS' registerChaincodeEvent() to subscribe events.

I can receive an event from chaincode correctly if I emit just a single event. But, if I try to emit multiple events I will receive only the latest emitted event. This issue happens both when I emit events with the same event name or different names.

Can anyone shed some light on this?

--
Best Regards,
Phuwanai Thummavet
Blockchain Architect and Full-Stack Developer


Re: Can chaincode send multiple events in one transaction?

Morgan Bauer <mbauer@...>
 

This is the correct behavior. There is only space for a single event. For example https://github.com/hyperledger/fabric-chaincode-go/blob/2d8992/shim/stub.go#L26

We can see the implementation replaces whatever was previously present https://github.com/hyperledger/fabric-chaincode-go/blob/2d8992/shim/stub.go#L749-L756

This implementation matches the behavior you see.


On 3/18/20 9:52 PM, Mr.Phuwanai Thummavet wrote:

Hi All,

I'm trying to send multiple events from my Go chaincode using SetEvent(). I use NodeJS' registerChaincodeEvent() to subscribe events.

I can receive an event from chaincode correctly if I emit just a single event. But, if I try to emit multiple events I will receive only the latest emitted event. This issue happens both when I emit events with the same event name or different names.

Can anyone shed some light on this?

--
Best Regards,
Phuwanai Thummavet
Blockchain Architect and Full-Stack Developer


Increase chaincode instantiation timeout #fabric #docker #fabric-chaincode #fabric-questions #hyperledger-fabric

mark@...
 

Is there anyway to increase the wait time on a chaincode instantiation? The default seems to be about 10 minutes but I have a peer with low bandwidth and the docker image download combined with the container build is taking longer than this (about 15 minutes). I've had a look though the sample core.yaml for possible options to increase this but couldn't find anything.


Upcoming Event: Hyperledger Fabric Documentation Workgroup call - Eastern hemisphere - Fri, 03/20/2020 6:00am-7:00am #cal-reminder

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

Reminder: Hyperledger Fabric Documentation Workgroup call - Eastern hemisphere

When: Friday, 20 March 2020, 6:00am to 7:00am, (GMT+00:00) Europe/London

Where:https://zoom.us/j/6223336701

View Event

Organizer: Anthony O'Dowd a_o-dowd@... +441962816761

Description: Documentation workgroup call.
Agenda, minutes and recordings: https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group


Can chaincode send multiple events in one transaction?

Mr.Phuwanai Thummavet
 

Hi All,

I'm trying to send multiple events from my Go chaincode using SetEvent(). I use NodeJS' registerChaincodeEvent() to subscribe events.

I can receive an event from chaincode correctly if I emit just a single event. But, if I try to emit multiple events I will receive only the latest emitted event. This issue happens both when I emit events with the same event name or different names.

Can anyone shed some light on this?

--
Best Regards,
Phuwanai Thummavet
Blockchain Architect and Full-Stack Developer


NodeSDK Get Latest Orderer Config Block

Nicholas Leonardi
 

Hey guys, 

I'm having trouble getting the latest config block from the orderer
so I can send it to a joining orderer that was added to the system-channel.

I'm using the getChannelConfigFromOrderer() method but it returns
an envelope and not a block.
I need the block and write it to file to send to the new orderer,
but it's coming without the header. 
I've been trying to encode and decode it using configtxlator but to no avail. 

Any help would be appreciated


Next Hyperledger Fabric Application Developer Community call - this Thursday, Mar 19th @ 4pm UTC (4pm UK) - 12noon ET, 9am PT

Paul O'Mahoney <mahoney@...>
 




dear Fabric Application Developer,


the next  Fabric Application Developer community call is scheduled for this  Thursday Mar 5th @ 4pm UTC (currently 4pm UK time, 12noon ET (-4 hrs), 9am PT(-7 hrs) ) - see time zones here.   It lasts approx 30-60 mins FYI.

The agenda will be posted here -> https://wiki.hyperledger.org/display/fabric/Meeting+Agendas%3A+Fabric+Application+Developer+Community+Call

This community call is held bi-weekly via Zoom webconference and is aimed at :

- helping the worldwide Hyperledger Fabric Application Developer community grow (eg. developing applications, smart contracts,  developing application clients, using the SDKs, tutorials/demos etc -  NodeJS/TypeScript, Java, Go etc etc) 
- helping App developers understand / hear more about exciting new things in Fabric, eg. features upcoming or work in progress - ie things that appeal to the developer
- foster more interest, best practices etc in developing applications (eg developing solutions, use cases) with Hyperledger Fabric. 
- opportunity to ask questions of the Fabric team eg. you may have feedback/questions on your experiences developing solutions with Fabric
- to share stuff you've done with the community, eg sample code / sample use cases that others may be interested in

If you wish to share content on a call, just let me know via email direct or DM me on Rocketchat (ID: mahoney1) and I'll put an item on the agenda. Provide the following:
- the topic (state whether its presentation, or demo etc)
- the full name of the presenter, and 
- approx length of your pitch in minutes


The Zoom webconference ID is https://zoom.us/my/hyperledger.community   

More information can be found on the community page -> https://wiki.hyperledger.org/display/fabric/Fabric+Application+Developer+Community+Calls

You can get calendar invites (eg iCal) here

many thanks for your time - feel free to forward this email if you think it is of interest to a colleague.

Paul O'Mahony
Community Lead - Hyperledger Fabric Developer Community
RocketChat:  mahoney1

mahoney@...


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


#fabric Impossible instantiate chaincode due to PANIC ERROR on peer: unexpected Previous block hash #fabric

Magno Alves Cavalcante
 

Trying to instantiate chaincode, and due to PANIC error on PEER0, and peer crashes.

Impossible to instantiate chaincode, because PEER0 crashes doing the process.

Fabric 1.4.3 version: 1 Oderer + 1 Org

I attached here the entire log of CLI, PEER0 and ORDERER, inside same file.
If you inspect CLI log comparing with PEER0 log, you may understand the sequence of commands in CLI and the panic error in PEER0, that terminates PEER0.
All logs are in debug mode.


At CLI docker prompt, I did this command sequence:

1) $> peer channel create -o $ORDERERNAME -c $CHANNELNAME -f $CONFIGTXFOLDER/devchannel.tx --tls --cafile=$ORDERER_TLSCACERT

Result in Cli: UTC [cli.common] readBlock -> INFO 04e Received block: 0

2) $> peer channel join -o $ORDERERNAME -b $CONFIGTXFOLDER/devgenesis.block --tls --cafile=$ORDERER_TLSCACERT

Result in Cli: UTC [channelCmd] executeJoin -> INFO 03e Successfully submitted proposal to join channel

3) $> peer chaincode install -n $CHCODENAME -p $CHCODEPATH -v $CHCODEVERSION -l node --tls --cafile $ADMIN_PEER_TLSCACERT

Result in Cli: UTC [chaincodeCmd] install -> INFO 04a Installed remotely response:<status:200 payload:"OK" >

4) $> peer chaincode instantiate -C $CHANNELNAME -n $CHCODENAME -v $CHCODEVERSION -o $ORDERERNAME -c '{"Args":["init","a","100","b","200"]}' -P "AND ('GuaraniMSP.admin')" --tls --cafile $ORDERER_TLSCACERT --tlsRootCertFiles $CORE_PEER_TLS_ROOTCERT_FILE

Result in PEER0:
UTC [gossip.state] commitBlock -> ERRO 87e Got error while committing(unexpected Previous block hash. Expected PreviousHash = [c87a4b77e4c790f78b0c2e3c97d97de9907a09daf5dc2f039c7e3b3e1440f5d1], PreviousHash referred in the latest block= [953e31164a84d6d1b9b446130d1e7d5af8ede818284e8fa7c315b2125b519e38]
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*blockfileMgr).addBlock
[...]
UTC [gossip.state] deliverPayloads -> PANI 87f Cannot commit block to the ledger due to unexpected Previous block hash. Expected PreviousHash = [c87a4b77e4c790f78b0c2e3c97d97de9907a09daf5dc2f039c7e3b3e1440f5d1], PreviousHash referred in the latest block= [953e31164a84d6d1b9b446130d1e7d5af8ede818284e8fa7c315b2125b519e38]
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*blockfileMgr).addBlock
[...]
/opt/go/src/runtime/asm_amd64.s:1333
panic: Cannot commit block to the ledger due to unexpected Previous block hash. Expected PreviousHash = [c87a4b77e4c790f78b0c2e3c97d97de9907a09daf5dc2f039c7e3b3e1440f5d1], PreviousHash referred in the latest block= [953e31164a84d6d1b9b446130d1e7d5af8ede818284e8fa7c315b2125b519e38]
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*blockfileMgr).addBlock
[...]


Regards,
Magno


Re: #hyperledger-fabric Problems after peer channel update: PANI 044 Cannot commit block to the ledger due to config currently at sequence 0, cannot validate config at sequence 2 #hyperledger-fabric

Magno Alves Cavalcante
 

The same panic error occur when I do, in sequence:
1) peer channel create
2) peer channel join
3) peer channel update , using AnchorPeer.block

I attach here the entire log of CLI, PEER0 and ORDERER, inside same file.
If you inspect CLI log comparing with PEER0 log, you may understand the sequence of commands in CLI and the panic error in PEER0, that terminates PEER0.
All logs are in debug mode.

Regards,
Magno


Re: Forks and World State

David Enyeart
 

Each peer logs its block commit hash every block at INFO level. The block commit hash is a hash over all valid transactions that are written to state database. So you can compare block commit hashes across peers to ensure no fork. Look for a peer INFO message every block containing 'commitHash', e.g.:
commitHash=[0d01cbc2d186675855d5b52f2bda5050ff7238d2527062d0fd5c0a8220d817fa]

Some users do like to validate query results by querying a 2nd peer to ensure they get the same results, that certainly is a valid pattern for critical applications.

Related upcoming work:
https://jira.hyperledger.org/browse/FAB-106 - A 'checkpoint' feature will allow peers to bootstrap a channel from a known good state without having to process all prior blocks since genesis block. The feature can also be used to compare global state across peers.
https://jira.hyperledger.org/browse/FAB-33 - BFT for ordering service to ensure a sufficient number of ordering service nodes sign off on blocks.

We will socialize RFCs for these proposed work items once they become available.


Thanks,

Dave Enyeart

"Trevor Lee Oakley" ---03/16/2020 04:32:44 AM---I saw that if the OS is malicious then a fork may happen by sending different peers different block

From: "Trevor Lee Oakley" <trevor@...>
To: <fabric@...>
Date: 03/16/2020 04:32 AM
Subject: [EXTERNAL] [Hyperledger Fabric] Forks and World State
Sent by: fabric@...





I saw that if the OS is malicious then a fork may happen by sending different peers different blocks. Is that detectable?

If a client made a query to the world state would that be subject to any checks with other peers?

If one subset had a different blockchain and that the client just query a node in that group, the client would get the wrong answer?

I am assuming that is possible and basically a malicious OS will result in an undetected fork.

Also which part of the policy states the peer to be queried and could we rotate that to detect the fork after a series of queries made to the network to test it?

Trevor





3641 - 3660 of 11525