Skip to content

Commit

Permalink
[docs] use doc/SUMMARY.md as readme
Browse files Browse the repository at this point in the history
Adding a number of partners to our repo, want to make sure the README tells them how to get started! The old README was mostly about FastPay.

Also removed links to Diem coding guidelines and code of conduct to avoid confusion.
  • Loading branch information
sblackshear committed Mar 1, 2022
1 parent b7e81b4 commit 36d2a7d
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 131 deletions.
5 changes: 0 additions & 5 deletions CODE_OF_CONDUCT.md

This file was deleted.

13 changes: 2 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@ cd sui
cargo build --all --all-targets
cargo test
```
TODO: Note the `git clone` command above fails with the following error, which *should* go away when we open our repo up:
TODO: Note the `git clone` command above may fail with the following error, which *should* go away when we open our repo up:

```
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
```

## Coding guidelines for Rust code

For detailed guidance on how to contribute to the Rust code in the Sui repository refer to the [Diem developer documentation](https://developers.diem.com/docs/welcome-to-diem/).

## Pull requests

Please refer to the documentation to determine the status of each project (e.g. actively developed vs. archived) before submitting a pull request.

To submit your pull request:

1. Fork the `sui` repository and create your branch from `main`.
Expand All @@ -34,7 +28,4 @@ To submit your pull request:
6. Complete the Contributor License Agreement (CLA), if you haven't already done so.
7. Submit your pull request.

TODO: Add links to the steps above for more details, such as how to build and test the dev site and where to find the CLA.

## Code of Conduct
Please refer to the [Diem Code of Conduct](https://developers.diem.com/docs/policies/code-of-conduct/) for guidelines on interacting with the community.
TODO: Add links to the steps above for more details, such as how to build and test the dev site and where to find the CLA once we have one.
78 changes: 50 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
# Sui (pre-alpha)

[![Build Status](https://github.com/mystenlabs/fastnft/actions/workflows/rust.yml/badge.svg)](https://github.com/mystenlabs/fastnft/actions/workflows/rust.yml)
[![License](https://img.shields.io/badge/license-Apache-green.svg)](LICENSE.md)

Sui is a decentralized permisionless smart contracts platform
developed with a goal of efficient management of rich assets. Sui uses
low-latency scalable and reliable broadcast between a set of validators to
ensure the safety of common operations on assets. It relies on full
consensus for governance operations and checkpointing performed off
the critical latency path. It uses the [Move](https://github.com/diem/move)
programming language to define assets as typed objects and operations
on these objects.

For more information, visit the [Sui Developer Portal](doc/SUMMARY.md).

## References

Sui is based on [FastPay: High-Performance Byzantine Fault Tolerant Settlement](https://arxiv.org/pdf/2003.11506.pdf).

## Contributing

Read [Eng Plan](https://docs.google.com/document/d/1Cqxaw23PR2hc5bkbhXIDCnWjxA3AbfjsuB45ltWns4U/edit#).
TODO: Share the Doc with public. Consider formalizing and branding it.

## License

The content of this repository is licensed as [Apache 2.0](https://github.com/MystenLabs/fastnft/blob/update-readme/LICENSE).
# Sui Developer Portal

Welcome to Sui, a next generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the [Move](https://github.com/MystenLabs/awesome-move) programming language! Here are some suggested starting points:

* To jump right into building smart contract applications on top of Sui, go to [Move Quick Start](https://github.com/MystenLabs/fastnft/tree/main/doc/move.md).
* To experiment with a sample Sui wallet, check out [Wallet Quick Start](https://github.com/MystenLabs/fastnft/tree/main/doc/wallet.md).
<!---* To understand what's possible by browsing examples of full-fledged applications and games built on top of Sui, review the [Demos](TODO).--->
* To understand what's possible by browsing Move code built on top of Sui, review the [examples](https://github.com/MystenLabs/fastnft/tree/main/sui_programmability/examples/sources)
* To start coding against Sui's REST API's, start [here](https://app.swaggerhub.com/apis/arun-koshy/sui-api)
* To go deep on how Sui works, understand [Key Concepts](https://github.com/MystenLabs/fastnft/tree/main/doc/key-concepts.md).
* To learn what distinguishes Sui from other blockchain systems, see [What Makes Sui Different?](https://github.com/MystenLabs/fastnft/tree/main/doc/what-makes-sui-different.md).
<!---* To experience Sui's speed and scalability for yourself, try [Benchmarking](TODO).--->
<!---* To see the current status of the Sui software/network and preview what's coming next, read through our [Roadmap](TODO).--->

<!---TODO: Populate and link to the missing pages above or strike the links and references.--->

## Architecture

Sui is a distributed ledger that stores a collection of programmable *[objects](https://github.com/MystenLabs/fastnft/tree/main/doc/objects.md)*, each with a globally unique ID. Every object is owned by a single *address*, and each address can own an arbitrary number of objects.

The ledger is updated via a *[transaction](https://github.com/MystenLabs/fastnft/tree/main/doc/transactions.md)* sent by a particular address. A transaction can create, destroy, and write objects, as well as transfer them to other addresses.

Structurally, a transaction contains a set of input object references and a pointer to a Move code object that already exists in the ledger. Executing a transaction produces updates to the input objects and (if applicable) a set of freshly created objects along with their owners. A transaction whose sender is address *A* can accept objects owned by *A*, shared objects, and objects owned by other objects in the first two groups as input.

```mermaid
flowchart LR
CC(CLI Client) --> ClientService
RC(Rest Client) --> ClientService
RPCC(RPC Client) --> ClientService
ClientService --> AuthorityAggregator
AuthorityAggregator --> AC1[AuthorityClient] & AC2[AuthorityClient]
subgraph Authority1
AS[AuthorityState]
end
subgraph Authority2
AS2[AuthorityState]
end
AC1 <==>|Network TCP| Authority1
AC2 <==>|Network TCP| Authority2
```

Sui authorities agree on and execute transactions in parallel with high throughput using [Byzantine Consistent Broadcast](https://en.wikipedia.org/wiki/Byzantine_fault).

## Move quick start
See the [Move Quick Start](https://github.com/MystenLabs/fastnft/tree/main/doc/move.md) for installation, defining custom objects, object operations (create/destroy/update/transfer/freeze), publishing, and invoking your published code.
<!--- Then deeper: Sui standard library, design patterns, examples. --->

## Wallet quick start
See the [Wallet Quick Start](https://github.com/MystenLabs/fastnft/tree/main/doc/wallet.md) for installation, querying the chain, client setup, sending transfer transactions, and viewing the effects.
<!--- Then deeper: wallet CLI vs client service vs forwarder architecture, how to integrate your code (wallet, indexer, ...) with the client service or forwarder components. --->
87 changes: 0 additions & 87 deletions doc/SUMMARY.md

This file was deleted.

9 changes: 9 additions & 0 deletions doc/key-concepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Key Concepts
- [Authorities](authorities.md)
- [Objects](objects.md)
- [Programmability](programmability.md)
- [Transactions](transactions.md)
- TODO: clients
- TODO: state sync
- TODO: reconfiguration
- TODO governance, incentives, and rewards
17 changes: 17 additions & 0 deletions doc/what-makes-sui-different.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## What makes Sui different?

TODO: WIP

Here are Sui's key features:

- High throughput and low latency (enables low cost with fixed hardware)
- Causal order vs total order (enables massively parallel execution)
- Move and object-centric data model (enables composable objects/NFTs)

### Authorities vs Validators/Miners
An authority plays a role similar to "validators" or "miners" in other blockchain systems. The key distinction between these roles (and the reason we insist on using a separate term) is that validators/miners are *active*, whereas authorities are *passive*. Broadly speaking:
* Miners/validators continuously participate in a global consensus protocol that requires multiple rounds of all-to-all communication between the participants. The goal is typically to agree on a *totally ordered* block of transactions and the result of their execution.
* Authorities do nothing until they receive a transaction or certificate from a user. Upon receiving a transaction or certificate, an authority need not communicate with other authorities in order to take action and advance its internal state machine. It may wish to communicate with other authorities to share certificates but need not do so.

## Causal order vs Total order
Unlike most existing blockchain systems (and as the reader may have guessed from the description of write requests above), Sui does not impose a total order on the transactions submitted by clients. Instead, transactions are *causally* ordered--if a transaction `T1` produces output objects `O1` that are used as input objects in a transaction `T2`, an authority must execute `T1` before it executes `T2`. Note that `T2` need not use these objects directly for a causal relationship to exist--e.g., `T1` might produce output objects which are then used by `T3`, and `T2` might use `T3`'s output objects. However, transactions with no causal relationship can be processed by Sui authorities in any order.

0 comments on commit 36d2a7d

Please sign in to comment.