Question: State Sync With Only One Node Over RPC

Hey folks! :wave:

I’m looking into using Tendermint for a new project of mine, but I have a question about block pruning and state sync.

In my application, holding a long-term ledger is not a requirement. It’s OK if we can’t trace all blocks to genesis, and it’s OK if we lose that chain because no nodes have kept those blocks. Low resource usage is the priority, while not sacrificing the effectiveness of the consensus protocol.

My question was whether or not it’s possible to have this scenario succeed:

  1. Start a new cluster with one node
  2. The cluster continues to operate from that one node and it only holds the last, say, 1000 blocks.
  3. Soon the node no longer has the blockchain all the way to genesis because of prune blocks.
  4. I add a new node to the cluster and State Sync is used to catch up to the current state and then begin normal consensus
  5. I now have two nodes connected to the cluster and I can later add and remove more with a similar process, all without needing to have a node that has the full blockchain state.

My biggest concern is this piece in the docs:

This says that 2 RPC servers are required to do a state sync, but what if I start out with a cluster with only one node? This is particularly possible in my use-case because my use-case is a permissioned chain that should operate remotely similar to a scalable database which can function fine with only one node.

I see that in the latest release of Tendermint you can now do a State Sync over RPC. Does that mean that you no longer need 2 RPC servers, and you could join a second node to a cluster that started with only one node that doesn’t have the full ledger?

1 Like

Hey @zicklag afaik uniqueness is not enforced on the RPC servers, so you could get away with pointing to a single one and repeating the same endpoint on the second. I also believe this requirement for RPC servers is going to deprecated in the future. You’ll find Cosmos SDK experts in the dev discord if you have more detailed questions!

1 Like

Awesome, thanks for the reply! I’m doing some experimenting locally so I test that out, and I’ll get on Discord if I get the chance if I have more questions.