From 4101239e0d9d0ac5e01f0ef7685ad45d22575dd4 Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 11:10:13 -0500 Subject: [PATCH 1/8] add deps to make setup easier --- docs/Getting Started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Getting Started.md b/docs/Getting Started.md index 2f8d6ba7..6261423d 100644 --- a/docs/Getting Started.md +++ b/docs/Getting Started.md @@ -5,7 +5,7 @@ ##### 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 From 8a20d908682f87196ad34ecc1bdd11ebf0b1fa2c Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 11:32:27 -0500 Subject: [PATCH 2/8] Add links to other options for running Serai. --- docs/Getting Started.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/Getting Started.md b/docs/Getting Started.md index 6261423d..41afbae3 100644 --- a/docs/Getting Started.md +++ b/docs/Getting Started.md @@ -1,5 +1,5 @@ # Getting Started - +## Run Serai Node Locally ### System Dependencies ##### Ubuntu @@ -65,3 +65,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) From 1a4f2d562177400142f9f25db98f5ce9254d92b9 Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 11:34:53 -0500 Subject: [PATCH 3/8] Add getting started link to main readme. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 81655c14..1e1f4313 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. From 0fc336941cabd1375956c148182f01a1f44c73f9 Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 11:35:21 -0500 Subject: [PATCH 4/8] Add getting started link to main readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1e1f4313..972ad95f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ 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) +[Getting Started](docs/Getting%20Started.md) ### Layout From 659ff280ac1a5958556c11b450f6214908bc847f Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 12:52:29 -0500 Subject: [PATCH 5/8] expose monero rpc port from docker --- deploy/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) 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" From 16c51ce37433ac8dd99e3d4b937881773656c668 Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 15:50:28 -0500 Subject: [PATCH 6/8] Add svm-rs dependency to getting started. --- docs/Getting Started.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/Getting Started.md b/docs/Getting Started.md index 41afbae3..bf88a84c 100644 --- a/docs/Getting Started.md +++ b/docs/Getting Started.md @@ -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) ``` From 5df74ac9e28f9299e674e98d08e64c99c34e579c Mon Sep 17 00:00:00 2001 From: TheArchitect108 Date: Mon, 31 Oct 2022 17:03:23 -0500 Subject: [PATCH 7/8] Temporarily strip auth from monerod rpc for tests. --- deploy/coins/monero/scripts/entry-dev.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 8e535227805298b95b16b1a5fe3c586ccc33bb3a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 00:03:36 -0500 Subject: [PATCH 8/8] November 2022 - Rust Nightly Update (#144) * Update nightly * Have the latest nightly clippy pass Co-authored-by: GitHub Actions <> Co-authored-by: Luke Parker --- .github/nightly-version | 2 +- coins/monero/src/rpc.rs | 4 ++-- crypto/ciphersuite/src/ed448.rs | 2 +- crypto/frost/src/curve/ed448.rs | 2 +- crypto/frost/src/curve/mod.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) 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/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