How the data flows in NEAR Protocol
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
Read more on NEAR Indexer Docs near-indexers.io More on information covered in this video https://near-indexers.io/docs/data-fl...
Follow the latest from NEAR Protocol on: Website: near.org Discord: near.chat Blog: near.org/blog Twitter: / nearprotocol GitHub: github.com/near github.com/nearprotocol #Blockchain #FutureIsNEAR #NEAR #nearprotocol
Transcript
602 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:00
near blockchain data flow might be a bit tricky at a glance but it is pretty straightforward and follows well-defined rules in this video we are going to have a closer look at how the data flows in your blockchain in fact any blockchain flow can be represented as an infinity timeline that has a start but has no end and block appears on that timeline with some interval each of these blocks holds the information about the previous one those creating a chain of blocks near blockchain has a sharded nature
- 0:31
meaning that more than one parallel network called the shard can be live at any moment and each chart produces a chunk of a block at a given interval a blocking near blockchain is a collection of the block chunks from all charts blockchain is shorten it to chunk in your protocol documentation so returning to the dataflow itself the best we can do is to imagine tracks like we could see in audio video editing apps each chart has its own set of tracks the top track is for chunks they appear no
- 1:00
matter what at a given interval for near blockchain the interval is about one second chunks are being produced even if nothing is happening on the blockchain but what do we mean by saying something is happening we mean that something has triggered some changes in the blockchain and the most well-known method to trigger any changes is to send the transaction to the blockchain with instructions of what we want to change and who has requested those changes a
- 1:26
transaction needs to be constructed signed and sent to the blockchain once it is executed we expect to have a result execution outcome oh that is simple but it's not really accurate for near blockchain in the beginning there is a transaction it contains instructions we want to be executed on the blockchain transaction is sent to near blockchain and yes it is executed there immediately but the
- 1:52
immediate result of the transaction execution is always just an acknowledgement that it will be executed on the chain this internal execution request is known as receipt you can think of receipt as an internal transaction that exists to pass information across sharks it looks not so straightforward if we come back to our tracks let's have a look at a simple example assuming we have two
- 2:15
accounts living on different charts alice and bob alice creates a transaction to send a few tokens to bob the transaction is immediately executed and the execution outcome for the transaction is always a receipt but the receipt cannot be executed here because bob doesn't live on the same chart as that is so the receipt must be executed on the receiver's chart so the receipt is moving to the chart where bob leaves on the bob's chart the receipt is
- 2:40
executed and the process is considered as finished today we have learned the main principles of how data is flowing in your protocol we have found out that transactions execute and the execution outcome of the transaction is always a receipt now we know that receipt is a main internal asset for near blockchain and it has a power of travelling between shards we learned the near data flow on a simple example of course in real life with more complex transactions that
- 3:10
involve cross-contract calls there will be more receipts and execution outcomes you would be able to read about it in the docs by yourself i hope this video was useful and see you in our next videos