Skip to content

Instantly share code, notes, and snippets.

@onur-ozkan
Created November 20, 2023 14:29
Show Gist options
  • Save onur-ozkan/0e0dce951fc3918658d4be1a107cd54f to your computer and use it in GitHub Desktop.
Save onur-ozkan/0e0dce951fc3918658d4be1a107cd54f to your computer and use it in GitHub Desktop.
# Migration: NETID 8762
## Why is this needed?
Because of two reasons;
### 1: Upgraded P2P Stack
We have recently refactored the entire network infrastructure (changes can be seen at https://github.com/KomodoPlatform/komodo-defi-framework/pull/1878), which caused breaking changes at the network layer as expected. This means that any peer using the old network layer will not be able to communicate with a peer using this new layer.
Change summaries on the network layer:
- Mesh protocols (gossipsub, floodsub, identify, etc.) are upgraded to the latest versions.
- Mesh configurations are updated, deprecating the old ones.
- Replaced the stream multiplexer with yamux.
- Now, gossipsub broadcasts one topic at a time.
- Topics are handled differently on the mm2 side.
### 2: KMD Burn Plan
Just recently, we updated the DEX fee calculation algorithm to include burn amounts for swaps where the taker is KMD. If the taker is KMD, its DEX fee will be calculated differently than any other dex fees, by dropping the actual dex fee by up to 25% and burning the dropped part with OP_RETURN during the dex fee transaction. Note that this update doesn't increase or reduce the total amount the taker spends. The amount still remains the same; only the way of using it changes.
Any peer using an old mm2 version will not be able to swap KMDs with the new version of mm2, as each side validates the burn output in the dex fee transaction.
To see the actual changes, please refer to https://github.com/KomodoPlatform/komodo-defi-framework/pull/2006.
## Steps to follow for migration
1- Provide seednodes for the new network.
2- If we have any control on the current networks makers, move them all to the new network and remove them from the old one.
3- Update current(the ones using old layer) seed nodes to not accept any new peer connections or peers that are already in the connection-making operations, returning an error "You are most likely using an outdated mm2 or an outdated netid. Please update your mm2 and use the new netid 8762." This will reduce the usage of old/deprecated netid and inform users, even if they are not following community updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment