Загрузка видео...

Не удалось загрузить видео

На главную

Introducing reference functions: a new type of composability in UTXO👀 It enables use-cases where data is locked based on a conditions Ex: oracles (pay to access data) and games video & thread ↓

30,851 просмотров • 1 год назад •via X (Twitter)

Комментарии: 12

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

While UTXOs have a lot of advantages, they also require developers to think about concurrency If two users try to access the same UTXO at the same time, only one transaction can succeed

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

There are many ways to mitigate this But a common way to tackle this to avoid it happening in the first place! Enter reference inputs: specify you're reading from a UTXO's data without modifying it (aka do not consume it)

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

Problem with reference inputs: they unconditionally access the data (cannot run any code) This is annoying when trying to build something like an oracle (where you users to pay for data) Or a game where you want data to only be accessible if a user meets some requirements

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

Starstream, the new UTXO-based zkVM we're bringing, solves this by introducing a new concept: reference functions But how do they work?

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

Starstream instead represents UTXOs using coroutines: programs that can pause & resume at any time When you use a dApp's UTXO, its program runs until the next pause point, and the continuation becomes the transaction output (the next UTXO to continue later)

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

The way Starstream achieves this is by storing an extra field in UTXOs: the frame This part encodes all the data required to continue the program from where it paused later

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

Starstream enables devs to specify different points the contract can resume from in order to provide utility functions That means things like NFT contracts can define utility functions directly inline into the contract like getSupply 👀

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

In the Starstream model, a utility function that doesn't modify the UTXO's storage can automatically be marked as a reference input👍 However, we can do even better! Any function that leaves both storage AND frame the same value as where it started can be a reference function

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

This kind of reference function is very useful, as Starstream also enables native composition between UTXOs in the same transaction (using effects) This means you can guard data between a "RequirePayment" error that has to be handled by another UTXO that pays the oracle 👍

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

This just one of the many developer experience improvements that Starstream will bring! If you haven't heard about Starstream before, you can find an overview video below

Фото профиля Sebastien Guillemot
Sebastien Guillemot1 год назад

Additionally, if you find learning more about the next generation of UTXO-based VMs interesting Consider joining the Starstream Working Group which is filled with discussions like this 👀

Фото профиля RTTS
RTTS1 год назад

API testing of interfaces is critical to determine if they meet requirements for functionality, reliability, performance, and security. Check out RTTS - the automated testing experts since 1996. #API #testautomation #integrationtest

Похожие видео