consenter | A pluggable blockchain consensus simulation framework | Blockchain library
kandi X-RAY | consenter Summary
kandi X-RAY | consenter Summary
A pluggable blockchain consensus simulation framework written in Go.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- _Message_Oneof unmarshals a Message from a proto . Message .
- startServer initializes the server .
- _Message_OneofMarshaler encodes a Message into a Message .
- _Message_OneofSizer is the size of a message .
- NewServer returns a new server .
- Generate transaction
- newNodeCommand creates a new node command
- DecodeProto decodes a protobuf message from r .
- EncodeProto writes a protobuf message to w .
- Define all the types in the proto definition
consenter Key Features
consenter Examples and Code Snippets
Community Discussions
Trending Discussions on consenter
QUESTION
I have to find a way to define subsets of consenters for each channel.
The main purpose is to seperate orderers of an organization per channel.
For example:
...ANSWER
Answered 2021-Jun-04 at 05:01The system channel is used by the ordering service as a template to create application channels. The nodes of the ordering service that are defined in the system channel become the default consenter set of new channels, while the administrators of the ordering service become the orderer administrators of the channel.
so you define Orderer
at Profile application channel section is useless
but the ordering nodes can be added or removed from the channel by updating the application channel configuration
so if you want to use seperate orderers per channel,after create application channel ,remove the consenter set of your application channel config you can reference https://hyperledger-fabric.readthedocs.io/en/release-2.2/config_update.html
https://kctheservant.medium.com/add-an-orderer-to-a-running-raft-based-orderer-cluster-b6a432da138c
I have use seperate orderers per channel successful at version 1.4.2,I think it is easier for version 2.3.x. because you can setup your fabric network without system channel.
QUESTION
I have been trying to deploy a hyperledger fabric model with 3 CAs 1 orderer and 2 peer nodes. I am able to create the channel with OSADMIN command of fabric but when I try to join the channel with peer node, I get Error: error getting endorser client for channel: endorser client failed to connect to peer-govt:7051: failed to create new connection: context......
.
Here are the logs from terminal (local host machine):
...ANSWER
Answered 2021-Jun-01 at 10:33I have fixed it. The issue I was facing was because of not setting the CORE_PEER_TLS_ENABLED = true
for CLI pod.
One thing I have got learn from this whole model, whenever you see TLS issue, first to check for would be checking CORE_PEER_TLS_ENABLED
variable. Make sure you have set it for all the pods or containers you are trying to interact with. The case can be false(for no TLS) or true(for using TLS) depending on your deployment.
Other things to keep in mind is using the correct variables of fabric including FABRIC_CFG_PATH
, CORE_PEER_LOCALMSPID
, CORE_PEER_TLS_ROOTCERT_FILE
, CORE_PEER_MSPCONFIGPATH
and some others depending on your command.
QUESTION
I see there are a lot of questions about this error, I have seen this solution Raft bad format but I doubled checked and the folders are right and the certs are in there, I also looked at Sans problem but for what I understand I don't need Sans when using Raft (I may be wrong). I think my problem its because I'm not handling the intermediate certificates correctly and I'm getting the error both creating a channel and in the Raft consensus.
So here is what I've done so far:
I created my genesis block using a configtx.yaml and this msp folder structure:
configtx.yaml
...ANSWER
Answered 2021-Mar-24 at 08:53Ana
I have same problem when i study fabric.and i have solve them,hope this can help you.
for example,when you execute in linux terminal
QUESTION
My orderers admin and TLS certs expired so i tried generating new certs . created a new config.pb file by adding Base64 of certs in the config.json file and after that created new config.pb and was able to successfully sign the config by reversing the time of my peer cli machine but after getting signature from all the Organization MSP's . when i try to update my new config to the channel. I'm getting this error.
...ANSWER
Answered 2021-Jan-17 at 09:20You can only update one consenter at a time and you'll do to do this for each channel as well.
QUESTION
I followed the steps mentioned here to add new Orderer Organization into existing network channel (i.e updating config change to orderer channel) update throw error like below,
How to add a new Orderer Organization to existing Hyperledger Fabric network
...ANSWER
Answered 2020-Oct-05 at 01:28Looks like you forgot to sign the .pb file before the update read more here
There is a document about the rule of this process.
Edit: I've just found this document of Fabric 2.2. It gives more information about the policy.
QUESTION
I am building a Hyperledger Fabric network, and I am trying to make an organization have both a peer node and an ordering node. I am using cryptogen to generate the certs and keys, and am only creating one organization as a "peer organization". I had one network that had 6 organizations--5 of which had a single peer and one orderer organization with a single orderer. Then I took these configuration files and removed the orderer organization and added an orderer endpoint to one of the peer organizations. I am now getting an error.
printed to the screen:
Error: failed to create deliver client for orderer: orderer client failed to connect to localhost:7050: failed to create new connection: context deadline exceeded
Error message from running "docker logs orderer.orgname.domain"
2020-08-17 23:56:43.834 UTC [orderer.common.server] Main -> INFO 00d Beginning to serve requests
2020-08-17 23:56:51.317 UTC [core.comm] ServerHandshake -> ERRO 00e TLS handshake failed with error remote error: tls: bad certificate server=Orderer remoteaddress=172.21.0.1:32892
my configtx.yaml file
...ANSWER
Answered 2020-Aug-21 at 23:47The problem with TLS was solved by creating two peers under the organization orgname, and designating one for the orderer. I don't understand exactly why I couldn't use the same certificates for both the peer and orderer node, but it is working now.
The second issue I had in my update was solved by making the endorsement policies more permissive. For each organization in my configtx.yaml file, I set Readers, Writers, and Endorsements to require any member signature.
QUESTION
I am trying to set up the HLF first network on 2 vms. So, i created 2 yaml files each for every machine.
Machine 1: - 1 orderer - 2 peers - 2 couchdb - 1 ca
Machine 2: - 2 peers - 2 couchdb - 1 ca
There is no problem to fetch block 0 and i am able to create the channel and finally to install the chaincode. However, when i am trying to to approve a chaincode definition for my orgs, i receive the same error from both machines.
Error: failed to retrieve broadcast client: orderer client failed to connect to 127.0.0.1:7050: failed to create new connection: connection error: desc = "transport: error while dialing: dial tcp 127.0.0.1:7050: connect: connection refused"
P.S. Sorry about the big post i am trying to be specified in case someone can find my faults
i checked my containers:
...ANSWER
Answered 2020-Jun-16 at 09:36The issue is in your channel configuration file (configtx.yaml). You have defined the same ports for Anchors peers on both Organization.
Org2 (Presently):
QUESTION
I have two organizations for ordering (type= Raft). one of them has two orderers and the second one has three orderers, in configtx.yaml there are Ordererorg1MSP
and Ordererorg2MSP
MSPs.
my configtx.taml:
ANSWER
Answered 2020-May-05 at 09:53Mistake: you have removed orderer orgs from consortium
QUESTION
I'm trying to enroll & register an admin to perform peer operations. This is the bash code:
...ANSWER
Answered 2020-Apr-13 at 08:23This is what is happening:
You created a system channel
(which is the orderer genesis
block) by creating the MAIN
consortium. Now the system channel was created with the peer
organization MSPs at that moment. Followed by this, after the network was up, you went into org1/users
and created an admin identity. You update local MSP of peer but the already existing system channel
was never updated.
Possible solutions:
- Update the admin credentials within
org1/users
before the network is set up. - Update the system channel configuration with the
admin2
credentials post deployment by creating achannel update
transaction. - Enable NodeOUs so that any admin identity generated dynamically post the network deployment can perform
admin
related transactions.
QUESTION
I am trying to add a new Orderer Organization to RAFT based existing ordering service. I am using the first-network
from fabric-samples
as the base network. While generating crypto-material, I have modified to generate crypto-material for 1 more orderer organization. The crypto-config.yaml
looks like:
ANSWER
Answered 2020-Apr-11 at 07:52I was able to extend the first-network
by adding a new Orderer Organization as follows:
- Start the
first-network
through thebyfn.sh
script in thefabric-samples
repo in theetcdraft
mode. - I generated crypto-material like described in the
crypto-config.yaml
in the question above. - Use the
configtxgen
tool to print the new orderer organization's MSP into JSON format. - Mount or
docker cp
this JSON file to the runningcli
container. - Set the environment inside the
cli
container corresponding to existing ordering node. Import the latestsystem-channel
configuration. Decode it to JSON format. Edit the system channel configuration block's
Orderer
section to add the new orderer organization's MSP as follows:jq -s '.[0] * {"channel_group":{"groups":{"Orderer":{"groups": {"Orderer1Org":.[1]}}}}}' config.json orderer1org.json > config1.json
Edit the system channel configuration block's
Consortiums
section to add the new orderer organization's MSP as follows:jq -s '.[0] * {"channel_group":{"groups":{"Consortiums":{"groups":{"SampleConsortium":{"groups": {"Orderer1MSP":.[1]}}}}}}}' config1.json orderer1org.json > config2.json
Edit the system channel configuration block's
Consenters
section to add the TLS credentials for the new orderer organization'sorderer.example1.com
node as follows:cert=`base64 ../crypto/ordererOrganizations/example1.com/orderers/orderer.example1.com/tls/server.crt | sed ':a;N;$!ba;s/\n//g'`
cat config2.json | jq '.channel_group.groups.Orderer.values.ConsensusType.value.metadata.consenters += [{"client_tls_cert": "'$cert'", "host": "orderer.example1.com", "port": 7050, "server_tls_cert": "'$cert'"}] ' > modified_config.json
Encode the block, find delta, create channel update transaction, encode it as protobuf envelope and submit the channel update transaction.
- Fetch the latest system channel configuration block.
- Start one of the orderers (the one who was added to consenters list previously) using this latest fetched system channel configuration block as it's
genesis.block
file. - Perform
docker exec
into thecli
container. Using the environment of an existing orderer node, fetch the latest system channel configuration. Edit the system channel configuration block to add the new orderer's endpoint in the
OrdererAddresses
section as follows:cat config.json | jq '.channel_group.values.OrdererAddresses.value.addresses += ["orderer.example1.com:7050"] ' > modified_config.json
Encode the block, find delta, create channel update transaction, encode it as protobuf envelope and get the block signed by
Orderer1Org
admin to satify themod_policy
for/Channel/OrdererAddresses
resource which is set toAdmins
policy. This implicit meta policy expects the signature ofMAJORITY Admins
at that level of update. So, as the number of orderer organizations are 2 now, we need both the organization's admins to sign this system channel update transaction. Set the environment corresponding toOrderer1Org
admin and run the following command:peer channel signconfigtx -f ordorg_update_in_envelope.pb
Set the environment back to
OrdererOrg
admin and submit the channel update transaction. Thepeer channel update
will automatically sign the transaction on behalf of OrdererOrg admin.peer channel update -f ordorg_update_in_envelope.pb -c $CHANNEL_NAME -o orderer.example.com:7050 --tls true --cafile $ORDERER_CA
For updating any application channel, just replace the step 7 by updating the application channel configuration block's Application
section to add the new orderer organization's MSP there.
Hope this helps!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install consenter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page