Intro to Hyperledger
In this module, we'll explore where Hyperledger came from, and how it has evolved over time.
The best way to understand how Hyperledger works is to set up your own node.
Example: Hyperledger for Car Dealerships
It's not the size of your node that matters - it's how you use it.
Now let’s assume Alex moves to Canada. It’s cold in the Winter, so now Alex needs a hybrid instead of an all-electric Tesla. If Alex wants to buy Valeria’s Prius, we’ll need to update the blockchain to reflect this change.
Task: update car0 -> set owner: Valeria to Alex
- Application layer calls ( Smart Contract SDK ).changeCarOwner with the new object
- The SDK processes this object and generates a new transaction that issues a change of the color to red
- Now, the state database updates to include the new transaction, similar to the UTXO calculation in bitcoin, and updates the color to match the new transaction
- Then, once all of this is complete, the chaincode SDK will return a success response to the application layer
The payload would need to look like this:
We can then verify this by running node query.js again, and we’ll see that CAR0 now has an owner: Alex