Running a libra light node

Looks like the block in Libra doesn’t have block header, which are commonly used to implement a light client:


So the question is how a client wants to run a light client and verify some of the block state (e.g., the balance of an account or existence of an event) without running a full node in Libra? Any code or spec can be helpful!

Libra blocks have a Quorum certificate in the block data. This serves the same purpose as a header in a Tendermint block design.

If more precisely, qc equals to header+commit in TM?

Yes.

Also because Libra validators are fixed between epochs, most of the complexity of Tendermint light clients is eliminated.

You basically need a light client you just need the QuorumCert for the last block in each epoch and then the QC for the HEAD block.

This is a good read.
https://github.com/libra/libra/blob/3ac6bb8f8bab534eb4005e23d4fe8e68b0fdc27c/tech-papers/lbft-reconfig/lbft-reconfig.pdf

Yes, epoch design greatly simplifies a lot of complexity in TM light clients, which seems to be pretty complicated to me from the spec https://github.com/tendermint/spec/blob/master/spec/consensus/light-client/verification.md.

Actually, I have some thoughts about improving/simplifying TM and one direction could introduce epoch into TM consensus param (besides gas limit/block size limit). This may bring two benefits in my head:

  • Super-fast client: As you said, this allows a super fast client that only download the last header+new validator set for each epoch and tip (super-fast light client) and sync the state of the tip of the blockchain (super-fast validator, i.e., a client can propose and sign blocks). This also eliminates downloading full blocks, which is the major storage cost of current gaiad (111G in my machine). The open question is that current ABCI doesn’t have interface to sync state directly - instead the state must be recovered by replaying all blocks (as ETH supports by GetNodeData p2p cmd https://github.com/ethereum/devp2p/blob/master/caps/eth.md#getnodedata-0x0d).

  • Simplify IBC logic, which is heavily based on the light client verification.

Any suggestions?

TBH, our decision to go “epochless” with Tendermint was primarily driven an intagible sense of constitutes permissionlessness.

We also wanted to try prove that we can make light clients work without epochs. Epochs make everything easier.

Making a tendermint with epochs isn’t hard. You can also just do it the ABCI layer.

Tendermint has a state sync system nearly compelted.

That is awesome! Taking a look into the state sync.