About BCCSP plugin


Ry Jones
 

Hi, Sam.
I've added the Fabric list so that the other maintainers can see it.
Ry


On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote:

Hi fabric maintainers and David,

I found two interested commits in fabric history.

hyperledger/fabric@01c50ef

hyperledger/fabric@0cde017#diff-62806c7dcf924402565d4ef558b602db6197cb4b1075bacb8514f95ca073392d


mapping to jira tickets

https://jira.hyperledger.org/browse/FAB-6189

and

https://jira.hyperledger.org/browse/FAB-15340


with above things.


Which means in historical, we support fabric BCCSP running in plugin mode and may I know the reason we removed BCCSP plugin mode support?





--
Ry Jones
Community Architect, Hyperledger


David Enyeart
 

The work item that removed BCCSP plugin support explains the rationale and points to a Go issue about plugin restrictions: https://jira.hyperledger.org/browse/FAB-15338

In a nutshell, nobody was using them and while they sound good on the surface, it was unlikely that anybody would want to use them after understanding the Go restrictions.

The same Jira proposes to remove the other plugin support (endorser, validation, etc) in a future v3.0 release. So now is a good time to ask:
- is anybody using Go plugins with Fabric?
- have you found them valuable relative to the Go restrictions?
- any proposals for replacing the plugin model with something else?


Dave Enyeart


"Ry Jones" ---12/14/2021 01:18:53 PM---Hi, Sam. I've added the Fabric list so that the other maintainers can see it.

From: "Ry Jones" <rjones@...>
To: "袁怿" <yy19902439@...>, "fabric" <fabric@...>
Cc: "David Enyeart" <enyeart@...>, "community-architects@..." <community-architects@...>, "twg-china@..." <twg-china@...>
Date: 12/14/2021 01:18 PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] About BCCSP plugin
Sent by: fabric@...





Hi, Sam. I've added the Fabric list so that the other maintainers can see it. Ry On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote: ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ZjQcmQRYFpfptBannerStart 
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hi, Sam.
I've added the Fabric list so that the other maintainers can see it.
Ry


On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote:

    Hi fabric maintainers and David,

    I found two interested commits in fabric history.
    hyperledger/fabric@01c50ef
    hyperledger/fabric@0cde017#diff-62806c7dcf924402565d4ef558b602db6197cb4b1075bacb8514f95ca073392d

    mapping to jira tickets
    https://jira.hyperledger.org/browse/FAB-6189
    and
    https://jira.hyperledger.org/browse/FAB-15340

    with above things.

    Which means in historical, we support fabric BCCSP running in plugin mode and may I know the reason we removed BCCSP plugin mode support?

      Sam Yuan
      yy19902439@...
      Thanks and Regards
    签名由 网易邮箱大师 定制


--
Ry Jones
Community Architect, Hyperledger
Chat@rjones Calendar





Yacov
 

I am aware of companies that use validation plugins to complement the built-in endorsement policy checks because they have an atypical adversary model.

I also think that endorsement plugins are useful for achieving threshold signature orchestration without needing to change Fabric, and I know of companies that have a need for threshold signatures because a strong endorsement policy has a big impact on transaction size and throughput.

While I know that plugins are not exactly... flexible or easy to use, it is still possible to use them if you are determined enough to have a hand-tailored solution for a problem that no one else will solve for you.

I also don't think we should've removed the BCCSP plugins.
Until Go 1.17 where we had a clash between plugin implementation and dependencies, they did not carry any maintenance burden.



Regards,
Yacov





From: fabric@... <fabric@...> on behalf of David Enyeart <enyeart@...>
Sent: Tuesday, December 14, 2021 11:04 PM
To: Ry Jones <rjones@...>
Cc: community-architects@... <community-architects@...>; fabric <fabric@...>; twg-china@... <twg-china@...>; 袁怿 <yy19902439@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] About BCCSP plugin
 
The work item that removed BCCSP plugin support explains the rationale and points to a Go issue about plugin restrictions: https://jira.hyperledger.org/browse/FAB-15338 In a nutshell, nobody was using them and while they sound good on the surface, ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd

The work item that removed BCCSP plugin support explains the rationale and points to a Go issue about plugin restrictions: https://jira.hyperledger.org/browse/FAB-15338

In a nutshell, nobody was using them and while they sound good on the surface, it was unlikely that anybody would want to use them after understanding the Go restrictions.

The same Jira proposes to remove the other plugin support (endorser, validation, etc) in a future v3.0 release. So now is a good time to ask:
- is anybody using Go plugins with Fabric?
- have you found them valuable relative to the Go restrictions?
- any proposals for replacing the plugin model with something else?


Dave Enyeart


"Ry Jones" ---12/14/2021 01:18:53 PM---Hi, Sam. I've added the Fabric list so that the other maintainers can see it.

From: "Ry Jones" <rjones@...>
To: "袁怿" <yy19902439@...>, "fabric" <fabric@...>
Cc: "David Enyeart" <enyeart@...>, "community-architects@..." <community-architects@...>, "twg-china@..." <twg-china@...>
Date: 12/14/2021 01:18 PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] About BCCSP plugin
Sent by: fabric@...





Hi, Sam. I've added the Fabric list so that the other maintainers can see it. Ry On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote: ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ZjQcmQRYFpfptBannerStart 
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hi, Sam.
I've added the Fabric list so that the other maintainers can see it.
Ry

