P2P: temporarily allow network names DAL_* and dal-sandbox compatibility
The function [is_compatible_chain] introduced in this MR is temporary compatibility code to support the migration of Tezos DAL nodes to the new network naming scheme introduced in MR !17288 on master.
Before MR !17288 (merged), DAL nodes used the hardcoded "dal-sandbox" network name on any Tezos network, which was incorrect. The fix in that MR introduces a proper naming scheme where the DAL network name is derived from the L1 chain name and prefixed with "DAL_", e.g., "TEZOS_MAINNET" → "DAL_TEZOS_MAINNET".
This breaking change would prevent old and new DAL nodes from connecting during the handshake due to mismatched network names. Consequently, the new naming scheme will only be activated starting with the V23 release, while this temporary compatibility function [is_compatible_chain] is introduced in V22.
Migration Plan
To handle this transition smoothly, we follow a phased migration plan inspired by past L1 P2P migrations:
-
Step 1 (V22 release): DAL nodes advertise the old
"dal-sandbox"name but accept both"dal-sandbox"and"DAL_*"network names. -
Step 2 (V23 release): DAL nodes advertise the new
"DAL_*"name while still accepting both"dal-sandbox"and"DAL_*"network names. -
Step 3 (V24 release): DAL nodes advertise and accept only the new
"DAL_*"network names.
Once all nodes have migrated and Step 3 is reached, this compatibility function should be removed and replaced with a strict equality check [local = remote].
Note: L1 nodes and existing L1 networks are not affected by this workaround, as their names do not start with
"dal-"or"DAL_".
Summary by CodeRabbit
-
New Features
- Introduced enhanced network compatibility to support both legacy and updated naming conventions, ensuring smoother connectivity during the migration phase.