How does a local node build up its local name database?


I just went through the architecture again and wondering how a local core instance builds up its local name database without losing any trust. This name database is based on Bitcoin’s blockchain, so the instance probably asks a (Blockstack?/Bitcoin?) full node for relevant transactions (that fit Blockstack’s requirements).

With Bitcoin’s Simple Payment Verification (SPV) the local instance is able to verify these transactions. Does that get used currently?

How does the local node know whether the full node didn’t omit some transactions?


A full Blockstack core node can build up its local name database from scratch by iterating through the entire bitcoin blockchain from the beginning of history and selecting transactions that meet its rules and using those transactions to build the name database.

I don’t think so, but @jude or @aaron would have to verify.

Are you asking about full blockstack nodes versus nodes that aren’t full blockstack nodes? Currently the later ones (like we ship with the macOS app) are merely API endpoints that query and trust the configured for information about names. It trusts that the full node isn’t lying to it. It’s important to note that all nodes we ship have the code for to be full nodes, it is simply a matter of turning it on and waiting for the name database to be built.


Ok, so currently a non-full node trusts a full node to give all relevant transactions and not to omit any.
Does a non-full node have an own trusted name database (with public key, name and zone file hash)? Or does these nodes trust their full node with these bindings?


A “non-full node” is really just an API endpoint that communicates via remote procedure calls to a full blockstack node. As I understand it, It does not have its own trusted name database.


@larry Thats right! When you are running blockstack locally you are connecting to ether where we are running instances of blockstack-core or where we are running an api that exposes some name operations. I built out a couple of diagrams of how this works: