# Fabric System Chaincode
| System Chaincode | Application Chaincode |
|:-----------------------------------:|:-----------------------------------------:|
| Implemented within Peer | Instantiated in Docker container |
| Governs the System behavior | Defines the Apllicaiton behavior |
| Must be consistent across All Peers | Must be consistent across Endorsing Peers |
| NOT bound to the channel | Bound to a channel |

- 6-Default System Chaincodes
- LSCC
Lifecycle
**for 1.x**
- CSCC
Configuration
- QSCC
Querying
- ESCC
Endorsement
- VSCC
Validation
- _lifecycle
_lifecycle
**for 2.x**
:::success
Fabric 2.x supports both LSCC and _lifecycle
:::
- setup
`core.yaml` > `chaincode:` > `system:`

- Interators can create custom system chaincode

- system chaincode Plugins need to be configured in the `core.yaml`
- Implemented as Golang plugins
- Setup under `systemPlugins:`
- Whitelisted under `systems:`
:::warning
That are discussed in this lecture are highly simplified!
:::
## ESCC Endorsement system chaincode
The Endorsement system chaincode defines the requirements for the endorsement of transaction proposal by the peers

## VSCC Validation system chaincode
The validation system chaincode defines the requirements for the validation of the transactions/blocks by the Peers

:::warning
LSCC, ESCC & VSCC are Transaction execution path
When system integrators write custom system chaincode, make sure LSCC ESCC VSCC be consistent across the network
:::
## CSCC Configuration system chaincode
Configuration system chaincode along with LSCC defines the rules for the channel
- `peer channel create --flegs`
- `peer channel update --flegs`

- `peer channel join --flegs`

## QSCC Querying system chaincode
Querying system chaincode provides the querying functionality for the transactions, blocks, config transaction

---
:::info
- **Channel Configuration** decide whether the LSCC will be used for chain code or rather the _lifecycle
- You may have MULTIPLE channels to which the peer may join, and each of these channels independently decide which lifecycle management system chain code will be used
:::
## LSCC Lifecycle system chaincode for 1.x
- `peer chaincode -h`
:::warning
New to Fabric don't need to spend time of this
:::
## _lifecycle Lifecycle system chaincode for 2.x
- `peer lifecycle chaincode -h`
