What a Fabric chaincode lifecycle migration involves before v3
If your network still runs on the v1.x legacy chaincode lifecycle, the move to v2.x is a mandatory channel-level step before any v3.x upgrade. It has two parts: set the application capability to V2_0 or V2_5 on each channel, then redeploy every chaincode under the new lifecycle. The effort depends on three things: how many channels you run, how many chaincodes each channel carries, and how much initialization logic must be reworked. The fastest way to size the work is to inventory those three counts before anyone plans a window. Fabric v3.0 removed the legacy lifecycle, so a peer that is upgraded while a channel still depends on it cannot simply carry that channel forward.
This step sits before the four-step binary upgrade described in the Fabric upgrade guide because the binaries will refuse to run channels that still rely on the old lifecycle. Moving capabilities and chaincode definitions first means the later rolling upgrade of orderers and peers changes only software, not channel behavior. Fabric v2.5 is the long-term support release for production networks today, so it is the target line to plan against for the lifecycle work. Confirm with your own change board whether the v2.5 patch level you deploy matches the current maintenance release before you schedule the work.
Ask your team to confirm three things before scoping: which channels still use the legacy lifecycle, which chaincodes depend on Init being called at deployment, and which client applications invoke those functions. The new lifecycle has no option to call Init automatically, so deployments must set --init-required and call the initialization function explicitly, and Fabric recommends moving initialization logic into the chaincode itself. Each chaincode you redeploy is a change to a live channel, so plan approvals from every organization that endorses it and a rollback path for each channel.
What carries over from the legacy lifecycle and what must be redone
This table compares each item a team operates on a legacy-lifecycle Fabric network with its status once channels move to the v2.x lifecycle. Read the status column first: items marked to carry over need no action, items marked for redefinition need a new chaincode definition, and items marked for review need client or shim work before the 3.x upgrade.
| Item | Status under v2.x lifecycle | What to do |
|---|---|---|
| Channel configuration | Carries over, but the application capability must be raised to V2_0 or V2_5 | Update the channel configuration to set the capability, then confirm it on every channel before upgrading peers |
| Peer and orderer identities | Carries over unchanged | Confirm certificates are valid and not near expiry, since the lifecycle step does not reissue them |
| Ledger state | Carries over unchanged | Back up the ledger and MSPs before changing capabilities or binaries |
| Chaincode packages | Needs a new chaincode definition | Repackage and install each chaincode with the new lifecycle, then approve and commit the definition for each channel |
| Chaincode Init behavior | Needs review, since the new lifecycle has no automatic Init on deployment | Set the init-required flag where needed and move initialization logic into the chaincode |
| Shim and chaincode code | Needs review against the shim version in use | Confirm each chaincode builds and passes tests with the shim version your peers will run |
| Client applications | Needs review, but can be upgraded separately from the network | The Fabric Gateway client API works with both v2.5 and v3.0, so client upgrades can be scheduled independently |
Documented paths for moving channels to the v2.x lifecycle
The documented route to v2.x has three parts: set the application capability, redeploy every chaincode through the new lifecycle, and verify each peer afterward. The cards below follow that order, with the checks and command-level details to confirm against the version you run before any change reaches production.
Capability update step
The upgrade guide places the capability change after the binary upgrades, and it is the step that moves each application channel to the v2.x lifecycle. Set the application capability to V2_0 or V2_5 on every channel, using the channel configuration update flow. Confirm the target level against the release notes for the version you run, since a capability change is not a simple rollback.
Upgrade guideRedeploying chaincode with the new lifecycle
Every chaincode on every channel must be redeployed through the v2.x lifecycle before the network moves to v3.x. The v2.5 upgrade notes describe this as a package, install, approve and commit sequence run with the peer CLI. Inventory each channel and chaincode name first, because a chaincode that is missed will block the upgrade path.
v2.5 upgrade notesApprove and commit definitions
The peer lifecycle commands approve a chaincode definition for each organization, then commit it once enough organizations have approved under the channel's lifecycle endorsement policy. Each organization approves with its own peer and admin identity. Check the command syntax and flags in the reference for your exact version, since the subcommands have changed across releases.
Init handling under the new lifecycle
The new lifecycle has no option to call Init automatically on deployment. Mark chaincode that needs initialization with --init-required at the approve and invoke steps, and move setup logic into the chaincode where it can be called deliberately. Test the first invocation on a non-production channel so that a missed initialization does not surface after the upgrade.
Per-peer verification after changes
After each peer is changed, query its operations service to confirm it is running the expected version. The /healthz endpoint reports health and /version reports the build, and both require the mutual TLS client certificates configured for the operations service. Record the results for each peer before moving to the next one.
No separate import tool
The Fabric docs describe no separate import tool that converts legacy chaincode definitions into the v2.x lifecycle. Plan the work as a deliberate redeployment, with chaincode source, packages and endorsement policies recorded before the change. Ask your team and vendor to confirm command syntax against your version rather than relying on older examples from forums or blog posts.
How the capability change, chaincode redeploys and binary upgrades fit together
The path starts with an inventory and backup of the channel, chaincode and MSP material. Each channel's application capability is then set to V2_0 or V2_5, and every chaincode is redeployed under the v2.x lifecycle. Chaincode that relies on Init is routed through rework before redeploy. Endorsement and invocation checks decide whether the redeploy loop repeats, and only after every channel passes do orderer and peer binary upgrades begin, followed by the final capability update.
Decision path from capability change through chaincode redeploys to binary upgrades.
How the migration sequence runs from inventory to v3.x readiness
The sequence turns an unmanaged set of legacy chaincode definitions into a channel estate that already runs on the v2.x lifecycle, so the binary upgrade to v3.x starts from a known, tested and recoverable state. Each step ends with a written output that the next step depends on.
Inventory channels, chaincode, policies and clients
The channel owner and the chaincode team list every channel, its member organizations, the chaincode name and version deployed on each channel, the endorsement policy and collection configuration for each definition, and every client application that submits transactions. Each organization confirms its peers and the identities those peers use. The output is a signed inventory that shows, for each channel, its current application capability level and whether any chaincode still depends on the legacy lifecycle. Ask your partner or your own team to confirm the capability value on every channel before anything else changes.
Back up the ledger and MSP material
Operators take a backup of the ledger on every peer and orderer, along with the MSP directories, TLS material and channel configuration blocks that the network depends on. The backups are stored outside the nodes they protect and an operator restores at least one of them to a scratch host to confirm it is readable. The output is a backup record listing each artifact, its location and the restore check result. Fabric's upgrade guidance treats this backup as the recovery point for the whole migration, so no later step starts without it.
Rehearse on a non-production copy
The team builds a non-production copy of the network with the same organizations, channels, chaincode versions and endorsement policies as production, and loads representative data where it is available. Fabric has no built-in parallel run for this change, so the rehearsal network is the parallel run. The team sets the application capability on the rehearsal channels, redeploys each chaincode with the new lifecycle, and records every command, approval and error. The output is a rehearsal log and a corrected runbook that the production window will follow line by line.
Plan the Init and shim changes
The chaincode team reviews each chaincode for code paths that assumed automatic initialization on deployment, because the new lifecycle has no option to call Init automatically. Each chaincode that needs initialization is flagged with the initialization-required option, and initialization logic is moved into the chaincode where that is practical. Shim dependencies are checked against the versions the rehearsal used. The output is a per-chaincode decision record that states whether initialization is required, how it is triggered and which shim version is pinned.
Set the capability and redeploy on production
In an agreed change window, the channel administrators set the application capability to V2_0 or V2_5 on each channel, following the same order used in the rehearsal. Then the chaincode definitions are approved and committed with the new lifecycle by the organizations that the endorsement policy requires. This capability change and these chaincode commits are the cutover. The output is a channel configuration history and a committed chaincode definition for every channel, with each organization's approval recorded. Confirm the window length with the parties involved, since no duration is set by the supplied guidance.
Verify with transactions and peer health
After cutover, the team submits real transactions through each client application on each channel and checks that they are endorsed, ordered and committed under the new definitions. Operators query the operations service on every peer and orderer, checking the health endpoint, the reported version and the log level, and confirm that metrics are being scraped. Any chaincode that failed to invoke is rolled back to the backup point before the window closes. The output is a signed verification checklist showing that every channel accepted transactions and that every node reports healthy.
Hand over to the binary upgrade
The verified channel state, the backup record and the verification checklist are handed to the team that will run the Fabric upgrade. That upgrade proceeds through the orderer binaries, the peer binaries and then the channel capability levels, as described in the upgrade guide. The handover confirms that no channel still uses the legacy lifecycle, which is the condition Fabric v3.0 requires. The output is a readiness sign-off that names the channels, the chaincode versions and the backup set the upgrade will depend on.
Decommission legacy artifacts last
Only after the binary upgrade is complete and stable does the team remove legacy artifacts, such as old package files, superseded chaincode install records and retired scripts that used the legacy commands. Backups are kept for the retention period set by your own policy. The output is a closed change record that lists each artifact removed, the date it was removed and the owner who approved removal. Removing these artifacts earlier would remove the fallback the earlier steps were designed to preserve.
Handling Init and shim changes when chaincode is redeployed
Under the legacy lifecycle, some chaincode ran its Init function automatically when it was instantiated, so the ledger was seeded without a separate step. The new lifecycle does not offer that behavior. There is no option to call Init automatically on deployment, so any chaincode that depended on that side effect will not initialize itself when you approve and commit the new definition. Inventory each chaincode and record whether its first invocation or instantiation relied on Init to write starting state, reference data or configuration keys.
- Find the dependency: Review each chaincode's Init function and the deployment runbook to see whether it writes ledger state that later transactions expect.
- Flag initialization on the definition: Use the
--init-requiredsetting when you approve the chaincode definition so that the first invocation is required to call Init. - Plan the first transaction: Decide which organization or script sends the initializing invocation and confirm it is endorsed by the policy-required peers.
- Test on a non-production channel: Redeploy on a copy of the channel and confirm the ledger state matches what the legacy deployment produced.
Before you change any channel, confirm with your chaincode owners that no business process assumes starting state was created at instantiation time.
Some chaincode already exposes an explicit initialization function that operators call by hand, or that the application calls before normal use. This group needs less rework, but it still needs checks because the new lifecycle controls how a chaincode is first invoked. Fabric recommends placing initialization logic inside the chaincode itself, so that the rules for starting state live in one reviewed place rather than in operator runbooks.
- Confirm the call path: Verify that the explicit initialization function is the one the lifecycle flags with
--init-required, and that clients cannot run other functions before it completes. - Move logic into the chaincode: Where initialization depends on a runbook step, consider moving checks and default writes into the chaincode so that the first invocation enforces them.
- Make initialization idempotent: Guard against repeated calls that would overwrite existing keys, since operators may retry after a partial failure.
- Record the approving organizations: Each organization that approves the new definition should know which initialization call it expects to see.
Check that the initialization function's behavior is unchanged in the new definition and that the test evidence for it is retained with the change record.
Redeploying chaincode also means packaging it again with a shim version and a language runtime that the target release supports. Shim and runtime requirements change between Fabric releases, and the packaged chaincode must build and run against the versions you choose. Do not assume that a chaincode that worked under the legacy lifecycle will build unchanged. Confirm the requirements for the exact version you will run, because the supported combinations are stated in the release notes and not in this page.
- Check the shim version: Compare the chaincode shim dependency in each project with the version listed in the release notes for your target line.
- Check the language runtime: Confirm the supported runtime version for your chaincode language and rebuild the package with it.
- Rebuild and vendor dependencies: Pin third-party dependencies in the chaincode project so that the package content is reproducible across organizations.
- Retest transaction behavior: Run the chaincode test suite against the new shim and runtime before packaging for approval.
Before approving any new package, confirm the shim and runtime versions in the release notes for the version you plan to run, and record the package identifier that every organization will install.
What drives Fabric lifecycle migration cost and duration
This table lists the factors that raise or lower the effort of moving Fabric channels to the v2.x chaincode lifecycle, and whether each one is paid once or recurs. Use it to see which parts of your network will set the scope, then ask for a written inventory and rehearsal criteria before comparing quotes. The main takeaway is that channel count, chaincode count and Init rework usually determine effort more than the capability change itself.
| Driver | Why it changes effort | One-time or recurring | What to ask for in a quote |
|---|---|---|---|
| Channels and organizations per channel | Each channel needs its own capability change, chaincode redeployment and endorsement policy check, and more member organizations mean more approvals and coordination windows. | One-time | A channel list with member organizations and the approval path for each |
| Number and language of chaincodes | Every chaincode must be redefined under the new lifecycle, and packaging differs by language and build setup. | One-time | A chaincode inventory with name, version, language, channels and endorsement policy |
| Init logic that must be reworked | The new lifecycle has no automatic Init on deployment, so chaincodes that relied on it need initialization moved into the chaincode or a flagged init call. | One-time | Confirmation of which chaincodes call Init and how initialization is verified |
| Rehearsal network | A rehearsal copy shows whether capability changes and redeployments work on your binaries and data before production, and it adds setup but reduces change-window risk. | One-time setup, with reuse for later upgrades | Rehearsal scope, the environment it mirrors and written verification criteria |
| Backup and HSM-protected MSP material | Ledger and MSP backups must be taken before changes, and keys held in an HSM need custom images and tested recovery steps. | One-time per migration, with ongoing backup routines | Backup procedure, restore test results and HSM and custom image dependencies |
| Change windows and approval cycles | Each organization must agree to the capability change and redeployment timing, so multi-organization networks often need several coordinated windows. | One-time | Proposed window sequence, rollback steps and who signs off each change |
| Client applications on chaincode interfaces | Clients that call chaincode functions, rely on Init behavior or use changed invocation patterns must be tested against the redeployed chaincode. | One-time, with recurring test runs if clients change often | A list of dependent applications, their owners and the test cases each must pass |
Where Fabric lifecycle migration goes wrong and how to prevent it
Most failures in this migration come from a gap between what the network believes is deployed and what each peer actually runs. The cards below cover the risks that cause that gap, the signal that shows it, and the check that closes it before the network is committed to the 3.x line.
Chaincode not redeployed on every channel
A chaincode definition that exists on one channel but not another leaves that channel on the legacy lifecycle path, which blocks the upgrade to v3.x. The signal is a channel where the application capability is still below V2_0 or V2_5, or a chaincode that never appears in the committed definitions. Before changing any capability, list every channel and every chaincode, then confirm each one is committed with the new lifecycle using the peer's query commands on each channel.
Upgrade docsInit logic silently stops running
The new lifecycle does not call Init automatically on deployment, so a chaincode that depended on Init to seed state will deploy cleanly and then behave as if its ledger was never set up. The signal is missing initial records or failed reads after the first invocation. Mark chaincode that needs initialization with the init-required flag, move seeding logic into an explicit transaction, and test that transaction on a staging channel before production.
v2.5 upgrade docsShim and runtime mismatch found in production
A chaincode package built against one shim version or language runtime may pass testing on a development peer and fail once it is installed on a production peer with different builds. The signal is chaincode containers that fail to start or endorsements that error only on some peers. Pin the shim and runtime versions in the build, install the same package ID on every endorsing peer, and run a full endorsement test across all organizations before the capability change.
Endorsement policies changed during redeploy
A redeploy requires a new chaincode definition, and if the endorsement policy is omitted or rewritten, the new definition can accept transactions that the old one rejected, or reject transactions the business still expects. The signal is a change in which organizations must endorse after the commit. Export the current policy from each channel, write the intended policy down, and compare it with the new definition's policy before approving it.
Client applications break on changed interfaces
Client code that depends on function names, argument order, or the way it calls the network may fail after the chaincode definition moves to the new lifecycle. The signal is client errors that start only after the capability update, not during the chaincode test. Confirm that each client application works against the new chaincode version in a test environment, and check whether it uses the Fabric Gateway client API, which supports both v2.5 and v3.0.
Skipping the ledger and MSP backup
Changing channel capabilities and redeploying chaincode both alter network state, and the upgrade guide begins with a backup of the ledger and MSPs for that reason. The signal is an upgrade attempt with no tested restore path. Back up the ledger and MSP directories on every peer and orderer, record the current definitions, and confirm the backups can be read before any capability change.
Upgrade components guideQuestions buyers ask about Fabric lifecycle migration effort
What does moving Fabric channels to the v2.x lifecycle cost?
No fixed fee applies, because the cost follows from the number of channels, the number of chaincodes on each channel and the number of organizations that must approve each new chaincode definition. Two components are paid for: the engineering time to inventory channels and chaincodes, set the application capability, redeploy each chaincode and retest endorsement, and the internal time of your channel administrators and chaincode owners who approve each change. Most of the work is one-time, but any chaincode you add later must follow the same lifecycle. Ask a quote to list each channel, each chaincode, the approval steps per organization, the test environment used for rehearsal and whether Init logic must be rewritten. DeployOpen issues fees only from a written scope.
How long does the lifecycle migration take on a Fabric network?
The duration depends on how many channels and chaincodes you run, how many organizations must sign off on each chaincode definition and how quickly each approval moves through your change process. Plan the work in a non-production network first, because a failed redeploy on a live channel affects every organization on it. Ask any partner to state the number of channels, chaincodes and approving organizations it assumed, and to show the rehearsal window and the production change window separately. Timelines should not be accepted until those inputs are written into the scope.
What does the migration need from our own team?
Your team must supply the people who can make decisions for each organization on each channel. This includes channel administrators who can update channel configuration, chaincode owners who know each contract's dependencies, and someone who can sign off the test results. You also need access to the peers, the existing backups of the ledger and MSPs, and the build pipeline that packages chaincode. Confirm in the quote who maintains the chaincode source after handover, how Init-dependent logic will be reviewed, and which change window is available on each channel.
Can our internal team complete this migration without a partner?
A capable Fabric team can complete the work, provided it has enough people with channel administration and chaincode experience and time to rehearse before production. The risk comes from coordination across organizations and from chaincode that depends on the old Init behavior. Before deciding, check whether your team has rehearsed a chaincode redeploy on a copy of the network, whether it knows how the new lifecycle flags initialization with the --init-required option and whether it can run the rollback steps in the upgrade plan. A partner can take on rehearsal, documentation and the cutover runbook, and your team keeps approval authority.
Do client applications have to change during the lifecycle migration?
Client applications usually do not need to be rewritten for this step, but the chaincode behavior they call may change. Under the new lifecycle, Fabric has no option to call Init automatically on deployment, so an application that assumed Init ran at install time may need an explicit initialization call or logic moved into chaincode. Check each application's calls against the redeployed chaincode, including any that depend on Init-set state. If the applications use the legacy SDKs, that is a separate migration to the Fabric Gateway client API, which the Fabric upgrade docs describe as compatible with both v2.5 and v3.0.
Must the lifecycle migration finish before the v3.x binary upgrade?
Yes. Fabric v3.0 removed the v1.x legacy chaincode lifecycle, so before upgrading peers to v3.x, every channel must use the v2.x lifecycle by setting the application capability to V2_0 or V2_5 and redeploying all chaincodes. The upgrade guide sequences the steps as backup, orderer binaries, peer binaries, then capability levels, so the capability change follows the binary upgrade on each channel. Confirm with your own change plan which capability level your organization will set and whether the v2.5 LTS line suits your production schedule.
How DeployOpen scopes and delivers the lifecycle migration
DeployOpen approaches the move from the legacy chaincode lifecycle to v2.x as a fixed-scope piece of work on your own Fabric network, inside infrastructure you control. The work starts from an inventory of channels, capabilities and chaincode, and it ends with documented evidence that every channel is ready for the 3.x upgrade.
How we scope
- Inventory every channel, its current application capability level and the chaincode definitions deployed on it.
- Agree which target capability, V2_0 or V2_5, each channel will use, with the reasons written down.
- Record the Init and shim changes each chaincode needs, and confirm which owner approves each redeployment.
How we build
- Build a runbook per channel covering capability update, package, install, approve and commit steps.
- Test every chaincode redeployment on a non-production network that mirrors your channel and organization set.
- Verify endorsement and query behavior after each change before moving to the next channel.
How we hand over
- Deliver a written record of each channel's capability level, chaincode versions and approving organizations.
- Document the Init-required flags, initialization logic and shim version used by each chaincode.
- Walk your operators through the runbook and the rollback point taken before any live change.
How we support
- Engagements are fixed-scope, and the written scope sets deliverables and timelines before work starts.
- Ongoing support, upgrades and continuous testing are available as a retainer after handover.
- Confirm with your team which support window, change approvals and contacts apply to live channels.

