TLDR
For regular user work, always use workchain 0 - which is the workchain with workchain_id
= 0
What are the different chains in TON?
-
One master chain - the special unique workchain with
workchain_id
=-1
Mostly used by network validators for running the PoS elections contracts, regular users don't normally send transactions on this chain.
-
Up to 2^32 workchains - today there's only one with
workchain_id
=0
but possibly more in the future99.9% of user transactions on TON take place on workchain 0, this is where you should work unless you know exactly what you're doing.
-
Up to 2^60 shardchains per each workchain (they all have the same
workchain_id
)This is an internal implementation detail of TON's infinite sharding (autoscaling). If any of the workchains is under heavy load, it will be split automatically to two shardchains and when the load is reduced, it will be merged back. You would normally not care about this, it happens under the hood. When you deploy contracts or send transactions you don't need to specify the shardchain you're working on, it's calculated by the system automatically.