hyperledger / fabric-admin-sdk

Fabric SDK for Admin Capability services
Apache License 2.0
31 stars 19 forks source link

golang features implementation #15

Closed SamYuan1990 closed 7 months ago

SamYuan1990 commented 2 years ago

Channel

Chaincode

tools(should move to fabric-cli repo)

SamYuan1990 commented 2 years ago

@jkneubuh FYI

jkneubuh commented 2 years ago

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

SamYuan1990 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

@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

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 commented 2 years ago

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

stale[bot] commented 1 year ago

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.

SamYuan1990 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

bestbeforetoday commented 1 year ago

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 commented 1 year ago

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

samuelvenzi commented 1 year ago

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

Thanks, @bestbeforetoday. It's on #88

stale[bot] commented 1 year ago

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.

samuelvenzi commented 1 year ago

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

samuelvenzi commented 1 year ago

@SamYuan1990 any pointers on how I can help? 😄

davidkhala commented 1 year ago

@SamYuan1990 any pointers on how I can help? 😄

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

SamYuan1990 commented 1 year ago

@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 commented 7 months ago

@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 commented 7 months ago

@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.