5

Am I understanding correctly, that I can store for example my rental contract as a Smart Contract and then it is made official with baking it with bakers?

If I got the first part right, the contract is first put to mempool and then bakers take it from there to verify it. My main issue in here is related to the question what happens next: Where is the contract stored for public so far, that in day X in the future I can come back and see, what is my resign policy for example?

I read that the baking process has some history for the sake of reverting state while baking a round, but where the result goes for saving after baking is over? At least my gut feeling is that bakers do not act as repo for that. If that was the case, if you stop baking and shut down your baking machine, there would be risk of missing information taking place.

1 Answer 1

7

Am I understanding correctly, that I can store for example my rental contract as a Smart Contract and then it is made official with baking it with bakers?

Like in all open blockchain systems, you can run a full node, which downloads all blockchain data. Once it has been synced, it can propagate new transactions and blocks to network, can validate new transactions and blocks, adds valid transactions and blocks to its local blockchain. Consensus algorithm guarantees that every honest full node has same local copy (there are on the same page) when they are in majority.

To answer your question, you can create a new contract (Rental contract), once you have written the logic in michelson(smart contract language) and it passes specifications. To do this, you simply create a transaction that includes code of the contract and initial parameters and send it to your own node (if you are running a full node) or send it to the one of such nodes running. (which eventually propogate your transaction to all other nodes in network). Yes. your contract is made official when bakers include your contract creation transaction in their block and block is finally baked into tezos blockchain.

Where is the contract stored for public so far, that in day X in the future I can come back and see, what is my resign policy for example?

contract is stored by all full nodes, it can be requested from full nodes via contract address. So if you are running a full node, it is stored locally on your machine. Communication to full nodes is done via APIs exposed by nodes. More user friendly way to access is using a blockchain explorer. tzscan is one of such explorer.

PS : A note on notations, transactions in tezos are called operations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.