anjy
anjy

Reputation: 331

What does the 'address' in configtx.yaml refer to?

In the Hyperledger fabric configuration of configtx.yaml, what does the below address refer to? is it the name_of_container:container_port OR is it the address_of_the_machine_where_container_is_running:container_port

Addresses:
    - orderer.example.com:7050

Similarly, what does the below refer to? Is it the container_name OR the hostName of the machine?

    AnchorPeers:
        - Host: peer0.org2.example.com

Upvotes: 1

Views: 173

Answers (2)

Artem Barger
Artem Barger

Reputation: 41222

The

Addresses:
    - orderer.example.com:7050

section defines list of routable endpoints for ordering service nodes (OSN). The value should be machine host name or ip address which would be resolvable by peers networks as they will use it to connect to the ordering service to pull blocks. In most of examples it would be equal to docker container name, while doesn't have to be like that, you just need to keep in mind that peer will use that value to get connected to OSN.

Next,

AnchorPeers:
    - Host: peer0.org2.example.com

Section which list peers which would be used by other organization to exchange peers membership information to enable cross organization replication of ledger. You can read more in documentation.

Upvotes: 1

tortuga
tortuga

Reputation: 757

They define the name_of_container:container_port . Now, these containers can be running on the same machine or on a different machine depending upon how to spin up your network. This is a good tutorial to get you started on different implementations of Fabric network.

Upvotes: 1

Related Questions