Lightweight nodes

How do the lightweight nodes for Stacks work? Is there documentation or a white paper to read? I have ideas on how it should work but want to check with the reference documentation.

1 Like

Blockstack is currently built using a design principal called a virtual chain. Using the virtual chain’s current consensus hash, you can determine in logarithmic time complexity whether or not a prior transaction (like a name registration) was processed. In Blockstack’s case, if you know that a particular block’s consensus hash is “good,” you can use it to prove the inclusion or exclusion of any transaction processed prior to that block.

This is going to be significantly revised in Stacks v2 (under development) – each block will commit to a Merkle tree root hash calculated over the materialized view of all current account balances and smart contract table states. Moreover, you’ll be able to calculate whether or not the Merkle tree root is “good” by determining if it came from the longest Stacks v2 chain (which, in turn, can be determined using the Bitcoin block headers). The system is still under development, but it will be published as a SIP when it’s ready.