Skip to content

Commit

Permalink
fix: Address in-line comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wwared committed Jun 24, 2024
1 parent dad1612 commit b95404a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
3 changes: 3 additions & 0 deletions aptos/docs/src/benchmark/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ Due to the SNARK compression, the SNARK proofs take longer to generate and requi

The worst case latency (described [here](../design/edge_cases.md)) can be evaluated by running the end-to-end benchmark
for each of the two proofs, and looking at the maximum of the time it took to genereate each proof.

The numbers we've measured using our [production configuration](../run/overview.md) are present in the
[E2E Benchmarks](./e2e.md) section.
4 changes: 0 additions & 4 deletions aptos/docs/src/benchmark/proof.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ following:
This value can be found on the following line:

```shell
TODO FIXME
INFO summary: cycles=63736, e2e=2506, khz=25.43, proofSize=2.66 MiB
```

Expand All @@ -100,7 +99,6 @@ CPU in kHz, and the size of the proof generated.
In the output, you will find a section that looks like this:

```shell
TODO FIXME
DEBUG ┌╴read_inputs
DEBUG └╴9,553 cycles
DEBUG ┌╴verify_merkle_proof
Expand All @@ -115,7 +113,6 @@ The proving time is an output at the end of a benchmark in the shape of the foll
milliseconds:

```json
TODO FIXME
{
ratchet_proving_time: 100000,
merkle_proving_time: 100000
Expand All @@ -129,7 +126,6 @@ crate. They will output the same logs as the benchmarks, only the time necessary
to generate a proof will change shape:

```shell
TODO FIXME
Starting generation of Merkle inclusion proof with 18 siblings...
Proving locally
Proving took 5.358508094s
Expand Down
6 changes: 3 additions & 3 deletions aptos/docs/src/design/edge_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Latency-wise, the worst case scenario for the light client happens when a user w
epoch, meaning that we want to prove both the Epoch Change Proof and the Inclusion Proof at the same time.

A naïve approach would lead us to a total proving time being equal the sum of their respecting
time \\(D_{\text{total}} = D_{\text{epoch_change_proof}} + D_{\text{inclusion_proof}} \\).
time \\(D_{\text{total}} = D_{\text{epoch_change_proof}} + D_{\text{inclusion_proof}}\\).

However, because the validator set is identified by a hash that can be calculated quickly outside of the proof, we can
actually generate both proofs in parallel since there are no data dependencies between each proof.

Generating both proofs in parallel, we end up with a worst case latency of
\\(D_{\text{total}} = \max{\(D_{\text{epoch_change_proof}}, D_{\text{inclusion_proof}}\)}\\) which can be approximated by
\\(D_{\text{total}} = D_ {\text{sig_verification}} \\) as the majority of the proving time is dedicated to verifying the
\\(D_{\text{total}} = \max(D_{\text{epoch_change_proof}}, D_{\text{inclusion_proof}}\)\\) which can be approximated by
\\(D_{\text{total}} = D_{\text{sig_verification}}\\) as the majority of the proving time is dedicated to verifying the
BLS12-381 signatures used in the block header signatures.
6 changes: 5 additions & 1 deletion aptos/docs/src/run/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ Rust [here](https://www.rust-lang.org/tools/install) and for Golang [here](https
Make sure to install **nightly** Rust, which is necessary for AVX-512 acceleration:

```bash
rustup default nightly
rustup default nightly-2024-05-31
```

We pin the nightly Rust version to version `1.80.0-nightly (431db31d0 2024-05-28)` to prevent unknown future changes
to nightly from interfering with the build process. In principle however, any recent nightly release of Rust should
work.

Second, you need to install the `cargo-prove` binary.

1. Install `cargo-prove` from Sphinx:
Expand Down
4 changes: 2 additions & 2 deletions aptos/docs/src/run/setup_aptos_pfn.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ building the code source.
The relevant documentation concerning a Full Node deployment can be
found [on the Aptos website](https://aptos.dev/nodes/full-node/public-fullnode/).

First, clone the repository and `cd` into it:
First, clone the repository, `cd` into it and checkout the patched branch:

```bash
git clone [email protected]:lurk-lab/aptos-core.git && cd aptos-core
git clone [email protected]:lurk-lab/aptos-core.git && cd aptos-core && git checkout release/aptos-node-v1.14.0-patched
```

Then, we have some configuration to set up.
Expand Down
7 changes: 0 additions & 7 deletions aptos/proof-server/benches/proof_server.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
rewriting static
rewriting static
rewriting static
rewriting static
rewriting static
rewriting static
rewriting static
// Copyright (c) Yatima, Inc.
// SPDX-License-Identifier: BUSL-1.1

Expand Down

0 comments on commit b95404a

Please sign in to comment.