# Pastebin 41mFs3Qz Hey Guys, was trying to understand how stellar works from the implementation perspective. Here is what I have understood. Can some validate this : - Create tx in the form of XDR in stellar lab - Call route 'tx' - XDR gets parsed into `envelope` - Get the hash and Check if its already present in the txPool (i.e `mPendingTransactions`) otherwise send response `TX_STATUS_DUPLICATE` - Check if tx is valid otherwise send response `TX_STATUS_ERROR` - Check if balance is sufficient othewise send response `txINSUFFICIENT_BALANCE` - Add tx into `mPendingTransactions` and send responses `TX_STATUS_PENDING` - Form a `StellarMessage` - msg, with `type=TRANSACTION`, `transaction=envelope` - broadcastMessage(msg) When the next ledger starts: - Copy from `mPendingTransactions` to `proposedSet` - Remove invalid from `proposedSet` // proposedSet->trimInvalid(mApp, removed); - Remove from `mPendingTransactions` // removeReceivedTxs(removed); - Meanwhile, node keep listening for txs from other nodes as well and stores them into its `proposedSet` (could not verify it in code though) - once the proposedSet is ready, its hash is computed - the computed hash, the next slot index and the proposedSet is added to the pendingEnvelopes - After this NOMINATION starts // mNominationProtocol.nominate(value, previousValue, timedout); - PREPARE -> COMMIT -> EXTERNALISE