<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.internetcomputer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nikola.milosavljevic</id>
	<title>Internet Computer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.internetcomputer.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nikola.milosavljevic"/>
	<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/wiki/Special:Contributions/Nikola.milosavljevic"/>
	<updated>2026-04-10T09:01:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8652</id>
		<title>Node Provider Node Swapping Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8652"/>
		<updated>2025-11-27T16:12:33Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===🚧 &#039;&#039;&#039;Node swapping will be enabled starting from 01.12.2025. for all operators on non-system subnets&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Node providers run nodes on the Internet Computer and receive rewards depending on how well their nodes perform. Only nodes that contribute to the overall performance of the node provider are the nodes that are part of a subnet. Those nodes are called &#039;&#039;assgined&#039;&#039;. All other nodes that aren&#039;t a part of any subnet and are not utilized don&#039;t contribute to the overall performance of the node provider. Those nodes are called &#039;&#039;unassigned&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
It is in the node providers best interest to keep the &#039;&#039;assgined&#039;&#039; nodes as well maintained and as operational as possible since that is how they can maximize their rewards. To achieve that over time, the node providers can utilize the &#039;&#039;&#039;node swapping&#039;&#039;&#039; feature.  &lt;br /&gt;
&lt;br /&gt;
==Node swapping==&lt;br /&gt;
Node swapping feature is used to &#039;&#039;swap&#039;&#039; an &#039;&#039;assigned&#039;&#039; node for an &#039;&#039;unassigned&#039;&#039; node owned by the same &#039;&#039;node operator&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
A node provider notices that one of his nodes is performing poorly. In order to maximize their rewards, they want to act quickly and remove the &#039;&#039;assigned&#039;&#039; node from a subnet for a different &#039;&#039;unassigned&#039;&#039; node &#039;&#039;&#039;within the same data center&#039;&#039;&#039;. They use the &#039;&#039;&#039;node swapping feature&#039;&#039;&#039; to do that without &#039;&#039;&#039;any proposals or governance&#039;&#039;&#039;. After performing the swap they can perform maintenance on the node and see why it failed in the first place. &lt;br /&gt;
&lt;br /&gt;
==Performing a node swap==&lt;br /&gt;
To perform a node swap one has to follow the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: if the node is turned off before it gracefully leaves the subnet it will appear as malicious to the consensus which can result in rewards penalty!&lt;br /&gt;
&lt;br /&gt;
#Find the principal ID of an &#039;&#039;assigned&#039;&#039; node that should be removed from a subnet. To do that one can use various tools, but for the sake of this example we will show examples from [https://dashboard.internetcomputer.org/ the public dashboard].[[File:Node provider dead node part of a subnet.png|left|frameless|1000x1000px|Degraded node with its node ID and health status]]&lt;br /&gt;
#Find the principal ID of an &#039;&#039;unassigned&#039;&#039; node that should be added to a subnet in place of an &#039;&#039;assigned&#039;&#039; node picked in the previous step.  To do that one can click on the data center (below the &#039;&#039;&#039;DC ID&#039;&#039;&#039; &amp;quot;to1&amp;quot; for this example) of the node from the previous step which will take them to the view which contains all the node machines from the same data center. From there, pick the one that isn&#039;t &#039;&#039;assigned&#039;&#039; to any subnet (the &#039;&#039;&#039;subnet ID&#039;&#039;&#039; column should contain a &#039;-&#039;).[[File:Unassigned nodes in the same data center.png|left|frameless|1111x1111px]]&lt;br /&gt;
#Using ic-admin utility to perform a node swap:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Uncomment this if the node operator identity is behind a private key file&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--secret-key-pem&amp;quot;&lt;br /&gt;
# &amp;lt;path-to-key-pem&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
# Uncomment this if node operator identity is behind an hsm&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--use-hsm&amp;quot;&lt;br /&gt;
# &amp;quot;--slot&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-slot&amp;gt;&lt;br /&gt;
# &amp;quot;--key-id&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-id&amp;gt;&lt;br /&gt;
# &amp;quot;--pin&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-pin&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
ic-admin --nns-urls https://ic0.app ${AUTH[@]} swap-node-in-subnet-directly \&lt;br /&gt;
    --old-node-id &amp;lt;principal-from-step-1&amp;gt; \&lt;br /&gt;
    --new-node-id &amp;lt;principal-from-step-2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the response from the call is successful the node doesn&#039;t leave the subnet immediately. There is &#039;&#039;&#039;graceful leaving period&#039;&#039;&#039; that needs to be awaited. It takes around 15-20 minutes depending on the subnet. If the logs of the node are observed through the BMC console there are two messages that need to show in order for the node to completely leave the subnet &#039;&#039;gracefully&#039;&#039;. The first log that indicates that the node noticed that the swapping was requested looks like the following:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node started leaving subnet &amp;lt;subnet-id&amp;gt;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After some time the node will show the following log which indicates it left the subnet:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node gracefully left a subnet &amp;lt;subnet-id&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the second log appears it is safe to turn off the node and proceed to do maintenance.&lt;br /&gt;
&lt;br /&gt;
== Limitations and constraints==&lt;br /&gt;
To ensure fair and safe use of the swapping feature there are some limitations and constraints about the usage of the feature that need to be shared. &lt;br /&gt;
&lt;br /&gt;
=====Ownership and locality constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;locality&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
#The &#039;&#039;old node&#039;&#039; is an &#039;&#039;assigned&#039;&#039; node (it is a part of a subnet) and the &#039;&#039;new node&#039;&#039; is an &#039;&#039;unassigned&#039;&#039; node (it isn&#039;t a part of any subnet).&lt;br /&gt;
#Both &#039;&#039;old&#039;&#039; and &#039;&#039;new&#039;&#039; nodes are owned by the same &#039;&#039;&#039;node provider&#039;&#039;&#039; and are located in the same &#039;&#039;&#039;data center&#039;&#039;&#039;. Furthermore they have to be owned by the same &#039;&#039;&#039;node operator.&#039;&#039;&#039; This is needed to ensure that the &#039;&#039;decentralization&#039;&#039; doesn&#039;t change when the swaps are performed.&lt;br /&gt;
&lt;br /&gt;
=====Rate limiting constraints=====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;rate limiting&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of hasn&#039;t had a swap in the last &#039;&#039;&#039;4 hours&#039;&#039;&#039; - this limit is here to protect the subnet from losing its state from too many swaps happening at the same time.&lt;br /&gt;
#The &#039;&#039;&#039;node provider&#039;&#039;&#039; performing the swap hasn&#039;t made a swap on the &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of in the last &#039;&#039;&#039;24 hours&#039;&#039;&#039; - this limit is here to protect other node providers from being unable to swap nodes because one node provider is constantly swapping nodes within the &#039;&#039;&#039;2 hour&#039;&#039;&#039; limit of the 1st constraint.&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8651</id>
		<title>Node Provider Node Swapping Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8651"/>
		<updated>2025-11-27T16:06:17Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===🚧 &#039;&#039;&#039;Node swapping will be enabled starting from 01.12.2025. for all operators on non-system subnets&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Node providers run nodes on the Internet Computer and receive rewards depending on how well their nodes perform. Only nodes that contribute to the overall performance of the node provider are the nodes that are part of a subnet. Those nodes are called &#039;&#039;assgined&#039;&#039;. All other nodes that aren&#039;t a part of any subnet and are not utilized don&#039;t contribute to the overall performance of the node provider. Those nodes are called &#039;&#039;unassigned&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
It is in the node providers best interest to keep the &#039;&#039;assgined&#039;&#039; nodes as well maintained and as operational as possible since that is how they can maximize their rewards. To achieve that over time, the node providers can utilize the &#039;&#039;&#039;node swapping&#039;&#039;&#039; feature.  &lt;br /&gt;
&lt;br /&gt;
==Node swapping==&lt;br /&gt;
Node swapping feature is used to &#039;&#039;swap&#039;&#039; an &#039;&#039;assigned&#039;&#039; node for an &#039;&#039;unassigned&#039;&#039; node owned by the same &#039;&#039;node operator&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
A node provider notices that one of his nodes is performing poorly. In order to maximize their rewards, they want to act quickly and remove the &#039;&#039;assigned&#039;&#039; node from a subnet for a different &#039;&#039;unassigned&#039;&#039; node &#039;&#039;&#039;within the same data center&#039;&#039;&#039;. They use the &#039;&#039;&#039;node swapping feature&#039;&#039;&#039; to do that without &#039;&#039;&#039;any proposals or governance&#039;&#039;&#039;. After performing the swap they can perform maintenance on the node and see why it failed in the first place. &lt;br /&gt;
&lt;br /&gt;
==Performing a node swap==&lt;br /&gt;
To perform a node swap one has to follow the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: if the node is turned off before it gracefully leaves the subnet it will appear as malicious to the consensus which can result in rewards penalty!&lt;br /&gt;
&lt;br /&gt;
#Find the principal ID of an &#039;&#039;assigned&#039;&#039; node that should be removed from a subnet. To do that one can use various tools, but for the sake of this example we will show examples from [https://dashboard.internetcomputer.org/ the public dashboard].[[File:Node provider dead node part of a subnet.png|left|frameless|1000x1000px|Degraded node with its node ID and health status]]&lt;br /&gt;
#Find the principal ID of an &#039;&#039;unassigned&#039;&#039; node that should be added to a subnet in place of an &#039;&#039;assigned&#039;&#039; node picked in the previous step.  To do that one can click on the data center (below the &#039;&#039;&#039;DC ID&#039;&#039;&#039; &amp;quot;to1&amp;quot; for this example) of the node from the previous step which will take them to the view which contains all the node machines from the same data center. From there, pick the one that isn&#039;t &#039;&#039;assigned&#039;&#039; to any subnet (the &#039;&#039;&#039;subnet ID&#039;&#039;&#039; column should contain a &#039;-&#039;).[[File:Unassigned nodes in the same data center.png|left|frameless|1111x1111px]]&lt;br /&gt;
#Using ic-admin utility to perform a node swap:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Uncomment this if the node operator identity is behind a private key file&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--secret-key-pem&amp;quot;&lt;br /&gt;
# &amp;lt;path-to-key-pem&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
# Uncomment this if node operator identity is behind an hsm&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--use-hsm&amp;quot;&lt;br /&gt;
# &amp;quot;--slot&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-slot&amp;gt;&lt;br /&gt;
# &amp;quot;--key-id&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-id&amp;gt;&lt;br /&gt;
# &amp;quot;--pin&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-pin&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
ic-admin --nns-urls https://ic0.app ${AUTH[@]} swap-node-in-subnet-directly \&lt;br /&gt;
    --old-node-id &amp;lt;principal-from-step-1&amp;gt; \&lt;br /&gt;
    --new-node-id &amp;lt;principal-from-step-2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the response from the call is successful the node doesn&#039;t leave the subnet immediately. There is &#039;&#039;&#039;graceful leaving period&#039;&#039;&#039; that needs to be awaited. It takes around 15-20 minutes depending on the subnet. If the logs of the node are observed through the BMC console there are two messages that need to show in order for the node to completely leave the subnet &#039;&#039;gracefully&#039;&#039;. The first log that indicates that the node noticed that the swapping was requested looks like the following:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node started leaving subnet &amp;lt;subnet-id&amp;gt;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After some time the node will show the following log which indicates it left the subnet:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node gracefully left a subnet &amp;lt;subnet-id&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the second log appears it is safe to turn off the node and proceed to do maintenance.&lt;br /&gt;
&lt;br /&gt;
== Limitations and constraints==&lt;br /&gt;
To ensure fair and safe use of the swapping feature there are some limitations and constraints about the usage of the feature that need to be shared. &lt;br /&gt;
&lt;br /&gt;
=====Ownership and locality constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;locality&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
#The &#039;&#039;old node&#039;&#039; is an &#039;&#039;assigned&#039;&#039; node (it is a part of a subnet) and the &#039;&#039;new node&#039;&#039; is an &#039;&#039;unassigned&#039;&#039; node (it isn&#039;t a part of any subnet).&lt;br /&gt;
#Both &#039;&#039;old&#039;&#039; and &#039;&#039;new&#039;&#039; nodes are owned by the same &#039;&#039;&#039;node provider&#039;&#039;&#039; and are located in the same &#039;&#039;&#039;data center&#039;&#039;&#039;. Furthermore they have to be owned by the same &#039;&#039;&#039;node operator.&#039;&#039;&#039; This is needed to ensure that the &#039;&#039;decentralization&#039;&#039; doesn&#039;t change when the swaps are performed.&lt;br /&gt;
&lt;br /&gt;
=====Rate limiting constraints=====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;rate limiting&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of hasn&#039;t had a swap in the last &#039;&#039;&#039;2 hours&#039;&#039;&#039; - this limit is here to protect the subnet from losing its state from too many swaps happening at the same time.&lt;br /&gt;
#The &#039;&#039;&#039;node provider&#039;&#039;&#039; performing the swap hasn&#039;t made a swap on the &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of in the last &#039;&#039;&#039;12 hours&#039;&#039;&#039; - this limit is here to protect other node providers from being unable to swap nodes because one node provider is constantly swapping nodes within the &#039;&#039;&#039;2 hour&#039;&#039;&#039; limit of the 1st constraint.&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8645</id>
		<title>Node Provider Node Swapping Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8645"/>
		<updated>2025-10-28T14:52:51Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===🚧 &#039;&#039;&#039;Node swapping still hasn&#039;t been enabled on the network! Come back to this page to see the status of its rollout.&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Node providers run nodes on the Internet Computer and receive rewards depending on how well their nodes perform. Only nodes that contribute to the overall performance of the node provider are the nodes that are part of a subnet. Those nodes are called &#039;&#039;assgined&#039;&#039;. All other nodes that aren&#039;t a part of any subnet and are not utilized don&#039;t contribute to the overall performance of the node provider. Those nodes are called &#039;&#039;unassigned&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
It is in the node providers best interest to keep the &#039;&#039;assgined&#039;&#039; nodes as well maintained and as operational as possible since that is how they can maximize their rewards. To achieve that over time, the node providers can utilize the &#039;&#039;&#039;node swapping&#039;&#039;&#039; feature.  &lt;br /&gt;
&lt;br /&gt;
==Node swapping==&lt;br /&gt;
Node swapping feature is used to &#039;&#039;swap&#039;&#039; an &#039;&#039;assigned&#039;&#039; node for an &#039;&#039;unassigned&#039;&#039; node owned by the same &#039;&#039;node operator&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
A node provider notices that one of his nodes is performing poorly. In order to maximize their rewards, they want to act quickly and remove the &#039;&#039;assigned&#039;&#039; node from a subnet for a different &#039;&#039;unassigned&#039;&#039; node &#039;&#039;&#039;within the same data center&#039;&#039;&#039;. They use the &#039;&#039;&#039;node swapping feature&#039;&#039;&#039; to do that without &#039;&#039;&#039;any proposals or governance&#039;&#039;&#039;. After performing the swap they can perform maintenance on the node and see why it failed in the first place. &lt;br /&gt;
&lt;br /&gt;
==Performing a node swap==&lt;br /&gt;
To perform a node swap one has to follow the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: if the node is turned off before it gracefully leaves the subnet it will appear as malicious to the consensus which can result in rewards penalty!&lt;br /&gt;
&lt;br /&gt;
#Find the principal ID of an &#039;&#039;assigned&#039;&#039; node that should be removed from a subnet. To do that one can use various tools, but for the sake of this example we will show examples from [https://dashboard.internetcomputer.org/ the public dashboard].[[File:Node provider dead node part of a subnet.png|left|frameless|1000x1000px|Degraded node with its node ID and health status]]&lt;br /&gt;
#Find the principal ID of an &#039;&#039;unassigned&#039;&#039; node that should be added to a subnet in place of an &#039;&#039;assigned&#039;&#039; node picked in the previous step.  To do that one can click on the data center (below the &#039;&#039;&#039;DC ID&#039;&#039;&#039; &amp;quot;to1&amp;quot; for this example) of the node from the previous step which will take them to the view which contains all the node machines from the same data center. From there, pick the one that isn&#039;t &#039;&#039;assigned&#039;&#039; to any subnet (the &#039;&#039;&#039;subnet ID&#039;&#039;&#039; column should contain a &#039;-&#039;).[[File:Unassigned nodes in the same data center.png|left|frameless|1111x1111px]]&lt;br /&gt;
#Using ic-admin utility to perform a node swap:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Uncomment this if the node operator identity is behind a private key file&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--secret-key-pem&amp;quot;&lt;br /&gt;
# &amp;lt;path-to-key-pem&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
# Uncomment this if node operator identity is behind an hsm&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--use-hsm&amp;quot;&lt;br /&gt;
# &amp;quot;--slot&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-slot&amp;gt;&lt;br /&gt;
# &amp;quot;--key-id&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-id&amp;gt;&lt;br /&gt;
# &amp;quot;--pin&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-pin&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
ic-admin --nns-urls https://ic0.app ${AUTH[@]} swap-node-in-subnet-directly \&lt;br /&gt;
    --old-node-id &amp;lt;principal-from-step-1&amp;gt; \&lt;br /&gt;
    --new-node-id &amp;lt;principal-from-step-2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the response from the call is successful the node doesn&#039;t leave the subnet immediately. There is &#039;&#039;&#039;graceful leaving period&#039;&#039;&#039; that needs to be awaited. It takes around 15-20 minutes depending on the subnet. If the logs of the node are observed through the BMC console there are two messages that need to show in order for the node to completely leave the subnet &#039;&#039;gracefully&#039;&#039;. The first log that indicates that the node noticed that the swapping was requested looks like the following:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node started leaving subnet &amp;lt;subnet-id&amp;gt;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After some time the node will show the following log which indicates it left the subnet:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node gracefully left a subnet &amp;lt;subnet-id&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the second log appears it is safe to turn off the node and proceed to do maintenance.&lt;br /&gt;
&lt;br /&gt;
== Limitations and constraints==&lt;br /&gt;
To ensure fair and safe use of the swapping feature there are some limitations and constraints about the usage of the feature that need to be shared. &lt;br /&gt;
&lt;br /&gt;
=====Ownership and locality constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;locality&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
#The &#039;&#039;old node&#039;&#039; is an &#039;&#039;assigned&#039;&#039; node (it is a part of a subnet) and the &#039;&#039;new node&#039;&#039; is an &#039;&#039;unassigned&#039;&#039; node (it isn&#039;t a part of any subnet).&lt;br /&gt;
#Both &#039;&#039;old&#039;&#039; and &#039;&#039;new&#039;&#039; nodes are owned by the same &#039;&#039;&#039;node provider&#039;&#039;&#039; and are located in the same &#039;&#039;&#039;data center&#039;&#039;&#039;. Furthermore they have to be owned by the same &#039;&#039;&#039;node operator.&#039;&#039;&#039; This is needed to ensure that the &#039;&#039;decentralization&#039;&#039; doesn&#039;t change when the swaps are performed.&lt;br /&gt;
&lt;br /&gt;
=====Rate limiting constraints=====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;rate limiting&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of hasn&#039;t had a swap in the last &#039;&#039;&#039;2 hours&#039;&#039;&#039; - this limit is here to protect the subnet from losing its state from too many swaps happening at the same time.&lt;br /&gt;
#The &#039;&#039;&#039;node provider&#039;&#039;&#039; performing the swap hasn&#039;t made a swap on the &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of in the last &#039;&#039;&#039;12 hours&#039;&#039;&#039; - this limit is here to protect other node providers from being unable to swap nodes because one node provider is constantly swapping nodes within the &#039;&#039;&#039;2 hour&#039;&#039;&#039; limit of the 1st constraint.&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8644</id>
		<title>Node Provider Node Swapping Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8644"/>
		<updated>2025-10-28T13:53:52Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===🚧 &#039;&#039;&#039;Node swapping still hasn&#039;t been enabled on the network! Come back to this page to see the status of its rollout.&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Node providers run nodes on the Internet Computer and receive rewards depending on how well their nodes perform. Only nodes that contribute to the overall performance of the node provider are the nodes that are part of a subnet. We call those nodes &#039;&#039;assgined&#039;&#039;. All other nodes that aren&#039;t a part of any subnet and are not utilized don&#039;t contribute to the overall performance of the node provider. We call those nodes &#039;&#039;unassigned&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
It is in the node provider&#039;s best interest to keep the &#039;&#039;assgined&#039;&#039; nodes as well maintained and operational as possible since that is how they can maximize their rewards. To achieve that over time the node providers can utilize the &#039;&#039;&#039;node swapping&#039;&#039;&#039; feature.  &lt;br /&gt;
&lt;br /&gt;
==Node swapping==&lt;br /&gt;
Node swapping feature is used to &#039;&#039;swap&#039;&#039; an &#039;&#039;assigned&#039;&#039; node for an &#039;&#039;unassigned&#039;&#039; node owned by the same &#039;&#039;node operator&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
A node provider notices that one of his nodes is performing poorly. In order to maximize his rewards, he wants to act quickly and remove the &#039;&#039;assigned&#039;&#039; node from a subnet for a different &#039;&#039;unassigned&#039;&#039; node &#039;&#039;&#039;within the same data center&#039;&#039;&#039;. He uses the &#039;&#039;&#039;node swapping feature&#039;&#039;&#039; to do that without &#039;&#039;&#039;any proposals or governance&#039;&#039;&#039;. After performing the swap they can perform maintenance on the node and see why it failed in the first place. &lt;br /&gt;
&lt;br /&gt;
==Performing a node swap==&lt;br /&gt;
To perform a node swap one has to follow the following steps:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: if the node is turned off before it gracefully leaves the subnet it will appear as malicious to the consensus  which can result in rewards penalty!&lt;br /&gt;
&lt;br /&gt;
#Find the principal ID of an &#039;&#039;assigned&#039;&#039; node that should be removed from a subnet.   To do that one can use various tools, but for the sake of this example we will show examples from [https://dashboard.internetcomputer.org/ the public dashboard].[[File:Node provider dead node part of a subnet.png|left|frameless|1000x1000px|Degraded node with its node ID and health status]]&lt;br /&gt;
#Find the principal ID of an &#039;&#039;unassigned&#039;&#039; node that should be added to a subnet in place of an &#039;&#039;assigned&#039;&#039; node picked in the previous step.  To do that one can click on the data center (below the &#039;&#039;&#039;DC ID&#039;&#039;&#039; &amp;quot;to1&amp;quot; for this example) of the node from the previous step which will take them to the view which contains all the node machines from the same data center. From there, pick the one that isn&#039;t &#039;&#039;assigned&#039;&#039; to any subnet (the &#039;&#039;&#039;subnet ID&#039;&#039;&#039; column should contain a &#039;-&#039;).[[File:Unassigned nodes in the same data center.png|left|frameless|1111x1111px]]&lt;br /&gt;
#Using ic-admin utility to perform a node swap:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Uncomment this if the node operator identity is behind a private key file&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--secret-key-pem&amp;quot;&lt;br /&gt;
# &amp;lt;path-to-key-pem&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
# Uncomment this if node operator identity is behind an hsm&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--use-hsm&amp;quot;&lt;br /&gt;
# &amp;quot;--slot&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-slot&amp;gt;&lt;br /&gt;
# &amp;quot;--key-id&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-id&amp;gt;&lt;br /&gt;
# &amp;quot;--pin&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-pin&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
ic-admin --nns-urls https://ic0.app ${AUTH[@]} swap-node-in-subnet-directly \&lt;br /&gt;
    --old-node-id &amp;lt;principal-from-step-1&amp;gt; \&lt;br /&gt;
    --new-node-id &amp;lt;principal-from-step-2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the response from the call is successful the node doesn&#039;t leave the subnet immediately. There is &#039;&#039;&#039;graceful leaving period&#039;&#039;&#039; that needs to be awaited. It takes around 15-20 minutes depending on the subnet. If the logs of the node are observed through the BMC console there are two messages that need to show in order for the node to completely leave the subnet &#039;&#039;gracefully&#039;&#039;.   The first log that indicates that the node noticed that the swapping was requested looks like the following:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node started leaving subnet &amp;lt;subnet-id&amp;gt;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After some time the node will show the following log which indicates it left the subnet:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node gracefully left a subnet &amp;lt;subnet-id&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#Only after the second log is it safe to turn off the node and proceed to do maintenance.&lt;br /&gt;
&lt;br /&gt;
== Limitations and constraints==&lt;br /&gt;
To ensure fair and safe use of the swapping feature there are some limitations and constraints about the usage of the feature that need to be shared. &lt;br /&gt;
&lt;br /&gt;
=====Ownership and locality constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;locality&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
#The &#039;&#039;old node&#039;&#039; is an &#039;&#039;assigned&#039;&#039; node (it is a part of a subnet) and the &#039;&#039;new node&#039;&#039; is an &#039;&#039;unassigned&#039;&#039; node (it isn&#039;t a part of any subnet).&lt;br /&gt;
#Both &#039;&#039;old&#039;&#039; and &#039;&#039;new&#039;&#039; nodes are owned by the same &#039;&#039;&#039;node provider&#039;&#039;&#039; and are located in the same &#039;&#039;&#039;data center&#039;&#039;&#039;. Furthermore they have to be owned by the same &#039;&#039;&#039;node operator.&#039;&#039;&#039; This is needed to ensure that the &#039;&#039;decentralization&#039;&#039; doesn&#039;t change when the swaps are performed.&lt;br /&gt;
&lt;br /&gt;
=====Rate limiting constraints=====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;rate limiting&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of hasn&#039;t had a swap in the last &#039;&#039;&#039;2 hours&#039;&#039;&#039; - this limit is here to protect the subnet from losing its state from too many swaps happening at the same time.&lt;br /&gt;
#The &#039;&#039;&#039;node provider&#039;&#039;&#039; performing the swap hasn&#039;t made a swap on the &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of in the last &#039;&#039;&#039;12 hours&#039;&#039;&#039; - this limit is here to protect other node providers from being unable to swap nodes because one node provider is constantly swapping nodes within the &#039;&#039;&#039;2 hour&#039;&#039;&#039; limit of the 1st constraint.&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8643</id>
		<title>Node Provider Node Swapping Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8643"/>
		<updated>2025-10-28T12:59:37Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: Added images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===🚧 &#039;&#039;&#039;Node swapping still hasn&#039;t been enabled on the network! Come back to this page to see the status of its rollout.&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Node providers run nodes on the Internet Computer and receive rewards depending on how well their nodes perform. Only nodes that contribute to the overall performance of the node provider are the nodes that are part of a subnet. We call those nodes &#039;&#039;assgined&#039;&#039;. All other nodes that aren&#039;t a part of any subnet and are not utilized don&#039;t contribute to the overall performance of the node provider. We call those nodes &#039;&#039;unassigned&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
It is in the node provider&#039;s best interest to keep the &#039;&#039;assgined&#039;&#039; nodes as well maintained and operational as possible since that is how they can maximize their rewards. To achieve that over time the node providers can utilize the &#039;&#039;&#039;node swapping&#039;&#039;&#039; feature.  &lt;br /&gt;
&lt;br /&gt;
==Node swapping==&lt;br /&gt;
Node swapping feature is used to &#039;&#039;swap&#039;&#039; an &#039;&#039;assigned&#039;&#039; node for an &#039;&#039;unassigned&#039;&#039; node owned by the same &#039;&#039;node operator&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
A node provider notices that one of his nodes is performing poorly. In order to maximize his rewards, he wants to act quickly and remove the &#039;&#039;assigned&#039;&#039; node from a subnet for a different &#039;&#039;unassigned&#039;&#039; node &#039;&#039;&#039;within the same data center&#039;&#039;&#039;. He uses the &#039;&#039;&#039;node swapping feature&#039;&#039;&#039; to do that without &#039;&#039;&#039;any proposals or governance&#039;&#039;&#039;. After performing the swap they can perform maintenance on the node and see why it failed in the first place. &lt;br /&gt;
&lt;br /&gt;
==Performing a node swap==&lt;br /&gt;
To perform a node swap one has to follow the following steps:&lt;br /&gt;
&lt;br /&gt;
#Find the principal ID of an &#039;&#039;assigned&#039;&#039; node that should be removed from a subnet.   To do that one can use various tools, but for the sake of this example we will show examples from [https://dashboard.internetcomputer.org/ the public dashboard].[[File:Node provider dead node part of a subnet.png|left|frameless|1000x1000px|Degraded node with its node ID and health status]]&lt;br /&gt;
#Find the principal ID of an &#039;&#039;unassigned&#039;&#039; node that should be added to a subnet in place of an &#039;&#039;assigned&#039;&#039; node picked in the previous step.  To do that one can click on the data center (below the &#039;&#039;&#039;DC ID&#039;&#039;&#039; &amp;quot;to1&amp;quot; for this example) of the node from the previous step which will take them to the view which contains all the node machines from the same data center. From there, pick the one that isn&#039;t &#039;&#039;assigned&#039;&#039; to any subnet (the &#039;&#039;&#039;subnet ID&#039;&#039;&#039; column should contain a &#039;-&#039;).[[File:Unassigned nodes in the same data center.png|left|frameless|1111x1111px]]&lt;br /&gt;
#Using ic-admin utility to perform a node swap:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Uncomment this if the node operator identity is behind a private key file&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--secret-key-pem&amp;quot;&lt;br /&gt;
# &amp;lt;path-to-key-pem&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
# Uncomment this if node operator identity is behind an hsm&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--use-hsm&amp;quot;&lt;br /&gt;
# &amp;quot;--slot&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-slot&amp;gt;&lt;br /&gt;
# &amp;quot;--key-id&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-id&amp;gt;&lt;br /&gt;
# &amp;quot;--pin&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-pin&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
ic-admin --nns-urls https://ic0.app ${AUTH[@]} swap-node-in-subnet-directly \&lt;br /&gt;
    --old-node-id &amp;lt;principal-from-step-1&amp;gt; \&lt;br /&gt;
    --new-node-id &amp;lt;principal-from-step-2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the response from the call is successful the node doesn&#039;t leave the subnet immediately. There is &#039;&#039;&#039;graceful leaving period&#039;&#039;&#039; that needs to be awaited. It takes around 15-20 minutes depending on the subnet. If the logs of the node are observed through the BMC console there are two messages that need to show in order for the node to completely leave the subnet &#039;&#039;gracefully&#039;&#039;.   The first log that indicates that the node noticed that the swapping was requested looks like the following:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node started leaving subnet &amp;lt;subnet-id&amp;gt;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After some time the node will show the following log which indicates it left the subnet:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node gracefully left a subnet &amp;lt;subnet-id&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#Only after the second log is it safe to turn off the node and proceed to do maintenance.   &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: if the node is turned off before it gracefully leaves the subnet it will appear as malicious to the consensus  which can result in rewards penalty!&lt;br /&gt;
&lt;br /&gt;
== Limitations and constraints==&lt;br /&gt;
To ensure fair and safe use of the swapping feature there are some limitations and constraints about the usage of the feature that need to be shared. &lt;br /&gt;
&lt;br /&gt;
=====Ownership and locality constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;locality&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
#The &#039;&#039;old node&#039;&#039; is an &#039;&#039;assigned&#039;&#039; node (it is a part of a subnet) and the &#039;&#039;new node&#039;&#039; is an &#039;&#039;unassigned&#039;&#039; node (it isn&#039;t a part of any subnet).&lt;br /&gt;
#Both &#039;&#039;old&#039;&#039; and &#039;&#039;new&#039;&#039; nodes are owned by the same &#039;&#039;&#039;node provider&#039;&#039;&#039; and are located in the same &#039;&#039;&#039;data center&#039;&#039;&#039;. Furthermore they have to be owned by the same &#039;&#039;&#039;node operator.&#039;&#039;&#039; This is needed to ensure that the &#039;&#039;decentralization&#039;&#039; doesn&#039;t change when the swaps are performed.&lt;br /&gt;
&lt;br /&gt;
=====Rate limiting constraints=====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;rate limiting&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of hasn&#039;t had a swap in the last &#039;&#039;&#039;2 hours&#039;&#039;&#039; - this limit is here to protect the subnet from losing its state from too many swaps happening at the same time.&lt;br /&gt;
#The &#039;&#039;&#039;node provider&#039;&#039;&#039; performing the swap hasn&#039;t made a swap on the &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of in the last &#039;&#039;&#039;12 hours&#039;&#039;&#039; - this limit is here to protect other node providers from being unable to swap nodes because one node provider is constantly swapping nodes within the &#039;&#039;&#039;2 hour&#039;&#039;&#039; limit of the 1st constraint.&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=File:Unassigned_nodes_in_the_same_data_center.png&amp;diff=8642</id>
		<title>File:Unassigned nodes in the same data center.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=File:Unassigned_nodes_in_the_same_data_center.png&amp;diff=8642"/>
		<updated>2025-10-28T12:57:38Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Potential targets of the node swaps&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=File:Data_center_nodes_that_can_replace_the_degraded_node.png&amp;diff=8641</id>
		<title>File:Data center nodes that can replace the degraded node.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=File:Data_center_nodes_that_can_replace_the_degraded_node.png&amp;diff=8641"/>
		<updated>2025-10-28T12:54:26Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Potential targets to replace the degraded node&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=File:Node_provider_dead_node_part_of_a_subnet.png&amp;diff=8640</id>
		<title>File:Node provider dead node part of a subnet.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=File:Node_provider_dead_node_part_of_a_subnet.png&amp;diff=8640"/>
		<updated>2025-10-28T12:49:38Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Shows a node that is a candidate to be a target of a node swapping feature&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8639</id>
		<title>Node Provider Node Swapping Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=Node_Provider_Node_Swapping_Guide&amp;diff=8639"/>
		<updated>2025-10-28T12:46:35Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: Contains information about what node swapping is, when and how to use it, the constraints and limits and examples.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===🚧 &#039;&#039;&#039;Node swapping still hasn&#039;t been enabled on the network! Come back to this page to see the status of its rollout.&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Node providers run nodes on the Internet Computer and receive rewards depending on how well their nodes perform. Only nodes that contribute to the overall performance of the node provider are the nodes that are part of a subnet. We call those nodes &#039;&#039;assgined&#039;&#039;. All other nodes that aren&#039;t a part of any subnet and are not utilized don&#039;t contribute to the overall performance of the node provider. We call those nodes &#039;&#039;unassigned&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
It is in the node provider&#039;s best interest to keep the &#039;&#039;assgined&#039;&#039; nodes as well maintained and operational as possible since that is how they can maximize their rewards. To achieve that over time the node providers can utilize the &#039;&#039;&#039;node swapping&#039;&#039;&#039; feature.  &lt;br /&gt;
&lt;br /&gt;
==Node swapping==&lt;br /&gt;
Node swapping feature is used to &#039;&#039;swap&#039;&#039; an &#039;&#039;assigned&#039;&#039; node for an &#039;&#039;unassigned&#039;&#039; node owned by the same &#039;&#039;node operator&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=====Example=====&lt;br /&gt;
A node provider notices that one of his nodes is performing poorly. In order to maximize his rewards, he wants to act quickly and remove the &#039;&#039;assigned&#039;&#039; node from a subnet for a different &#039;&#039;unassigned&#039;&#039; node &#039;&#039;&#039;within the same data center&#039;&#039;&#039;. He uses the &#039;&#039;&#039;node swapping feature&#039;&#039;&#039; to do that without &#039;&#039;&#039;any proposals or governance&#039;&#039;&#039;. After performing the swap they can perform maintenance on the node and see why it failed in the first place. &lt;br /&gt;
&lt;br /&gt;
==Performing a node swap==&lt;br /&gt;
To perform a node swap one has to follow the following steps:&lt;br /&gt;
&lt;br /&gt;
#Find the principal ID of an &#039;&#039;assigned&#039;&#039; node that should be removed from a subnet.   To do that one can use various tools, but for the sake of this example we will show examples from [https://dashboard.internetcomputer.org/ the public dashboard].&lt;br /&gt;
#Find the principal ID of an &#039;&#039;unassigned&#039;&#039; node that should be added to a subnet in place of an &#039;&#039;assigned&#039;&#039; node picked in the previous step.  To do that one can click on the data center of the node from the previous step which will take them to the view which contains all the node machines from the same data center. From there, pick the one that isn&#039;t &#039;&#039;assigned&#039;&#039; to any subnet (the &#039;&#039;&#039;subnet ID&#039;&#039;&#039; column should contain a &#039;-&#039;).&lt;br /&gt;
#Using ic-admin utility to perform a node swap:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Uncomment this if the node operator identity is behind a private key file&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--secret-key-pem&amp;quot;&lt;br /&gt;
# &amp;lt;path-to-key-pem&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
# Uncomment this if node operator identity is behind an hsm&lt;br /&gt;
#AUTH=(&lt;br /&gt;
# &amp;quot;--use-hsm&amp;quot;&lt;br /&gt;
# &amp;quot;--slot&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-slot&amp;gt;&lt;br /&gt;
# &amp;quot;--key-id&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-key-id&amp;gt;&lt;br /&gt;
# &amp;quot;--pin&amp;quot;&lt;br /&gt;
# &amp;lt;hsm-pin&amp;gt;&lt;br /&gt;
#)&lt;br /&gt;
&lt;br /&gt;
ic-admin --nns-urls https://ic0.app ${AUTH[@]} swap-node-in-subnet-directly \&lt;br /&gt;
    --old-node-id &amp;lt;principal-from-step-1&amp;gt; \&lt;br /&gt;
    --new-node-id &amp;lt;principal-from-step-2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#After the response from the call is successful the node doesn&#039;t leave the subnet immediately. There is &#039;&#039;&#039;graceful leaving period&#039;&#039;&#039; that needs to be awaited. It takes around 15-20 minutes depending on the subnet. If the logs of the node are observed through the BMC console there are two messages that need to show in order for the node to completely leave the subnet &#039;&#039;gracefully&#039;&#039;.   The first log that indicates that the node noticed that the swapping was requested looks like the following:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node started leaving subnet &amp;lt;subnet-id&amp;gt;.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After some time the node will show the following log which indicates it left the subnet:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Node gracefully left a subnet &amp;lt;subnet-id&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#Only after the second log is it safe to turn off the node and proceed to do maintenance.   &#039;&#039;&#039;IMPORTANT&#039;&#039;&#039;: if the node is turned off before it gracefully leaves the subnet it will appear as malicious to the consensus  which can result in rewards penalty!&lt;br /&gt;
&lt;br /&gt;
== Limitations and constraints ==&lt;br /&gt;
To ensure fair and safe use of the swapping feature there are some limitations and constraints about the usage of the feature that need to be shared. &lt;br /&gt;
&lt;br /&gt;
===== Ownership and locality constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;locality&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;old node&#039;&#039; is an &#039;&#039;assigned&#039;&#039; node (it is a part of a subnet) and the &#039;&#039;new node&#039;&#039; is an &#039;&#039;unassigned&#039;&#039; node (it isn&#039;t a part of any subnet).&lt;br /&gt;
# Both &#039;&#039;old&#039;&#039; and &#039;&#039;new&#039;&#039; nodes are owned by the same &#039;&#039;&#039;node provider&#039;&#039;&#039; and are located in the same &#039;&#039;&#039;data center&#039;&#039;&#039;. Furthermore they have to be owned by the same &#039;&#039;&#039;node operator.&#039;&#039;&#039; This is needed to ensure that the &#039;&#039;decentralization&#039;&#039; doesn&#039;t change when the swaps are performed.&lt;br /&gt;
&lt;br /&gt;
===== Rate limiting constraints =====&lt;br /&gt;
A node provider &#039;&#039;&#039;can&#039;&#039;&#039; only perform a swap of two nodes if and only if the following &#039;&#039;rate limiting&#039;&#039; constraints are met:&lt;br /&gt;
&lt;br /&gt;
# The &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of hasn&#039;t had a swap in the last &#039;&#039;&#039;2 hours&#039;&#039;&#039; - this limit is here to protect the subnet from losing its state from too many swaps happening at the same time.&lt;br /&gt;
# The &#039;&#039;&#039;node provider&#039;&#039;&#039; performing the swap hasn&#039;t made a swap on the &#039;&#039;&#039;subnet&#039;&#039;&#039; which the &#039;&#039;old&#039;&#039; node is a part of in the last &#039;&#039;&#039;12 hours&#039;&#039;&#039; - this limit is here to protect other node providers from being unable to swap nodes because one node provider is constantly swapping nodes within the &#039;&#039;&#039;2 hour&#039;&#039;&#039; limit of the 1st constraint.&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=File:Node_provider_node.png&amp;diff=8638</id>
		<title>File:Node provider node.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=File:Node_provider_node.png&amp;diff=8638"/>
		<updated>2025-10-28T11:55:24Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Example of a node not working but still being assigned to a subnet&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
	<entry>
		<id>https://wiki.internetcomputer.org/w/index.php?title=File:Node_Provider_node_offline.png&amp;diff=8637</id>
		<title>File:Node Provider node offline.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.internetcomputer.org/w/index.php?title=File:Node_Provider_node_offline.png&amp;diff=8637"/>
		<updated>2025-10-28T11:53:33Z</updated>

		<summary type="html">&lt;p&gt;Nikola.milosavljevic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An example of a node that is offline but is a part of a subnet&lt;/div&gt;</summary>
		<author><name>Nikola.milosavljevic</name></author>
	</entry>
</feed>