I have just started learning Corda. I am not clear with difference between ledger, vault and storage service. My queries are with regards to following documents I went through:
Corda technical paper(https://docs.corda.net/_static/corda-technical-whitepaper.pdf): It states "The vault contains data extracted from the ledger that is considered relevant to the node’s owner, stored in a form that can be easily queried and worked with. It also contains private key material that is needed to sign transactions consuming states in the vault."
Corda docs(https://docs.corda.net/key-concepts-node.html): It mentions persistence layer having two parts - vault and storage service.
Queries
- Are ledger, vault, storage service separate components?
- Are vault, ledger, storage service part of same database under a node?
- Does ledger contain everything - all consumed and unconsumed states, transactions, attachments, flow checkpoints etc. relevant to a particular node?
- Does vault only contains consumed and uncosumed states relevant to a particular node? Does this mean that vault is a subset of ledger, and fetches information from the ledger everytime a transaction is recorded into the ledger?
- Does storage service contains all data other than consumed and uncosumed states i.e. transactions, attachments, flow checkpoints etc ? Does this mean that storage service is a subset of ledger, and fetches information from the ledger everytime a transaction is recorded into the ledger?
Can anyone please help me giving clear picture of database architecture used in corda(I could not clearly understand the diagram at https://docs.corda.net/vault.html)? I don't see "storage service" anywhere in this diagram.