diff --git a/.github/nightly-version b/.github/nightly-version index 3b012ca6..6dc33dd9 100644 --- a/.github/nightly-version +++ b/.github/nightly-version @@ -1 +1 @@ -nightly-2022-10-01 +nightly-2022-11-01 diff --git a/README.md b/README.md index 81655c14..972ad95f 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Bitcoin, Ethereum, Monero, DAI, and USDC, offering a liquidity pool trading experience. Funds are stored in an economically secured threshold multisig wallet. +[Getting Started](docs/Getting%20Started.md) + ### Layout - `docs`: Documentation on the Serai protocol. diff --git a/coins/monero/src/rpc.rs b/coins/monero/src/rpc.rs index af80a581..d3851f84 100644 --- a/coins/monero/src/rpc.rs +++ b/coins/monero/src/rpc.rs @@ -89,7 +89,7 @@ impl Rpc { params: Option, ) -> Result { let client = reqwest::Client::new(); - let mut builder = client.post(&(self.0.clone() + "/" + method)); + let mut builder = client.post(self.0.clone() + "/" + method); if let Some(params) = params.as_ref() { builder = builder.json(params); } @@ -104,7 +104,7 @@ impl Rpc { params: Vec, ) -> Result { let client = reqwest::Client::new(); - let builder = client.post(&(self.0.clone() + "/" + method)).body(params); + let builder = client.post(self.0.clone() + "/" + method).body(params); self.call_tail(method, builder.header("Content-Type", "application/octet-stream")).await } diff --git a/crypto/ciphersuite/src/ed448.rs b/crypto/ciphersuite/src/ed448.rs index d5075b9e..43b88ef3 100644 --- a/crypto/ciphersuite/src/ed448.rs +++ b/crypto/ciphersuite/src/ed448.rs @@ -62,6 +62,6 @@ impl Ciphersuite for Ed448 { } fn hash_to_F(dst: &[u8], data: &[u8]) -> Self::F { - Scalar::wide_reduce(Self::H::digest(&[dst, data].concat()).as_ref().try_into().unwrap()) + Scalar::wide_reduce(Self::H::digest([dst, data].concat()).as_ref().try_into().unwrap()) } } diff --git a/crypto/frost/src/curve/ed448.rs b/crypto/frost/src/curve/ed448.rs index e6035048..05877dbe 100644 --- a/crypto/frost/src/curve/ed448.rs +++ b/crypto/frost/src/curve/ed448.rs @@ -21,7 +21,7 @@ impl Ietf8032Ed448Hram { pub fn hram(context: &[u8], R: &Point, A: &Point, m: &[u8]) -> Scalar { Scalar::wide_reduce( Shake256_114::digest( - &[ + [ &[b"SigEd448".as_ref(), &[0, u8::try_from(context.len()).unwrap()]].concat(), context, &[R.to_bytes().as_ref(), A.to_bytes().as_ref(), m].concat(), diff --git a/crypto/frost/src/curve/mod.rs b/crypto/frost/src/curve/mod.rs index a8bf4ad1..8fbdd4b8 100644 --- a/crypto/frost/src/curve/mod.rs +++ b/crypto/frost/src/curve/mod.rs @@ -41,7 +41,7 @@ pub trait Curve: Ciphersuite { /// Hash the given dst and data to a byte vector. Used to instantiate H4 and H5. fn hash_to_vec(dst: &[u8], data: &[u8]) -> Vec { - Self::H::digest(&[Self::CONTEXT, dst, data].concat()).as_ref().to_vec() + Self::H::digest([Self::CONTEXT, dst, data].concat()).as_ref().to_vec() } /// Field element from hash. Used during key gen and by other crates under Serai as a general diff --git a/deploy/coins/monero/scripts/entry-dev.sh b/deploy/coins/monero/scripts/entry-dev.sh index 2625e26d..67684be1 100755 --- a/deploy/coins/monero/scripts/entry-dev.sh +++ b/deploy/coins/monero/scripts/entry-dev.sh @@ -5,10 +5,10 @@ RPC_PASS="${RPC_PASS:=seraidex}" BLOCK_TIME=${BLOCK_TIME:=5} # Run Monero -monerod --regtest --rpc-login ${RPC_USER}:${RPC_PASS} \ ---rpc-access-control-origins * --confirm-external-bind \ +# TODO: Restore Auth +monerod --regtest --rpc-access-control-origins * --confirm-external-bind \ --rpc-bind-ip=0.0.0.0 --offline --fixed-difficulty=1 \ ---non-interactive --mining-threads 1 --bg-mining-enable --detach +--non-interactive --mining-threads 1 --detach # give time to monerod to start while true; do diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index ff371db3..6f1e4855 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -166,3 +166,5 @@ services: volumes: - "./coins/monero/scripts:/scripts" entrypoint: /scripts/entry-dev.sh + ports: + - "18081:18081" diff --git a/docs/Getting Started.md b/docs/Getting Started.md index 2f8d6ba7..bf88a84c 100644 --- a/docs/Getting Started.md +++ b/docs/Getting Started.md @@ -1,11 +1,11 @@ # Getting Started - +## Run Serai Node Locally ### System Dependencies ##### Ubuntu ``` -sudo apt-get install -y build-essential cmake clang-11 git curl python3-pip protobuf-compiler +sudo apt-get install -y build-essential cmake clang-11 git curl python3-pip protobuf-compiler libssl-dev pkg-config ``` ### Install rustup @@ -38,6 +38,14 @@ solc-select install 0.8.16 solc-select use 0.8.16 ``` +### Install Solidity Compiler Version Manager + +``` +cargo install svm-rs +svm install 0.8.16 +svm use 0.8.16 +``` + ### Install foundry and anvil (for tests) ``` @@ -65,3 +73,11 @@ cargo test --all-features ``` ./target/release/serai-node --dev ``` + +## Run Serai with Orchestration + +In the deploy directory, you can find our orchestration components for running the entire infrastructure of Serai in a local environment using Docker Compose or Kubernetes. + +[Run Serai with Docker Compose](../deploy/README.md) + +[Run Serai with Kubernetes](../deploy/kubernetes/README.md)