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

Fabric v3: Remove legacy chaincode (LSCC) support #3983

Open
denyeart opened this issue Feb 1, 2023 · 7 comments
Open

Fabric v3: Remove legacy chaincode (LSCC) support #3983

denyeart opened this issue Feb 1, 2023 · 7 comments
Assignees
Labels

Comments

@denyeart
Copy link
Contributor

denyeart commented Feb 1, 2023

Fabric v2.x supports both the v1.x chaincode lifecycle and the v2.x chaincode lifecycle. The proposal here is to remove support for the v1.x chaincode lifecycle for Fabric v3.x.

There are many places in the code that have dual support for v1.x and v2.x chaincode lifecycle. Each of those locations will need to be assessed to remove the v1.x chaincode lifecycle support, and then the v1.x chaincode lifecycle itself will need to be removed.

@denyeart denyeart added the Epic label Feb 1, 2023
@denyeart denyeart changed the title Remove legacy chaincode (LSCC) support in Fabric v3.0 Fabric v3: Remove legacy chaincode (LSCC) support Feb 1, 2023
@Sayalikukkar
Copy link

Hi @denyeart, I would like to contribute on this. Could you please guide me?

@denyeart
Copy link
Contributor Author

@Sayalikukkar This will be a complex epic as the v1.x chaincode lifecycle is embedded in many places. The first thing to do would be to decompose the work into smaller issues under this epic.

@ale-linux led the work to add dual support in Fabric v2.x, so probably best to get his high level thoughts first.

@C0rWin
Copy link
Contributor

C0rWin commented Jul 23, 2023

@Sayalikukkar This will be a complex epic as the v1.x chaincode lifecycle is embedded in many places. The first thing to do is decompose the work into smaller issues under this epic.

@ale-linux led the work to add dual support in Fabric v2.x, so probably best to get his high level thoughts first.

Hi @denyeart, I would like to take the lead on this if you are fine. Several things have to be done to get it complete:

  1. First, we need to remove it from the integration tests cause it's still being widely used there. We need to make sure to switch all places we have legacy lifecycle used.
  2. Once integration tests are fixed, we can get rid of the legacy lifecycle from the NWO APIs
  3. The next step would be to make sure to adhere to SDKs, to make sure it's no longer available
  4. Take care of fabric samples. Almost sure it's not used, but to make sure we won't break anything
  5. Remove from peer cli, so no one will be able to use it any longer
  6. Refactor system chaincodes to stop referring to legacy Lifecycle APIs
  7. Remove legacy.

I can prepare a more detailed plan on how to do it in small portions.

@denyeart
Copy link
Contributor Author

denyeart commented Jul 25, 2023

Thanks @C0rWin , that would be great! Perhaps @Sayalikukkar could help on some of the tasks.

I mentioned @ale-linux because I remember there was some prior design thought around removing the old lifecycle... I've found the presentation where @ale-linux wrote this down in 2019:

  • Long term we expect that LSCC will disappear
  • For this reason, whenever a fabric component requires lifecycle data we have
    • Created appropriate interfaces (removing any direct access to LSCC)
    • Implemented the interface for both legacy and new lifecycle
    • Created an aggregator that uses both implementations and is used by the component
    • The aggregator often takes care of shadowing: information in the new lifecycle always takes precedence
  • As soon as the legacy lifecycle disappears, we can remove the legacy implementation and the aggregator

@Sayalikukkar
Copy link

Hello @C0rWin, Let me know if anything is required from my end.

@C0rWin
Copy link
Contributor

C0rWin commented Jul 30, 2023

Hello @C0rWin, Let me know if anything is required from my end.

Thanks for the suggestion, I will prepare a work plan and then we can decide on how to approach it.

@C0rWin
Copy link
Contributor

C0rWin commented Jul 30, 2023

Thanks @C0rWin , that would be great! Perhaps @Sayalikukkar could help on some of the tasks.

I mentioned @ale-linux because I remember there was some prior design thought around removing the old lifecycle... I've found the presentation where @ale-linux wrote this down in 2019:

* Long term we expect that LSCC will disappear

* For this reason, whenever a fabric component requires lifecycle data we have
  
  * Created appropriate interfaces (removing any direct access to LSCC)
  * Implemented the interface for both legacy and new lifecycle
  * Created an aggregator that uses both implementations and is used by the component
  * The aggregator often takes care of shadowing: information in the new lifecycle always takes precedence

* As soon as the legacy lifecycle disappears, we can remove the legacy implementation and the aggregator

This is a fair plan, though, I think once we will remove all external dependencies which are still using legacy LSCC, we won't have any aggregator and will be able to proceed with the removal. Currently, the legacy is exposed via peer cli, SDKs, and inside the integration tests. Therefore, IMO we just need to start by simply removing code using legacy APIs.

C0rWin added a commit to C0rWin/fabric that referenced this issue Oct 22, 2023
This commit takes care to remove DeployChaincodeLegacy function from the
integration tests suite to address hyperledger#3983 as part of removing legacy
chaicnode lifecycle. Due to size of the changes the work gonna be split
into several PRs, this is the first one in the row.

Signed-off-by: Artem Barger <artem@bargr.net>
C0rWin added a commit to C0rWin/fabric that referenced this issue Oct 22, 2023
This commit removes the DeployChaincodeLegacy function from the
integration tests suite to address hyperledger#3983 as part of eliminating the
legacy chaincode lifecycle. Due to the changes in size, the work will be
split into several PRs. This is the first one in a row.

Signed-off-by: Artem Barger <artem@bargr.net>
C0rWin added a commit to C0rWin/fabric that referenced this issue Oct 23, 2023
This commit removes the DeployChaincodeLegacy function from the
integration tests suite to address hyperledger#3983 as part of eliminating the
legacy chaincode lifecycle. Due to the changes in size, the work will be
split into several PRs. This is the first one in a row.

Signed-off-by: Artem Barger <artem@bargr.net>
denyeart pushed a commit that referenced this issue Oct 25, 2023
This commit removes the DeployChaincodeLegacy function from the
integration tests suite to address #3983 as part of eliminating the
legacy chaincode lifecycle. Due to the changes in size, the work will be
split into several PRs. This is the first one in a row.

Signed-off-by: Artem Barger <artem@bargr.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants