Before setting your DVN and Executor Configuration, you should review the Security Stack Core Concepts. You can manually configure your Solana OApp’s Send and Receive settings by:Documentation Index
Fetch the complete documentation index at: https://docs.layerzero.network/llms.txt
Use this file to discover all available pages before exploring further.
-
Reading Defaults: Use the
get_configmethod to see default configurations. -
Setting Libraries: Call
set_send_libraryandset_receive_libraryto choose the correct Message Library version. -
Setting Configs: Use the
set_configinstruction to update your custom DVN and Executor settings.
- Send (Chain A) settings match the Receive (Chain B) settings.
- DVN addresses are provided in alphabetical order.
- Block confirmations are correctly set to avoid mismatches.
Getting the Default Config
If you had set up your project using the LayerZero CLI, run the following to view the default configs:The script will return both the default SendLib and ReceiveLib configurations. In the SendLib is also the
executor address.
The important takeaway is that every LayerZero Endpoint can be used to send and receive messages. Because of that, each Endpoint has a separate Send and Receive Configuration, which an OApp can configure by the target destination Endpoint.In the above example, the default Send Library configurations control how messages emit from the Solana Endpoint to the BNB Endpoint.The default Receive Library configurations control how the Solana Endpoint filters received messages from the BNB Endpoint.For a configuration to be considered correct, the Send Library configurations on Chain A must match Chain B’s Receive Library configurations for filtering messages.Challenge: Confirm that the Solana Endpoint’s Send Library ULN configuration matches the Ethereum Endpoint’s Receive Library ULN Configuration using the methods above.
Custom Configuration
LayerZero CLI
For projects created using the LayerZero CLI, all custom configurations are managed via the LZ Config file (typically namedlayerzero.config.ts). You would modify the values in the LZ Config file and then run the wire command:
Debugging Configurations
A correct OApp configuration example:| SendUlnConfig (A to B) | ReceiveUlnConfig (B to A) |
|---|---|
| confirmations: 15 | confirmations: 15 |
| optionalDVNCount: 0 | optionalDVNCount: 0 |
| optionalDVNThreshold: 0 | optionalDVNThreshold: 0 |
| optionalDVNs: Array(0) | optionalDVNs: Array(0) |
| requiredDVNCount: 2 | requiredDVNCount: 2 |
| requiredDVNs: Array(DVN1_Address_A, DVN2_Address_A) | requiredDVNs: Array(DVN1_Address_B, DVN2_Address_B) |
Block Confirmation Mismatch
An example of an incorrect OApp configuration:| SendUlnConfig (A to B) | ReceiveUlnConfig (B to A) |
|---|---|
| confirmations: 5 | confirmations: 15 |
| optionalDVNCount: 0 | optionalDVNCount: 0 |
| optionalDVNThreshold: 0 | optionalDVNThreshold: 0 |
| optionalDVNs: Array(0) | optionalDVNs: Array(0) |
| requiredDVNCount: 2 | requiredDVNCount: 2 |
| requiredDVNs: Array(DVN1, DVN2) | requiredDVNs: Array(DVN1, DVN2) |
DVN Mismatch
Another example of an incorrect OApp configuration:| SendUlnConfig (A to B) | ReceiveUlnConfig (B to A) |
|---|---|
| confirmations: 15 | confirmations: 15 |
| optionalDVNCount: 0 | optionalDVNCount: 0 |
| optionalDVNThreshold: 0 | optionalDVNThreshold: 0 |
| optionalDVNs: Array(0) | optionalDVNs: Array(0) |
| requiredDVNCount: 1 | requiredDVNCount: 2 |
| requiredDVNs: Array(DVN1) | requiredDVNs: Array(DVN1, DVN2) |
Dead DVN
This configuration includes a Dead DVN:| SendUlnConfig (A to B) | ReceiveUlnConfig (B to A) |
|---|---|
| confirmations: 15 | confirmations: 15 |
| optionalDVNCount: 0 | optionalDVNCount: 0 |
| optionalDVNThreshold: 0 | optionalDVNThreshold: 0 |
| optionalDVNs: Array(0) | optionalDVNs: Array(0) |
| requiredDVNCount: 2 | requiredDVNCount: 2 |
| requiredDVNs: Array(DVN1, DVN2) | requiredDVNs: Array(DVN1, DVN_DEAD) |