mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
chore: updated all repo references to codeberg
This commit is contained in:
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Anonymous. Uncensored. Sovereign."
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ To build the necessary binaries, we can just clone the repo, and use
|
||||
the provided Makefile to build the project:
|
||||
|
||||
```shell
|
||||
% git clone https://github.com/darkrenaissance/darkfi
|
||||
% git clone https://codeberg.org/darkrenaissance/darkfi
|
||||
% cd darkfi
|
||||
% make
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Proxy server for DarkFi/Monero merge mining"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "DarkFi node daemon"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[lib]
|
||||
name = "darkirc"
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "DHT daemon"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Command-line client for darkfid"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[dependencies]
|
||||
darkfi = {path = "../../../", features = ["util", "rpc"]}
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[dependencies]
|
||||
darkfi = {path = "../../../", features = ["async-daemonize", "geode", "rpc"]}
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[dependencies]
|
||||
genevd = {path = "../genevd"}
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[lib]
|
||||
name = "genevd"
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[dependencies]
|
||||
darkfi = {path = "../../", features = ["toml", "async-daemonize", "net", "rpc"]}
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Darkfi mining daemon"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2.155"
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[lib]
|
||||
name = "taud"
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Vanity address generation tool for DarkFi keypairs, contract IDs, and token IDs"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Compiler for the Halo2 zkVM language used in DarkFi."
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ def main(path):
|
||||
print(f"### `{i[0]}`\n")
|
||||
print(f"{i[1]}")
|
||||
ghlink = "%s%s%s%d" % (
|
||||
"https://github.com/darkrenaissance/darkfi/blob/master/",
|
||||
"https://codeberg.org/darkrenaissance/darkfi/src/branch/master/",
|
||||
path.replace("../", ""),
|
||||
"#L",
|
||||
i[4],
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
Available code files:
|
||||
|
||||
* [fft2.sage](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/fft/fft2.sage):
|
||||
* [fft2.sage](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/fft/fft2.sage):
|
||||
implementation using vandermonde matrices illustrating the theory section below.
|
||||
* [fft3.sage](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/fft/fft3.sage):
|
||||
* [fft3.sage](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/fft/fft3.sage):
|
||||
simple example with $n = 4$ showing 3 steps of the algorithm.
|
||||
* [fft4.sage](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/fft/fft4.sage):
|
||||
* [fft4.sage](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/fft/fft4.sage):
|
||||
illustrates the full working algorithm.
|
||||
|
||||
## Theory
|
||||
@@ -98,7 +98,7 @@ $$
|
||||
|
||||
### Algorithm
|
||||
|
||||
Implementation of this algorithm is available in [fft4.sage](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/fft/fft4.sage).
|
||||
Implementation of this algorithm is available in [fft4.sage](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/fft/fft4.sage).
|
||||
Particularly the function called `calc_dft()`.
|
||||
|
||||
**function** DFT($n = 2^d, f(X)$)<br>
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
# Research
|
||||
|
||||
DarkFi maintains a public resource of zero-knowledge and math research
|
||||
in the [script/research](https://github.com/darkrenaissance/darkfi/tree/master/script/research) directory of
|
||||
in the [script/research](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research) directory of
|
||||
the repo.
|
||||
|
||||
It features simple sage implementations of zero-knowledge algorithms
|
||||
and math primitives, including but not limited to:
|
||||
|
||||
* [ZK](https://github.com/darkrenaissance/darkfi/tree/master/script/research/zk)
|
||||
* [bootle16](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/bootle16.py)
|
||||
* [ZK](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk)
|
||||
* [bootle16](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/bootle16.py)
|
||||
(precursor to sonic)
|
||||
* [sonic](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/sonic.sage)
|
||||
* [plonk](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/plonk.sage)
|
||||
* [halo1](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/halo1.sage) and
|
||||
[halo2](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/halo2.sage)
|
||||
* [curve trees](https://github.com/darkrenaissance/darkfi/blob/master/script/research/zk/curve_tree.sage)
|
||||
* [FFT](https://github.com/darkrenaissance/darkfi/tree/master/script/research/zk/fft)
|
||||
* [groth16](https://github.com/darkrenaissance/darkfi/tree/master/script/research/zk/groth16)
|
||||
* [bulletproofs](https://github.com/darkrenaissance/darkfi/tree/master/script/research/zk/bltprf)
|
||||
* [Poseidon hash](https://github.com/darkrenaissance/darkfi/tree/master/script/research/poseidon)
|
||||
* [x3dh](https://github.com/darkrenaissance/darkfi/tree/master/script/research/x3dh)
|
||||
* [sonic](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/sonic.sage)
|
||||
* [plonk](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/plonk.sage)
|
||||
* [halo1](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/halo1.sage) and
|
||||
[halo2](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/halo2.sage)
|
||||
* [curve trees](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/curve_tree.sage)
|
||||
* [FFT](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/fft)
|
||||
* [groth16](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/groth16)
|
||||
* [bulletproofs](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/zk/bltprf)
|
||||
* [Poseidon hash](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/poseidon)
|
||||
* [x3dh](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/x3dh)
|
||||
double ratchet algorithm used in signal.
|
||||
* [Various EC math](https://github.com/darkrenaissance/darkfi/tree/master/script/research/ec)
|
||||
* [Various EC math](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/ec)
|
||||
such as valuations, riemann-roch basis, hyperelliptic curves, divisor reduction.
|
||||
|
||||
@@ -79,7 +79,7 @@ or need to be maintained:
|
||||
* Also document zkrunner and other tools.
|
||||
* **Tests:** Throughout the project there are either broken or commented out unit tests, they need to be fixed.
|
||||
* **Cleanup:** General code cleanup. for example flattening headers and improving things like in
|
||||
[this commit](https://github.com/darkrenaissance/darkfi/commit/9cd9c3113eed1b5f0bcad2ee449ef926d0908d55).
|
||||
[this commit](https://codeberg.org/darkrenaissance/darkfi/commit/9cd9c3113eed1b5f0bcad2ee449ef926d0908d55).
|
||||
* **Python bindings:** Help ensure wider coverage and cleanup the Python bindings in `src/sdk/python/`.
|
||||
* The event graph could have Python bindings but involves some tricky part integrating Python and Rust async.
|
||||
* Bindings for txs, calls and so on. Make a tool in Python for working with various contract params.
|
||||
@@ -222,7 +222,7 @@ This process will run infinitely until a crash occurs or until it is cancelled b
|
||||
|
||||
If you are able to trigger a crash, get in touch with the DarkFi team via irc.
|
||||
|
||||
Further information on fuzzing in DarkFi is available [here](https://github.com/darkrenaissance/darkfi/blob/master/fuzz/README.md).
|
||||
Further information on fuzzing in DarkFi is available [here](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/fuzz/README.md).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ nightly, and we also have to compile `sqlcipher` on our own.
|
||||
And now we should be able to build a statically linked binary:
|
||||
|
||||
```
|
||||
# git clone https://github.com/darkrenaissance/darkfi -b master --depth 1
|
||||
# git clone https://codeberg.org/darkrenaissance/darkfi -b master --depth 1
|
||||
# cd darkfi
|
||||
## Uncomment RUSTFLAGS in the main Makefile
|
||||
# sed -e 's,^#RUSTFLAGS ,RUSTFLAGS ,' -i Makefile
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* Pedersen commitment: a hiding and binding commitment scheme that takes a value and produces an elliptic curve point representing the commitment
|
||||
* [Explainer](https://medium.com/coinmonks/zero-knowledge-proofs-um-what-a092f0ee9f28)
|
||||
* zkas: the programming language in which you can write zk circuits
|
||||
* [zkas compiler](https://github.com/darkrenaissance/darkfi/tree/ae9801fce10c1403ac293303b75a15db115b4da6/src/zkas)
|
||||
* [An example circuit written in zkas](https://github.com/darkrenaissance/darkfi/blob/ae9801fce10c1403ac293303b75a15db115b4da6/example/simple.zk)
|
||||
* [zkas compiler](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/zkas)
|
||||
* [An example circuit written in zkas](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/example/simple.zk)
|
||||
* zkvm: the virtual machine in which zkas circuit binary is run
|
||||
* it runs during proof generation
|
||||
* [Rust example](https://github.com/darkrenaissance/darkfi/blob/ae9801fce10c1403ac293303b75a15db115b4da6/tests/zkvm_opcodes.rs)
|
||||
* [Python example](https://github.com/darkrenaissance/darkfi/blob/ae9801fce10c1403ac293303b75a15db115b4da6/bin/zkrunner/zkrunner.py#L141-L160)
|
||||
* [Rust example](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/tests/zkvm_opcodes.rs)
|
||||
* [Python example](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/bin/zkrunner/zkrunner.py#L141-L160)
|
||||
* zkrunner: a Python script which allows you, instead of providing circuit, witness, public inputs and code to generate/verify proof, you provide circuit, witness
|
||||
* [Example](https://github.com/darkrenaissance/darkfi/blob/master/bin/zkrunner/zkrunner.py#L180)
|
||||
* [Example](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/bin/zkrunner/zkrunner.py#L180)
|
||||
|
||||
@@ -8,20 +8,20 @@ are automatically activated when nodes connect to eachother on the
|
||||
p2p network. Here are examples of two protocols that every node runs
|
||||
continuously in the background:
|
||||
|
||||
* [ProtocolPing](https://github.com/darkrenaissance/darkfi/blob/master/src/net/protocol/protocol_ping.rs):
|
||||
* [ProtocolPing](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/protocol/protocol_ping.rs):
|
||||
sends `ping`, receives `pong`
|
||||
* [ProtocolAddress](https://github.com/darkrenaissance/darkfi/blob/master/src/net/protocol/protocol_address.rs):
|
||||
* [ProtocolAddress](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/protocol/protocol_address.rs):
|
||||
receives a `get_address` message, sends an `address` message
|
||||
|
||||
Under the hood, these protocols have a few similarities:
|
||||
|
||||
* They create a subscription to a message type, such as `ping` and `pong`.
|
||||
* They implement [ProtocolBase](https://github.com/darkrenaissance/darkfi/blob/master/src/net/protocol/protocol_base.rs),
|
||||
* They implement [ProtocolBase](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/protocol/protocol_base.rs),
|
||||
DarkFi's generic protocol trait.
|
||||
* They run asynchronously using the
|
||||
[ProtocolJobsManager](https://github.com/darkrenaissance/darkfi/blob/master/src/net/protocol/protocol_jobs_manager.rs).
|
||||
* They hold a pointer to [Channel](https://github.com/darkrenaissance/darkfi/blob/master/src/net/channel.rs) which
|
||||
invokes the [MessageSubsystem](https://github.com/darkrenaissance/darkfi/blob/master/src/net/message_subscriber.rs#L170).
|
||||
[ProtocolJobsManager](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/protocol/protocol_jobs_manager.rs).
|
||||
* They hold a pointer to [Channel](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/channel.rs) which
|
||||
invokes the [MessageSubsystem](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/message_subscriber.rs#L170).
|
||||
|
||||
This introduces several generic interfaces that we must use to build
|
||||
our custom protocol. In particular:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Handling RPC requests
|
||||
|
||||
Let's connect `dchatd` up to `JSON-RPC` using DarkFi's [rpc
|
||||
module](https://github.com/darkrenaissance/darkfi/tree/master/src/rpc).
|
||||
module](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/rpc).
|
||||
|
||||
We'll need to implement a trait called `RequestHandler` for our `Dchat`
|
||||
struct. `RequestHandler` is an async trait implementing a handler for
|
||||
@@ -14,7 +14,7 @@ handle for processing incoming JSON-RPC requests that takes a
|
||||
`JsonRequest` and returns a `JsonResult`. `JsonRequest` is a
|
||||
`JSON-RPC` request object, and `JsonResult` is an enum that wraps
|
||||
around a given `JSON-RPC` object type. These types are defined inside
|
||||
[jsonrpc.rs](https://github.com/darkrenaissance/darkfi/blob/master/src/rpc/jsonrpc.rs).
|
||||
[jsonrpc.rs](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/rpc/jsonrpc.rs).
|
||||
|
||||
We'll use `handle_request` to run a match statement on
|
||||
`JsonRequest.method`.
|
||||
|
||||
@@ -99,7 +99,7 @@ and calls `stop` on them, safely closing each `JSON-RPC` connection.
|
||||
Notice that when we start the `StoppableTask` using
|
||||
`rpc.task.clone().start`, we also pass a method called `listen_and_serve`.
|
||||
`listen_and_serve` is a method defined in DarkFi's [rpc
|
||||
module](https://github.com/darkrenaissance/darkfi/tree/master/src/rpc/server.rs).
|
||||
module](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/rpc/server.rs).
|
||||
It starts a JSON-RPC server that is bound to the provided accept address
|
||||
and uses our previously implemented `RequestHandler` to handle incoming
|
||||
requests.
|
||||
|
||||
@@ -15,4 +15,4 @@ the p2p network, in particular:
|
||||
* Creating and subscribing to a custom `Message` type.
|
||||
|
||||
The source code for this tutorial can be found at
|
||||
[example/dchat](https://github.com/darkrenaissance/darkfi/tree/master/example/dchat).
|
||||
[example/dchat](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/example/dchat).
|
||||
|
||||
@@ -6,7 +6,7 @@ network. An inbound node receives connections. An outbound node makes
|
||||
connections.
|
||||
|
||||
The behavior of these nodes is defined in what is called a
|
||||
[Session](https://github.com/darkrenaissance/darkfi/blob/master/src/net/session/mod.rs#L111).
|
||||
[Session](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/session/mod.rs#L111).
|
||||
There are four types of sessions: `Manual`, `Inbound`, `Outbound` and `SeedSync`.
|
||||
|
||||
There behavior is as follows:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
To create an inbound and outbound node, we
|
||||
will need to configure them using `net` type called
|
||||
[Settings](https://github.com/darkrenaissance/darkfi/blob/master/src/net/settings.rs).
|
||||
[Settings](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/settings.rs).
|
||||
This type consists of several settings that allow you to configure nodes
|
||||
in different ways.
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Let's take a quick look at the underlying p2p methods we're using here.
|
||||
|
||||
## Start
|
||||
|
||||
This is [start](https://github.com/darkrenaissance/darkfi/blob/master/src/net/p2p.rs#L126):
|
||||
This is [start](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/p2p.rs#L126):
|
||||
|
||||
```rust
|
||||
/// Starts inbound, outbound, and manual sessions.
|
||||
@@ -105,7 +105,7 @@ have any connected channels, `run` performs a `SeedSync`.
|
||||
|
||||
## Stop
|
||||
|
||||
This is [stop](https://github.com/darkrenaissance/darkfi/blob/master/src/net/p2p.rs#L164).
|
||||
This is [stop](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/net/p2p.rs#L164).
|
||||
|
||||
```rust
|
||||
/// Stop the running P2P subsystem
|
||||
|
||||
@@ -5,7 +5,7 @@ run the p2p network, we'll need to implement our own daemon. So we'll
|
||||
start building `dchat` by creating a daemon that we call `dchatd`.
|
||||
|
||||
To do this, we'll make use of a DarkFi macro called
|
||||
[async_daemonize](https://github.com/darkrenaissance/darkfi/blob/0aba4e7864d459301a6c5afd8bda6a3d9f240b86/src/util/cli.rs).
|
||||
[async_daemonize](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/util/cli.rs).
|
||||
|
||||
`async_daemonize`is the standard way of daemonizing darkfi binaries. It
|
||||
implements TOML config file configuration, argument parsing and a
|
||||
|
||||
@@ -27,7 +27,7 @@ Follow the instructions in the
|
||||
you have all the necessary dependencies.
|
||||
|
||||
```shell
|
||||
% git clone https://github.com/darkrenaissance/darkfi
|
||||
% git clone https://codeberg.org/darkrenaissance/darkfi
|
||||
% cd darkfi
|
||||
% make darkirc
|
||||
% # install system wide only if you can make sure there would be no
|
||||
@@ -278,4 +278,4 @@ Install the `noto` fonts to have the full unicode set. Popular Linux distros
|
||||
should have packages for them.
|
||||
|
||||
Once installed you can view all the emojis in your terminal. Note, you may need
|
||||
to regenerate your font cache (or just restart) after installing them.
|
||||
to regenerate your font cache (or just restart) after installing them.
|
||||
|
||||
@@ -11,7 +11,7 @@ dnetview displays:
|
||||
## Install
|
||||
|
||||
```shell
|
||||
% git clone https://github.com/darkrenaissance/darkfi
|
||||
% git clone https://codeberg.org/darkrenaissance/darkfi
|
||||
% cd darkfi
|
||||
% make BINS=dnetview
|
||||
```
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Tau
|
||||
|
||||
Encrypted tasks management app using peer-to-peer network.
|
||||
Encrypted tasks management app using peer-to-peer network.
|
||||
Multiple users can collaborate by working on the same tasks,
|
||||
and all users will have synced tasks.
|
||||
|
||||
@@ -8,7 +8,7 @@ and all users will have synced tasks.
|
||||
## Install
|
||||
|
||||
```shell
|
||||
% git clone https://github.com/darkrenaissance/darkfi
|
||||
% git clone https://codeberg.org/darkrenaissance/darkfi
|
||||
% cd darkfi
|
||||
% make BINS="taud"
|
||||
```
|
||||
|
||||
@@ -183,6 +183,6 @@ in `Burn_V1`.
|
||||
For `MoneyFunction::TransferV1`, we have the following functions, in
|
||||
order:
|
||||
|
||||
* [`money_transfer_get_metadata_v1`](https://github.com/darkrenaissance/darkfi/blob/master/src/contract/money/src/entrypoint/transfer_v1.rs#L42)
|
||||
* [`money_transfer_process_instruction_v1`](https://github.com/darkrenaissance/darkfi/blob/master/src/contract/money/src/entrypoint/transfer_v1.rs#L106)
|
||||
* [`money_transfer_process_update_v1`](https://github.com/darkrenaissance/darkfi/blob/master/src/contract/money/src/entrypoint/transfer_v1.rs#L258)
|
||||
* [`money_transfer_get_metadata_v1`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/contract/money/src/entrypoint/transfer_v1.rs#L42)
|
||||
* [`money_transfer_process_instruction_v1`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/contract/money/src/entrypoint/transfer_v1.rs#L106)
|
||||
* [`money_transfer_process_update_v1`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/contract/money/src/entrypoint/transfer_v1.rs#L258)
|
||||
|
||||
@@ -24,7 +24,7 @@ DarkFi broadly follows the standardized unix directory structure.
|
||||
## Using DarkFi
|
||||
|
||||
Refer to the main
|
||||
[README](https://github.com/darkrenaissance/darkfi/blob/master/README.md)
|
||||
[README](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/README.md)
|
||||
file for instructions on how to install Rust and necessary deps.
|
||||
|
||||
Then proceed to the [Running a Node](testnet/node.md) guide.
|
||||
|
||||
@@ -10,7 +10,7 @@ To run darkfi, we must first install the software. Do this by cloning
|
||||
the darkfi repo:
|
||||
|
||||
```
|
||||
% git clone https://github.com/darkrenaissance/darkfi
|
||||
% git clone https://codeberg.org/darkrenaissance/darkfi
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
@@ -33,7 +33,7 @@ From an end user perspective, they provide a dpath and get a value back.
|
||||
|
||||
```
|
||||
provide: darkrenaissance::darkfi::v0_4_1
|
||||
get: 0766e910aae7af482885d0a5b05ccb61ae7c1af4 (which is the commit for Darkfi v0.4.1, https://github.com/darkrenaissance/darkfi/commit/0766e910aae7af482885d0a5b05ccb61ae7c1af4)
|
||||
get: 0766e910aae7af482885d0a5b05ccb61ae7c1af4 (which is the commit for Darkfi v0.4.1, https://codeberg.org/darkrenaissance/darkfi/commit/0766e910aae7af482885d0a5b05ccb61ae7c1af4)
|
||||
```
|
||||
|
||||
### Syntax
|
||||
@@ -119,7 +119,7 @@ FIXME: perhaps more detailed explanation
|
||||
Currently, the infrastructure for deploying non-native contracts is being worked on.
|
||||
So Darkmap was tested by modifiying the darkfi validator to deploy it as native contract.
|
||||
|
||||
If you like to try it out, take a look at the [pull request draft](https://github.com/darkrenaissance/darkfi/pull/170/files#diff-1592d061816d5a4da17e089758e15df75ae1ab963b2288e6d84b8f29b06f7d4f).
|
||||
If you like to try it out, take a look at the [pull request draft](https://codeberg.org/darkrenaissance/darkfi/pulls/170/files#diff-1592d061816d5a4da17e089758e15df75ae1ab963b2288e6d84b8f29b06f7d4f).
|
||||
|
||||
In particular:
|
||||
* `src/consensus/validator.rs`
|
||||
@@ -133,7 +133,7 @@ For now, the best place to learn is learn from the darkmap pull request draft or
|
||||
|
||||
* Where are the states stored?
|
||||
* What are the host-provided functions you can call from within the contract?
|
||||
* https://github.com/darkrenaissance/darkfi/tree/98a78098bc1db02e5c1c571be5bcfd6359809a99/src/runtime/import
|
||||
* https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/runtime/import
|
||||
* What are the tools?
|
||||
* zkas
|
||||
* zkvm
|
||||
|
||||
@@ -41,7 +41,7 @@ TBD
|
||||
```
|
||||
|
||||
Integers in the binary are encoded using variable-integer encoding.
|
||||
See the [`serial`](https://github.com/darkrenaissance/darkfi/blob/master/src/serial/src/lib.rs)
|
||||
See the [`serial`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/serial/src/lib.rs)
|
||||
crate and module for our Rust implementation.
|
||||
|
||||
## Sections
|
||||
@@ -210,5 +210,5 @@ TBD
|
||||
## Decoding the bincode
|
||||
|
||||
An example decoder implementation can be found in zkas'
|
||||
[`decoder.rs`](https://github.com/darkrenaissance/darkfi/blob/master/src/zkas/decoder.rs)
|
||||
[`decoder.rs`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/zkas/decoder.rs)
|
||||
module.
|
||||
|
||||
@@ -2,16 +2,16 @@ zkas
|
||||
====
|
||||
|
||||
zkas is a compiler for the Halo2 zkVM language used in
|
||||
[DarkFi](https://github.com/darkrenaissance/darkfi).
|
||||
[DarkFi](https://codeberg.org/darkrenaissance/darkfi).
|
||||
|
||||
The current implementation found in the DarkFi repository inside
|
||||
[`src/zkas`](https://github.com/darkrenaissance/darkfi/tree/master/src/zkas)
|
||||
[`src/zkas`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/zkas)
|
||||
is the reference compiler and language implementation. It is a
|
||||
toolchain consisting of a lexer, parser, static and semantic analyzers,
|
||||
and a binary code compiler.
|
||||
|
||||
The
|
||||
[`main.rs`](https://github.com/darkrenaissance/darkfi/blob/master/bin/zkas/src/main.rs)
|
||||
[`main.rs`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/bin/zkas/src/main.rs)
|
||||
file shows how this toolchain is put together to produce binary code
|
||||
from source code.
|
||||
|
||||
@@ -19,7 +19,7 @@ from source code.
|
||||
|
||||
The main part of the compilation happens inside the parser. New opcodes
|
||||
can be added by extending
|
||||
[`opcode.rs`](https://github.com/darkrenaissance/darkfi/blob/master/src/zkas/opcode.rs).
|
||||
[`opcode.rs`](https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/zkas/opcode.rs).
|
||||
|
||||
```rust
|
||||
{{#include ../../../bin/zkas/src/main.rs:zkas}}
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Simple chat app p2p daemon used to document DarkFi networking code"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "p2pdebug"
|
||||
version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
- Reward and value:
|
||||
HE is already used to validate minted_coin_value = burnt_coin_value + reward using their value commitments, so no need to constrain it.
|
||||
Code block: https://github.com/darkrenaissance/darkfi/blob/master/src/contract/consensus/src/entrypoint/proposal_reward_v1.rs#L135-L143
|
||||
Code block: https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/contract/consensus/src/entrypoint/proposal_reward_v1.rs#L135-L143
|
||||
|
||||
- Headstart:
|
||||
Constrain headstart in reward proof and validators calculate it ad-hoc to verify it.
|
||||
@@ -30,5 +30,5 @@
|
||||
|
||||
- Lottery seed:
|
||||
Minted coin serial to be derived from burnt coin serial: minted_serial = poseidon_hash(NONCE_PREFIX, secret_key, burnt_coin_serial, ZERRO).
|
||||
Deterministic function code block: https://github.com/darkrenaissance/darkfi/blob/master/src/consensus/lead_coin.rs#L231-L240
|
||||
Deterministic function code block: https://codeberg.org/darkrenaissance/darkfi/src/branch/master/src/consensus/lead_coin.rs#L231-L240
|
||||
Use burnt coin serial to calculate lottery seed in proof: seed = poseidon_hash(SEED_PREFIX, burnt_serial, ZERO);
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "blockchain-explorer"
|
||||
version = "0.4.1"
|
||||
description = "Daemon to listen for new blocks from darkfid and store them in an easily accessible format for further usage."
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -39,5 +39,5 @@
|
||||
[^9]: https://arxiv.org/pdf/2112.04581.pdf
|
||||
[^10]: https://eprint.iacr.org/2021/1530
|
||||
[^11]: https://github.com/renegade-fi/mpc-bulletproof/pull/14
|
||||
[^12]: https://github.com/darkrenaissance/darkfi/tree/master/script/research/mpc
|
||||
[^13]: https://github.com/darkrenaissance/darkfi/tree/master/script/research/bulletproof-mpc
|
||||
[^12]: https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/mpc
|
||||
[^13]: https://codeberg.org/darkrenaissance/darkfi/src/branch/master/script/research/bulletproof-mpc
|
||||
|
||||
@@ -28,7 +28,7 @@ excluding use of floats, and division, only +,-,* are allowed.
|
||||
|
||||
# comparison of original target to approximation
|
||||
|
||||

|
||||

|
||||
|
||||
# consequences
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Genesis Generator, a command-line utility to generate,\
|
||||
display and verify a base64 encoded Darkfi genesis block\
|
||||
"""
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -16,17 +16,17 @@ with $k_1 = k_p + K_i + K_d$, $k_2 = -K_p -2K_d$, $k_3 = K_d$, and e is the er
|
||||
# simulation criterion
|
||||
find $K_p$, $k_i$, $K_d$ for highest accuracy running the simulation on N trials, of random number of nodes, starting with random airdrop (that all sum to total network stake), running for random runing time.
|
||||
|
||||

|
||||

|
||||
|
||||
notice that best parameters are spread out in the search space, picking the highest of which, and running the simulation, running for 600 slots, result in with >36% accuracy
|
||||
|
||||

|
||||

|
||||
|
||||
# comparing range of target values between
|
||||
|
||||
notice below that both y,T in the pallas field, and simulation have same range.
|
||||
|
||||

|
||||

|
||||
|
||||
# conclusion
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ The probability of a pool of N% stake to win the leadership at any slot is:
|
||||
\end{align*}
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
## Example
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ name = "pallas_constants"
|
||||
version = "0.4.1"
|
||||
description = "Command-line tool to generate pallas::Base constants"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "SDK used for developing smart contracts on DarkFi"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ edition = "2021"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
license = "AGPL-3.0-only"
|
||||
homepage = "https://dark.fi"
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
|
||||
[lib]
|
||||
name = "darkfi_sdk"
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "DarkFi serialization library"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Internal crate for serialization derive macros"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.4.1"
|
||||
homepage = "https://dark.fi"
|
||||
description = "Crate for serialization derive macros"
|
||||
authors = ["Dyne.org foundation <foundation@dyne.org>"]
|
||||
repository = "https://github.com/darkrenaissance/darkfi"
|
||||
repository = "https://codeberg.org/darkrenaissance/darkfi"
|
||||
license = "AGPL-3.0-only"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user