A Formal Approach for the Analysis of the XRP Ledger Consensus Protocol