Skip to content

Commit

Permalink
docs: add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
GCdePaula committed Dec 21, 2023
1 parent 0c8e516 commit efab3dd
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 4 deletions.
77 changes: 76 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
# Dave

A fraud-proof system.
Dave is a permissionless, interactive fraud-proof system. This repo contains the Dave software suite, including support for both rollups and compute (_i.e._ a one-shot computation, like a rollup without inputs):

* Solidity smart contracts;
* offchain testing node in Lua;
* offchain reference node in Rust;
* dispute algorithm specification.


## Running Dave

To run the Lua node, follow the instructions [here](permissionless-arbitration/lua_node/README.md).


## What's in a name

Our fraud-proof system is called _Dave_.
Just Dave.
It's neither an acronym nor an abbreviation, but a name.
Like most names, it should be written in lower case with an initial capital, that is, "Dave".

Dave is permissionless.
This means anyone can participate in the consensus.
Since anyone can participate, there's the possibility of Sybil attacks, where an attacker can generate an army of fake personas and try to shift the consensus to their favour.

Dave's security is one of N: a single honest validator can enforce the correct result.
It doesn't matter if it's you against the world.
If you're honest, Dave's got your back; you can fight a mountain of powerful, well-funded crooks and win, using a single laptop in a timely manner.

Dave is named after the David vs. Goliath archetype.


## Execution Environment

Dave uses the [Cartesi machine](https://github.com/cartesi/machine-emulator) as its execution environment.
The Cartesi machine is a RISC-V emulator.
Its onchain implementation can be found [here](https://github.com/cartesi/machine-solidity-step).
The Cartesi Machine state-transition function is implemented in two layers: the big-machine and the micro-architecture.
The former implements the RV64GC ISA, while the later implements the much smaller RV64IM ISA.
Using a technique called _machine swapping_ and leveraging good compilers, we implement in Solidity only the micro-architecture's state-transition function, while the execution environment can support a much larger set of extensions.

Nevertheless, Dave was designed to be agnostic on its execution environment.
As long as one can provide a self-contained state-transition function, Dave will work.


## Algorithm

Dave is based over the Permissionless Refereed Tournaments primitive.
The paper can be found [here](https://arxiv.org/abs/2212.12439).
The maximum delay grows logarithmically on the number of Sybils, whereas the computation resources and stakes are constant, and don't grow on the number of Sybils.


## Status

The project is still in its prototyping stages.



## Contributing

Thank you for your interest in Cartesi!
Head over to our [Contributing Guidelines](CONTRIBUTING.md) for instructions on how to sign our Contributors Agreement and get started with Cartesi!

Please note we have a [Code of Conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.

## License

The repository and all contributions are licensed under [APACHE 2.0](https://www.apache.org/licenses/LICENSE-2.0).
Please review our [LICENSE](LICENSE) file.

---

<div align="center">
<a href="https://cartesi.io"><img alt="Dave" src="doc/assets/dave-img.jpeg" width=600></a>
<br />
<h3><a href="https://github.com/cartesi/dave">Dave</a>.</h3>
</div>
Binary file added doc/assets/dave-img.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
2 changes: 1 addition & 1 deletion permissionless-arbitration/lua_node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cartesi/machine-emulator:main
FROM cartesi/machine-emulator:0.15.2

USER 0
RUN apt-get -y update; apt-get -y install curl git; apt-get install -y procps
Expand Down
9 changes: 7 additions & 2 deletions permissionless-arbitration/lua_node/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Permissionless Arbitration (NxN) Lua prototype Node
# Dave Lua node

The Lua node is used for testing and prototyping only.

## Run example

You need a docker installation to run the Dave Lua node.
From the path `permissionless-arbitration/lua_node`, run the following command:

```
docker build -t nxn_playground:latest -f Dockerfile ../../ && docker run --rm nxn_playground:latest
docker build -t dave:latest -f Dockerfile ../../ && docker run --rm dave:latest
```

0 comments on commit efab3dd

Please sign in to comment.