Get Migration ID programmatically?
App Development3 posts63 views2 likesLast activity 2h ago
WA
WallaceKellyOP
Jan 2026How can I programmatically get the Migration ID from my validator node?
WA
WallaceKelly
Jan 2026 2The Migration ID is included in the GET response of /v0/scan-proxy/dso of the Scan Proxy API:
curl --silent \
http://wallet.localhost:2000/api/validator/v0/scan-proxy/dso \
--header 'Authorization: Bearer eyJhbGciOi...' \
| jq --raw-output '.sv_node_states[0].contract.payload.state.synchronizerNodes[0][1].sequencer.migrationId'
MI
mitesh.mistry
2h agoSince major upgrades now happen through Logical Synchronizer Upgrades (LSUs) instead of hard migrations, the migration ID won’t change again. On MainNet it’s 4 and will stay 4, so the simplest and most stable approach is to hard-code it.
The value differs by network:
-
MainNet: 4, permanently (MainNet is never reset).
-
DevNet and TestNet: currently 1. It could go back to 0 if those networks are ever reset, but that hasn’t been decided.