MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
5.99k stars 11.1k forks source link

How to perform consensus inside the narwhal dag on the output of execution? #5304

Open piersy opened 2 years ago

piersy commented 2 years ago

Description

It would be nice to be able to leverage the DAG based consensus within narwhal for reaching consensus on the execution result (from now on referred to as XR for brevity) of transactions ordered by narwhal.

Currently it looks like this is not implemented because at a minimum some extra data would need to be included in the DAG probably inside collections, and right now a collection seems to be just a single batch message and batch messages only contain transactions and a digest. https://github.com/MystenLabs/narwhal/blob/6e86be42032de550764368c4a8a66e1472c68445/types/proto/narwhal.proto#L35-L38

I see 2 possible approaches to this (of course there are probably many more), both assume that the XRs are included in collections.

huitseeker commented 2 years ago

This post addresses the topic directly: https://dahliamalkhi.github.io/posts/2022/08/dag-exec/