Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAB-17890 Ch.Part.API: allow registrar to list a single channel #1349

Merged
merged 3 commits into from
Jun 2, 2020
Merged

FAB-17890 Ch.Part.API: allow registrar to list a single channel #1349

merged 3 commits into from
Jun 2, 2020

Conversation

tock-ibm
Copy link
Contributor

Implement the ChannelInfo(..) method in the registrar that looks up
a channel in the chains map and reports extended information on its
status. For this end we have to introduce the follower.Chain and
augment existing cluster type chains with means of reporting their
status.

  • Introduce the skeleton a new type of consensus.Chain
    implementation: follower.Chain. This will be created and run when
    the orderer is required to follow the cluster and pull blocks from
    other orderers.

  • The plan (for future commits) is for the follower.Chain to trigger
    the creation of an etcdraft.Chain when it discovers the orderer was
    added to the cluster, and vise versa; the etcdraft.Chain will replace
    itself with a follower.Chain when the orderer is removed from the
    cluster.

  • Introduce a new interface that cluster-type chains implement, that
    allows them to report their relation to the cluster and their status.
    This is done because the registrar is not aware of the exact type of
    the chains it is keeping. The registrar cannot reflect on the type
    as well, as this will cause an import cycle (due to the etcdraft
    package importing multichannel).

Signed-off-by: Yoav Tock tock@il.ibm.com
Change-Id: Ia454f47f04a8ba3dcd76886a5919d1c734c01015

Type of change

  • New feature

Related issues

Task: FAB-17980
Story: FAB-17824
Epic: FAB-17712

Implement the ChannelInfo(..) method in the registrar that looks up
a channel in the chains map and reports extended information on its
status. For this end we have to introduce the follower.Chain and
augment existing cluster type chains with means of reporting their
status.

- Introduce the skeleton a new type of consensus.Chain
  implementation: follower.Chain. This will be created and run when
  the orderer is required to follow the cluster and pull blocks from
  other orderers.

- The plan (for future commits) is for the follower.Chain to trigger
  the creation of an etcdraft.Chain when it discovers the orderer was
  added to the cluster, and vise versa; the etcdraft.Chain will replace
  itself with a follower.Chain when the orderer is removed from the
  cluster.

- Introduce a new interface that cluster-type chains implement, that
  allows them to report their relation to the cluster and their status.
  This is done because the registrar is not aware of the exact type of
  the chains it is keeping. The registrar cannot reflect on the type
  as well, as this will cause an import cycle (due to the etcdraft
  package importing multichannel).

Signed-off-by: Yoav Tock <tock@il.ibm.com>
Change-Id: Ia454f47f04a8ba3dcd76886a5919d1c734c01015
@tock-ibm tock-ibm requested a review from a team as a code owner May 28, 2020 16:55
Add typed constatnts for the possible values of
ChannelInfo.Status & ChannelInfo.ClusterRelation.

Signed-off-by: Yoav Tock <tock@il.ibm.com>
Change-Id: I71062b944d4e5236c4df1462fa73740b68e2065b
Document types.ClusterRelation and types.Status.

Signed-off-by: Yoav Tock <tock@il.ibm.com>
Change-Id: I8171e6cfe6c3a137e7f1f48a14d1b2fe7f1aea5a
@yacovm yacovm merged commit 450ba3a into hyperledger:master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants