Significance of Virtualchain or blockstack core in broadcasting transactions to the bitcoin network


I was reviewing the code of subdomain registrar and it has various functions like submit batch which I think are used to broadcast the transactions to the bitcoin network and it is using the bitcoin functions in the blockstack.js library. Does virtualchain or blockstack core play any part in broadcasting these transactions to the bitcoin network?


The subdomain registrar is basically a bot that owns an on-chain name (such as id.blockstack) and uses it to register off-chain names. It listens for requests to create off-chain names with specific Gaia hub URLs and public keys. Every so often, it will generate a NAME_UPDATE virtualchain transaction for its on-chain name that includes the hash of a batch of these off-chain name records (up to about 150 of them at a time). The NAME_UPDATE transaction is eventually picked up by all Blockstack nodes since it’s written to Bitcoin’s chain within an OP_RETURN output. When they see the NAME_UPDATE, they all learn the hash of the batch of names. Once this happens (i.e. after 7 confirmations), the subdomain registrar broadcasts the batch of names to a Blockstack node, which in turn will propagate the batch to other Blockstack nodes via the Atlas protocol. In so doing, each Blockstack node learns of the batch of names, so each node will be able to resolve all off-chain names to their public keys and Gaia hub URLs.