Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rfc 321 #112

Merged
merged 27 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5513136
feat: add rfc 321
stringhandler Nov 20, 2023
0c90375
review suggestions
stringhandler Nov 21, 2023
17487d7
ci(fix): prevent code injection (#114)
leet4tari Dec 5, 2023
296f587
feat: layer 2 specification (#111)
CjS77 Dec 5, 2023
7d23333
chore: edits and numbering fix (#115)
CjS77 Dec 5, 2023
845e7e5
docs: update documentation for `ToRistrettoPoint` opcode (#113)
AaronFeickert Dec 6, 2023
9974547
feat: cerberus detail (#118)
CjS77 Dec 17, 2023
51e851a
chore: add epoch management to summary (#116)
CjS77 Dec 18, 2023
16c6f36
fix: remove old maintainers (#119)
CjS77 Dec 18, 2023
02b1354
feat: stablecoin draft specification (#107)
CjS77 Dec 19, 2023
830d543
fix: stablecoin rfc title (#120)
CjS77 Dec 19, 2023
50773a7
fix: typos and small fixes (#121)
AaronFeickert Dec 19, 2023
c6186a9
fix: upgrade mdbook (#123)
CjS77 Dec 19, 2023
ce7ce10
Upgrade mdbook (#124)
CjS77 Dec 19, 2023
56ac765
fix: upgrade mdbook-mermaid (#126)
CjS77 Dec 19, 2023
aa31b02
fix: remove old mermaid version (#125)
CjS77 Dec 19, 2023
9e59acc
fix: fix mermaid again (#127)
CjS77 Dec 19, 2023
8c3d10f
feat: update content for rfc-331 (#128)
CjS77 Dec 20, 2023
95e6881
feat: Tari logic layer
CjS77 Dec 19, 2023
33cd968
chore: update change log table in template
CjS77 Dec 20, 2023
73a0653
fix: make ci compatible with local build
CjS77 Dec 20, 2023
542c6b5
updates
stringhandler Dec 22, 2023
14fed39
feat: add rfc 321
stringhandler Nov 20, 2023
d8cf077
review suggestions
stringhandler Nov 21, 2023
3878378
updates
stringhandler Dec 22, 2023
13344f4
add to summary
stringhandler Dec 22, 2023
2add2da
Merge branch 'st-rfc-processing-foreign-proposals' of github.com:tari…
stringhandler Dec 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/pr_title.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
name: PR
on:

'on':
pull_request:
types:
- opened
Expand All @@ -16,5 +18,7 @@ jobs:
npm install -g @commitlint/cli @commitlint/config-conventional
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
- name: lint
env:
PR_TITLE: ${{github.event.pull_request.title}}
run: |
echo "${{github.event.pull_request.title}}" | commitlint
echo "$PR_TITLE" | commitlint
12 changes: 8 additions & 4 deletions .github/workflows/rfc_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@ jobs:

- name: Install 🦀
run: |
curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v0.10.0/mdbook-mermaid-v0.10.0-x86_64-unknown-linux-gnu.tar.gz | tar xvz
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.8/mdbook-v0.4.8-x86_64-unknown-linux-gnu.tar.gz | tar xvz
curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v0.13.0/mdbook-mermaid-v0.13.0-x86_64-unknown-linux-gnu.tar.gz | tar xvz
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar xvz
export PATH=$PATH:$(pwd)
mdbook --version
mdbook-mermaid --version

- name: Build 🛠
run: |
./mdbook test
./mdbook build
export PATH=$PATH:$(pwd)
mdbook test
mdbook build

- name: Deploy 🚀
uses: JamesIves/[email protected]
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/rfc_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ jobs:

- name: Install 🦀
run: |
curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v0.10.0/mdbook-mermaid-v0.10.0-x86_64-unknown-linux-gnu.tar.gz | tar xvz
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.8/mdbook-v0.4.8-x86_64-unknown-linux-gnu.tar.gz | tar xvz
curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v0.13.0/mdbook-mermaid-v0.13.0-x86_64-unknown-linux-gnu.tar.gz | tar xvz
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.36/mdbook-v0.4.36-x86_64-unknown-linux-gnu.tar.gz | tar xvz
export PATH=$PATH:$(pwd)
mdbook --version
mdbook-mermaid --version

- name: Test 🧪
run: |
./mdbook test
./mdbook build
export PATH=$PATH:$(pwd)
mdbook test
mdbook build
4 changes: 2 additions & 2 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ description = "The Tari network RFC library and documentation"
[build]
build-dir = "./book"
create-missing = false
preprocess = ["links", "index"]
#preprocess = ["links", "index"]

[output.html]
mathjax-support=true
theme = "src/theme"
additional-js = ["mermaid.min.js", "mermaid-init.js"]
additional-js = []

[output.html.playpen]
editable = false
Expand Down
4 changes: 0 additions & 4 deletions mermaid-init.js

This file was deleted.

4 changes: 0 additions & 4 deletions mermaid.min.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/RFC-0111_BaseNodeArchitecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Cayle Sharrock](https://github.com/CjS77), [Philip Robinson](https://github.com/philipr-za), [Jorge Antonio](https://github.com/jorgeantonio21)
**Maintainer(s)**: [Cayle Sharrock](https://github.com/CjS77)

# Licence

Expand Down
2 changes: 1 addition & 1 deletion src/RFC-0131_Mining.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Hansie Odendaal](https://github.com/hansieodendaal), [Philip Robinson](https://github.com/philipr-za)
**Maintainer(s)**: [Hansie Odendaal](https://github.com/hansieodendaal)

# Licence

Expand Down
2 changes: 1 addition & 1 deletion src/RFC-0140_Syncing_and_seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [S W van Heerden](https://github.com/SWvheerden), [Philip Robinson](https://github.com/philipr-za)
**Maintainer(s)**: [S W van Heerden](https://github.com/SWvheerden)

# Licence

Expand Down
4 changes: 2 additions & 2 deletions src/RFC-0150_Wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Yuko Roodt](https://github.com/neonknight64), [Cayle Sharrock](https://github.com/CjS77)
**Maintainer(s)**: [Cayle Sharrock](https://github.com/CjS77)


<!-- TOC -->
Expand Down Expand Up @@ -168,4 +168,4 @@ An output is recognized if it matches either of the following input script patte
| Date | Change | Author |
|:------------|:-------------------------------------------------------------------------------|:--------------------------|
| 26 Oct 2022 | Stabilized RFC | CjS77 |
| 14 Nov 2022 | Added table of contents, recovery process overview and a few minor adjustments | agubarev & hansieodendaal |
| 14 Nov 2022 | Added table of contents, recovery process overview and a few minor adjustments | agubarev & hansieodendaal |
4 changes: 2 additions & 2 deletions src/RFC-0153_StagedWalletSecurity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Yuko Roodt](https://github.com/neonknight64), [Cayle Sharrock](https://github.com/CjS77)
**Maintainer(s)**: [Cayle Sharrock](https://github.com/CjS77)

# Licence

Expand Down Expand Up @@ -258,4 +258,4 @@ To avoid spamming the user, do not fire this prompt more than once every three d
|:-----------|:---------------------|:--------------------|
| 2022-11-10 | Initial stable | Adrian Truszczyński |
| 2022-12-12 | Update user messages | CjS77 |
| 2022-12-20 | Fix typo | CjS77 |
| 2022-12-20 | Fix typo | CjS77 |
2 changes: 1 addition & 1 deletion src/RFC-0160_BlockSerialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Byron Hambly](https://github.com/delta1)
**Maintainer(s)**: [Stanley Bondi](https://github.com/sdbondi)

# Licence

Expand Down
2 changes: 1 addition & 1 deletion src/RFC-0170_NetworkCommunicationProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Yuko Roodt](https://github.com/neonknight64)
**Maintainer(s)**: [Stringhandler](https://github.com/stringhandler)

# License

Expand Down
4 changes: 2 additions & 2 deletions src/RFC-0172_PeerToPeerMessagingProtocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Stanley Bondi](https://github.com/sdbondi), [Cayle Sharrock](https://github.com/CjS77), [Yuko Roodt](https://github.com/neonknight64), [Stringhandler](https://github.com/stringhandler)
**Maintainer(s)**: [Stanley Bondi](https://github.com/sdbondi), [Cayle Sharrock](https://github.com/CjS77), [Stringhandler](https://github.com/stringhandler)

# Licence

Expand Down Expand Up @@ -510,4 +510,4 @@ discarded and not propagated further.
[Noise Protocol]: http://www.noiseprotocol.org/
[yamux]: https://github.com/hashicorp/yamux/blob/master/spec.md
[kademlia]: https://www.scs.stanford.edu/~dm/home/papers/kpos.pdf
[Ristretto]: https://ristretto.group/
[Ristretto]: https://ristretto.group/
4 changes: 2 additions & 2 deletions src/RFC-0173_Versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Philip Robinson](https://github.com/philipr-za)
**Maintainer(s)**: [Stringhandler](https://github.com/stringhandler)

# Licence

Expand Down Expand Up @@ -150,4 +150,4 @@ in the header are valid for that block's height.

| Date | Change | Author |
|:------------|:--------------|:-------|
| 26 Oct 2022 | Stabilise RFC | CjS77 |
| 26 Oct 2022 | Stabilise RFC | CjS77 |
2 changes: 1 addition & 1 deletion src/RFC-0190_Mempool.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RFC-0190/Mempool
![status: updated](theme/images/status-stable.svg)
**Maintainer(s)**: [Stanley Bondi](https://github.com/sdbondi), [SW van Heerden](https://github.com/SWvheerden) and [Yuko Roodt](https://github.com/neonknight64)
**Maintainer(s)**: [Stanley Bondi](https://github.com/sdbondi), [SW van Heerden](https://github.com/SWvheerden)

## The Mempool for Unconfirmed Transactions on the Tari Base Layer

Expand Down
4 changes: 2 additions & 2 deletions src/RFC-0201_TariScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ Thanks to David Burkett for proposing a method to prevent cut-through and willin
| 04 Jun 2021 | Remove beta range-proof calculation | SWvheerden |
| 22 Jun 2021 | Change script_signature type to ComSig | hansieodendaal |
| 30 Jun 2021 | Clarify Tari Script nomenclature | hansieodendaal |
| 06 Oct 2022 | Minor improvemnts in legibility | stringhandler |
| 06 Oct 2022 | Minor improvements in legibility | stringhandler |
| 11 Nov 2022 | Update ComAndPubSig and move out examples | stringhandler |
| 22 Nov 2022 | Added `metadata_signature` and `script_signature` math | hansieodendaal |
| 06 Apr 2023 | Grammar and spelling changes | SWvheerden |
Expand All @@ -738,4 +738,4 @@ Thanks to David Burkett for proposing a method to prevent cut-through and willin
[script offset]: Glossary.md#script-offset
[m-of-n script]: RFC-0202_TariScriptOpcodes.md#checkmultisigverifyaggregatepubkeym-n-public-keys-msg
[NoOp script]: RFC-0202_TariScriptOpcodes.md#noop
[Mimblewimble]: Glossary.md#mimblewimble
[Mimblewimble]: Glossary.md#mimblewimble
12 changes: 6 additions & 6 deletions src/RFC-0202_TariScriptOpcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,12 @@ pushed to the stack if multiple signature validation succeeds.
In addition to the failures mentioned:
* Fails with `VerifyFailed` if any signature is invalid.

##### ToRistrettoPoint,
##### ToRistrettoPoint
Pops the top element from the stack (either a scalar or a hash), parses it canonically as a Ristretto secret key if possible, computes the corresponding Ristretto public key, and pushes this value to the stack.

Pops the top element from the stack, either a scalar or a hash, calculates the corresponding Ristretto point,
and pushes the result to the stack.

* Fails with `StackUnderflow` if the stack is empty.
* Fails with `IncompatibleTypes` if the stack item is not a valid 32 byte sequence.
* Fails with `StackUnderflow` if the stack is empty.
* Fails with `IncompatibleTypes` if the stack item is not either a scalar or a hash.
* Fails with `InvalidInput` if the stack item cannot be canonically parsed as a Ristretto secret key.

### Miscellaneous

Expand Down Expand Up @@ -653,5 +652,6 @@ and contributions to this RFC.
| 27 Sep 2022 | Add aggregate signatures to transaction inputs and outputs | hansieodendaal |
| 28 Sep 2022 | Minor update to reflect implementation | sdbondi |
| 11 Nov 2022 | Update for code review/audit | hansieodendaal |
| 20 Nov 2023 | Update `ToRistrettoPoint` documentation | AaronFeickert |

[TariScript]: Glossary.md#tariscript
4 changes: 2 additions & 2 deletions src/RFC-0203_StealthAddresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [Philip Robinson](https://github.com/philipr-za)
**Maintainer(s)**: [Stringhandler](https://github.com/stringhandler)

# Licence

Expand Down Expand Up @@ -125,4 +125,4 @@ one-time private key \\( c + a \\).
| Date | Change | Author |
|:------------|:-----------------------------|:----------|
| 01 Jun 2022 | First draft | philip-za |
| 26 Oct 2022 | Stabilise RFC | CjS77 |
| 26 Oct 2022 | Stabilise RFC | CjS77 |
2 changes: 1 addition & 1 deletion src/RFC-0230_HTLC.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![status: stable](theme/images/status-stable.svg)

**Maintainer(s)**: [S W van Heerden](https://github.com/SWvheerden) and [Philip Robinson](https://github.com/philipr-za)
**Maintainer(s)**: [S W van Heerden](https://github.com/SWvheerden)

# Licence

Expand Down
24 changes: 14 additions & 10 deletions src/RFC-0303_DanOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,26 @@ outweighs this trade-off.

## Key actors

There are several components on both the DAN and base layer that interoperate to collectively enable scalable
smart contracts on Tari.
There are several components on both the Tari Digital Assets Network (DAN) and base layer that interoperate to
collectively enable scalable smart contracts on Tari.

These components include:
* Tari base layer - Enforces Tari monetary policy and plays the role of global registrar.
* Minotari base layer - Enforces Tari monetary policy and plays the role of global registrar.
* Templates - Reusable smart contract components.
* Contracts - Self-contained pieces of code that describe the behaviour of a smart contract. They are compiled and
executed in the Tari VM.
* Validator Nodes - VNs validate smart contracts and earn fees for doing so.
* Cerberus consensus engine - highly scalable, high-speed sharded BFT consensus engine.
* Tari Virtual Machine - Runs smart contracts in a secure sandbox.
* Tari - the token that fuels the Tari DAN.
* Tari - the token that fuels the Tari Network a.k.a DAN.

The remainder of this document describes these elements in a little more detail and how they relate to each other.

## The Tari Base Layer
## The Minotari Base Layer

Obviously, the most important role of the Minotari base layer (formerly, Tari base layer) is to issue and secure the
base Tari token.

Obviously, the most important role of the Tari base layer is to issue and secure the base Tari token.
As it relates to the DAN, the base layer also serves as an immutable global registry for several key pieces of data:
* It maintains the register of all validator nodes.
* It provides the only means of minting more [Tari] into the DAN economy.
Expand All @@ -111,7 +113,7 @@ smart contracts. Templates will also have version control features and a smooth

### Contracts

Tari smart contracts are the meat of the DAN ecosystem. Usually a smart contract will be comprised of one or more
Tari smart contracts are the meat of the Tari ecosystem. Usually, a smart contract will be comprised of one or more
Tari templates, glue code, and initialisation code.

The contracts are always executed in the Tari Virtual machines. The input and output of every contract instruction
Expand All @@ -138,8 +140,8 @@ Validator nodes must be able to
Steps 1 - 3 are carried out in the Tari Virtual Machine (TVM).
Step 4 is achieved by communicating with peers via the DAN consensus layer.

[Tari](#tari-and-the-turbine-model) exist at the Validator node level, and VNs earn fees, in Tari, for each
instruction that it aids in getting finalised.
[Tari](#tari-and-the-turbine-model) exists at the Validator node level, and VNs earn fees, in Tari, for each
instruction -- in aggregate -- that it aids in getting finalised.

### DAN consensus layer

Expand All @@ -155,6 +157,7 @@ In particular, the consensus layer has _no idea_ whether an instruction's output
of the committee agree on the results, then consensus has been reached and the consensus layer is happy.

For example, if consensus decides that 2 + 2 = 5, then for the purposes of this contract, that is the case.

### The Tari Virtual Machine

The TVM is a WASM-based virtual machine designed to run Tari contracts.
Expand All @@ -165,7 +168,8 @@ The TVM is able to
* load a contract.
* provide a list of methods that the contract exposes.
* Execute calls on the contract.
* Persist and restore the state of the contract.
* Initiate retrieval and persistence of the state of the contract. The state itself is not stored in the VM, but by
Indexers.

### Tari and the turbine model

Expand Down
Loading
Loading