Deployed Apps on Endpoint V1
If you have already deployed on Endpoint V1, migrating to the new LayerZero V2 protocol is entirely optional.
LayerZero V2 comes with enhancements to the core protocol design that increase message efficiency and customizability.
You can access the new Security Stack and Independent Execution by configuring your application’s Message Library to Ultra Light Node 301.
With UltraLightNode301, your deployed LZApp on Endpoint V1 will be able to configure the new Security Stack for message authentication, as well as an Executor to ensure your application receives messages on the destination chain.
Prerequisites
You should have an LZApp to start with that’s already working with default settings. Any app that inheritsLZApp.sol (including the Endpoint V1 OFT and ONFT standards) can be used.
Migration Steps
Temporarily block sending new messages
As messages require symmetrical Message Libraries on send and receive, updating the Receive Message Library while there are still in-flight messages sent using another version would result in those messages failing to deliver. To mitigate this, you would need to temporarily block new messages from being sent. This can be done by setting the Send Library to the Blocked Message Library (6535) on all chains in your mesh.
Configuring UltraLightNode301
To set a new MessageLib on Endpoint V1, you will call thesetConfig function on Chain A and Chain B.
Below is a simple example for how to set your MessageLib:
latestVersion variable on the chain’s endpoint contract.
latestVersion represents the index of the last MessageLib that was appended to the chain’s endpoint, which currently is ReceiveULN301 for all endpoints, while SendULN301 is the index before ReceiveULN301.
LZApp using the Endpoint V1 setConfig function, passing the configType and config values for the specific Security Stack and Executors.
UltraLightNode301, your deployed LZApp on Endpoint V1 will be able to configure the new Security Stack for message authentication, as well as an Executor to ensure your application receives messages on the destination chain.
This enables a wider range of security configurations while simultaneously isolating network liveness from message execution.
See the full list of improvements for Deployed V1 Apps in the V2 Overview.
New Apps on Endpoint V2
For new applications deciding between Endpoint V1 and Endpoint V2, we recommend deploying exclusively with V2 Contracts to take advantage of onchain specific benefits (i.e., higher message throughput, smaller contract sizes, gas optimization, and horizontal message composability).
You will need to deploy using the new Contract Standards on Endpoint V2.
These benefits specifically come from improvements in onchain protocol and application related contracts. For your application to receive these specific benefits, you will need to deploy new OApps using these contracts. See the full overview in New Protocol Contracts.