mirror of
https://github.com/serai-dex/serai.git
synced 2025-02-03 11:46:31 +00:00
Merge branch 'develop' into tendermint
This commit is contained in:
commit
e38a7e0f3c
9 changed files with 31 additions and 11 deletions
2
.github/nightly-version
vendored
2
.github/nightly-version
vendored
|
@ -1 +1 @@
|
|||
nightly-2022-10-01
|
||||
nightly-2022-11-01
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -89,7 +89,7 @@ impl Rpc {
|
|||
params: Option<Params>,
|
||||
) -> Result<Response, RpcError> {
|
||||
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<u8>,
|
||||
) -> Result<Response, RpcError> {
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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<u8> {
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -166,3 +166,5 @@ services:
|
|||
volumes:
|
||||
- "./coins/monero/scripts:/scripts"
|
||||
entrypoint: /scripts/entry-dev.sh
|
||||
ports:
|
||||
- "18081:18081"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue