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

golang features implementation #15

Closed
20 of 22 tasks
SamYuan1990 opened this issue Jun 21, 2022 · 21 comments
Closed
20 of 22 tasks

golang features implementation #15

SamYuan1990 opened this issue Jun 21, 2022 · 21 comments
Labels
golang help wanted Extra attention is needed

Comments

@SamYuan1990
Copy link
Contributor

SamYuan1990 commented Jun 21, 2022

@SamYuan1990 SamYuan1990 pinned this issue Jun 21, 2022
@SamYuan1990
Copy link
Contributor Author

@jkneubuh FYI

@jkneubuh
Copy link

Thanks @SamYuan1990 those look like a good set of features for addition to the library. A couple of questions / comments:

  • peer channel unjoin might not be possible with the current implementation in Fabric. To unjoin a channel, the peer MUST be shut down or set into maintenance mode. If the admin SDK does not include the ability to stop and restart the peer, this feature will not work correctly. (This seems like a feature enhancement for Fabric, not for the admin SDK.)

  • Does the feature set above allow for the registration of a new Org to a channel?

@SamYuan1990
Copy link
Contributor Author

Thanks @SamYuan1990 those look like a good set of features for addition to the library. A couple of questions / comments:

  • peer channel unjoin might not be possible with the current implementation in Fabric. To unjoin a channel, the peer MUST be shut down or set into maintenance mode. If the admin SDK does not include the ability to stop and restart the peer, this feature will not work correctly. (This seems like a feature enhancement for Fabric, not for the admin SDK.)
  • Does the feature set above allow for the registration of a new Org to a channel?

thanks for your comments for peer channel unjoin

for add new org to channel, in my point of view, it can been treated as update channel setting?

@denyeart
Copy link

denyeart commented Jun 27, 2022

@SamYuan1990 Have you looked at the fabric-config library?
https://github.com/hyperledger/fabric-config
https://pkg.go.dev/github.com/hyperledger/fabric-config/configtx
It contains a Go API to create and update channel configuration (including adding a new org). When this library was created, the idea was that a new channel config SDK or CLI would use the new API to replace the existing challenging channel config approach (configtxgen, JSON manipulation, etc). However, the people working on this left the project before such a SDK or CLI could be created. It would make a lot of sense for the Go based fabric-admin-sdk to pick up where this effort left off and use the fabric-config API library for the channel configuration tasks. What do you think?

@SamYuan1990
Copy link
Contributor Author

@SamYuan1990 Have you looked at the fabric-config library? https://github.com/hyperledger/fabric-config https://pkg.go.dev/github.com/hyperledger/fabric-config/configtx It contains a Go API to create and update channel configuration (including adding a new org). When this library was created, the idea was that a new channel config SDK or CLI would use the new API to replace the existing challenging channel config approach (configtxgen, JSON manipulation, etc). However, the people working on this left the project before such a SDK or CLI could be created. It would make a lot of sense for the Go based fabric-admin-sdk to pick up where this effort left off and use the fabric-config API library for the channel configuration tasks. What do you think?

thanks @denyeart , I will take a look at and feedback.

@SamYuan1990
Copy link
Contributor Author

@denyeart, @jkneubuh , @davidkhala ,
here is my plan.
I would like to follow TDD method to development this admin sdk project.
if this admin sdk project can be used in decouple peer cli with peer server in further, that's great but not current goal/target.
so far, personally we have 3/4 kinds of implementation plan

  • internal/fabric package
  • fabric-config project
  • fabric-gateway(as identity related part)
  • making fabric as dependency in go mod

so, 1st of all, I would like to follow TDD method to implement all features.
and as 2nd phase, we may decouple fabric code/dependency from go sdk implementation, which will be 2nd phase implementation. targeting at decouple peer cli from peer server.

because of for operator(labs project) point of view, a sdk project it has fabric dependency there https://github.com/hyperledger-labs/fabric-operator/blob/main/go.mod#L11 and for decouple peer cli and peer server and if we plan to merge back to fabric repo(if needed) then the implementation should be keep.

@SamYuan1990
Copy link
Contributor Author

peer node unjoin is removed from scope, as it not admin sdk but running on peer node side.

@stale
Copy link

stale bot commented Oct 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 9, 2022
@davidkhala davidkhala removed the stale label Oct 10, 2022
@SamYuan1990 SamYuan1990 added the help wanted Extra attention is needed label Oct 31, 2022
@SamYuan1990
Copy link
Contributor Author

SamYuan1990 commented Nov 1, 2022

@jkneubuh , @denyeart , we nearly close to 1st MVP version as major replacement with fabric test-network cli commands.
From channel creation to chaincode commit, replacement with test-network in fabric-sample.
FYI

@samuelvenzi
Copy link
Contributor

Hi @SamYuan1990 and @bestbeforetoday, I managed to develop the query committed function (#39) and would like to start contributing to the project.

It was only possible with the refactor in PR #87 so I'll wait for the approval and merge so I can get the modifications from main before opening a PR.

@bestbeforetoday
Copy link
Member

Channel configuration needs to have the capability to set anchor peers, otherwise service discovery does not work.

@bestbeforetoday
Copy link
Member

Hi @SamYuan1990 and @bestbeforetoday, I managed to develop the query committed function (#39) and would like to start contributing to the project.

Contributions would be very welcome! We probably need to have a pass through the work still outstanding and make sure everything is raised as separate issues so we can more easily assign who is actually working on them. I will make a start on that from my perspective as soon as I can.

@bestbeforetoday
Copy link
Member

@samuelvenzi PR #87 is now merged so you can base changes in top of that.

@samuelvenzi
Copy link
Contributor

@samuelvenzi PR #87 is now merged so you can base changes in top of that.

Thanks, @bestbeforetoday. It's on #88

@stale
Copy link

stale bot commented Jun 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 8, 2023
@samuelvenzi
Copy link
Contributor

samuelvenzi commented Aug 18, 2023

Hi @SamYuan1990. Is this issue still relevant? If not, what are some pending features that I could take a look?

@stale stale bot removed the stale label Aug 18, 2023
@samuelvenzi
Copy link
Contributor

@SamYuan1990 any pointers on how I can help? 😄

@davidkhala
Copy link
Member

@SamYuan1990 any pointers on how I can help? 😄

I think peer discovery feature is what you can work on in priority.

@SamYuan1990
Copy link
Contributor Author

@SamYuan1990 any pointers on how I can help? 😄

I think peer discovery feature is what you can work on in priority.

thanks @davidkhala, I just received from sick in recent , @samuelvenzi yes, you can start with peer discovery. :-)

@davidkhala
Copy link
Member

@SamYuan1990 Considering that most of sdk users have now migrated to peer gateway, I would like to label item generate connection profile for sdk as WON'T DO. Open to hear your thoughts.

@SamYuan1990
Copy link
Contributor Author

@SamYuan1990 Considering that most of sdk users have now migrated to peer gateway, I would like to label item generate connection profile for sdk as WON'T DO. Open to hear your thoughts.

LGTM, and I am supposing we are good with this ticket and going to close it.
ask tooling should move to fabric-cli repo fro discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
golang help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants