正在加载视频...

视频加载失败

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

相关视频