On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote:

    Hi fabric maintainers and David,

    I found two interested commits in fabric history.
    hyperledger/fabric@01c50ef
    hyperledger/fabric@0cde017#diff-62806c7dcf924402565d4ef558b602db6197cb4b1075bacb8514f95ca073392d

    mapping to jira tickets
    https://jira.hyperledger.org/browse/FAB-6189
    and
    https://jira.hyperledger.org/browse/FAB-15340

    with above things.

    Which means in historical, we support fabric BCCSP running in plugin mode and may I know the reason we removed BCCSP plugin mode support?

      Sam Yuan
      yy19902439@...
      Thanks and Regards
    签名由 网易邮箱大师 定制


--
Ry Jones
Community Architect, Hyperledger
Chat@rjones Calendar





袁怿
 

Hi Yacov, David,

Thanks for your reply and I am still work in progress of investigation about how other golang based open source programs apply with plugin mode. (For ex some CNCF projects)
For my opinion, no matter plugin or not. In general programming implementation, we define interface as layers.
Taking BCCSP as sample, we use ECDSA covered maybe 90% of cases, as an adaptor from fabric to golang crypto lib.
However, when someone what a new crypto curve, for ex:
In general, to apply with ed25519 means an implementation as a new adaptor from BCCSP to golang crypto lib.

Ref to JDBC, there seems no central GitHub repo for mysql JDBC or postgreSQL JDBC.
If we keep ECDSA as pre defined implementation and we open interfaces as allow user providing/maintaining their own plugin in/adaptor implementation.
We can benefits from this one step further from interface into plugin in mode supporting. 
Or say from software design patterns, as combination of dynamic, behaviors patterns etc… I hope to keep plugins.

And let’s see the efforts, 
In general, at implementation level, plugin support means fabric (as a golang based binary) to invokes plugin code in binary files.

- As the facts there on GitHub, golang has limitation for plugin mode supporting.
My personal opinion on this: as we use golang, we should have default plugin mode in golang way, as language features.

- if we don’t like go limitations, how about WebAssembly? For ex:https://github.com/wasmerio/wasmer-go, https://github.com/WasmEdge/WasmEdge
I am still under investigation for the possibly to use WebAssembly as go plugin.

As a summary, I would like to decouple the questions as:
1. Should we keep plugin support as high level design in fabric?

As this question is about high level design, and following is related with implementation.
2. Should we keep plugin implemented in golang/ golang only?

3. Should we consider other way to support plugins as WebAssembly? And what’s the condition for fabric accept plugin mode in WebAssembly?


On 12/15/2021 05:28Yacov<yacovm@...> wrote:

I am aware of companies that use validation plugins to complement the built-in endorsement policy checks because they have an atypical adversary model.

I also think that endorsement plugins are useful for achieving threshold signature orchestration without needing to change Fabric, and I know of companies that have a need for threshold signatures because a strong endorsement policy has a big impact on transaction size and throughput.

While I know that plugins are not exactly... flexible or easy to use, it is still possible to use them if you are determined enough to have a hand-tailored solution for a problem that no one else will solve for you.

I also don't think we should've removed the BCCSP plugins.
Until Go 1.17 where we had a clash between plugin implementation and dependencies, they did not carry any maintenance burden.



Regards,
Yacov





From: fabric@... <fabric@...> on behalf of David Enyeart <enyeart@...>
Sent: Tuesday, December 14, 2021 11:04 PM
To: Ry Jones <rjones@...>
Cc: community-architects@... <community-architects@...>; fabric <fabric@...>; twg-china@... <twg-china@...>; 袁怿 <yy19902439@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] About BCCSP plugin
 
The work item that removed BCCSP plugin support explains the rationale and points to a Go issue about plugin restrictions: https://jira.hyperledger.org/browse/FAB-15338 In a nutshell, nobody was using them and while they sound good on the surface, ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd

The work item that removed BCCSP plugin support explains the rationale and points to a Go issue about plugin restrictions: https://jira.hyperledger.org/browse/FAB-15338

In a nutshell, nobody was using them and while they sound good on the surface, it was unlikely that anybody would want to use them after understanding the Go restrictions.

The same Jira proposes to remove the other plugin support (endorser, validation, etc) in a future v3.0 release. So now is a good time to ask:
- is anybody using Go plugins with Fabric?
- have you found them valuable relative to the Go restrictions?
- any proposals for replacing the plugin model with something else?


Dave Enyeart


"Ry Jones" ---12/14/2021 01:18:53 PM---Hi, Sam. I've added the Fabric list so that the other maintainers can see it.

From: "Ry Jones" <rjones@...>
To: "袁怿" <yy19902439@...>, "fabric" <fabric@...>
Cc: "David Enyeart" <enyeart@...>, "community-architects@..." <community-architects@...>, "twg-china@..." <twg-china@...>
Date: 12/14/2021 01:18 PM
Subject: [EXTERNAL] Re: [Hyperledger Fabric] About BCCSP plugin
Sent by: fabric@...





Hi, Sam. I've added the Fabric list so that the other maintainers can see it. Ry On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote: ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ZjQcmQRYFpfptBannerStart 
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Hi, Sam.
I've added the Fabric list so that the other maintainers can see it.
Ry

On Fri, Dec 10, 2021 at 7:09 AM 袁怿 <yy19902439@...> wrote:

--
Ry Jones
Community Architect, Hyperledger
Chat@rjones Calendar