Skip to content

Commit df9fdce

Browse files
committed
Merge remote-tracking branch 'origin/main' into bohdan/p2p-create-node
2 parents 30a550b + 1ab5315 commit df9fdce

21 files changed

Lines changed: 4535 additions & 135 deletions

File tree

.githooks/pre-push

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
#!/bin/sh
2-
set -e
1+
#!/usr/bin/env bash
32

4-
# Dependency sorting
5-
if ! cargo sort --workspace --check; then
6-
echo "❌ Dependencies should be sorted (run 'cargo sort --workspace')"
7-
exit 1
8-
fi
3+
set -e
94

105
# Dependency audit
116
if ! cargo deny check; then
@@ -19,12 +14,6 @@ if ! cargo +nightly fmt --all -- --check; then
1914
exit 3
2015
fi
2116

22-
# Typo check
23-
if ! typos; then
24-
echo "❌ Spelling mistakes found (run 'typos --write-changes')"
25-
exit 4
26-
fi
27-
2817
# Linting
2918
if ! cargo clippy --all-targets --all-features -- -D warnings; then
3019
echo "❌ Clippy violations (check warnings above)"

CONTRIBUTING.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ git config commit.gpgsign true
1111
## Prerequisites
1212

1313
* [Rust](https://www.rust-lang.org/tools/install)
14+
* [Protobuf](https://protobuf.dev/installation/)
1415
* [cargo deny](https://github.com/EmbarkStudios/cargo-deny)
15-
* [typos](https://github.com/crate-ci/typos?tab=readme-ov-file#install)
16-
* [cargo sort](https://github.com/DevinR528/cargo-sort)
1716

1817
## Code quality assurance
1918

@@ -49,15 +48,15 @@ Criterion is still recommended for more rigorous statistical analysis, but Divan
4948
For performance, the profiling cycle is a 3-step process in which you need to first measure the resources consumed by your application, then isolate the most consuming ones, and finally optimize them.
5049
This cycle repeats until the performance goals are met.
5150
To carry out this optimization cycle, we recommend the following profiling tools, as they are powerful, general-purpose, and are either written or well integrated with Rust:
52-
* [Hyperfine](https://crates.io/crates/hyperfine): Provides a simple CLI interface that allows us to benchmark compiled binaries.
53-
* [Samply](https://crates.io/crates/samply): Generates a detailed graphic of the different operations and their time in the application. We recommend it over [FlameGraph](https://crates.io/crates/flamegraph) as it allows for filtering, and the webserver viewer provides a better experience than the `.svg` your get from Flamegraph.
51+
* [Hyperfine](https://crates.io/crates/hyperfine): Provides a simple CLI interface that allows us to benchmark compiled binaries.
52+
* [Samply](https://crates.io/crates/samply): Generates a detailed graphic of the different operations and their time in the application. We recommend it over [FlameGraph](https://crates.io/crates/flamegraph) as it allows for filtering, and the webserver viewer provides a better experience than the `.svg` your get from Flamegraph.
5453
* [Dhat](https://crates.io/crates/dhat): Measures memory allocations within the application.
5554

5655
### Hyperfine
5756

5857
Once [installed](https://github.com/sharkdp/hyperfine?tab=readme-ov-file#installation), we can simply run:
5958
```sh
60-
hyperfine 'TODO(template) update with your binary e.g. ./target/release/...'
59+
hyperfine 'TODO(template) update with your binary e.g. ./target/release/...'
6160
```
6261
### Samply
6362

@@ -84,7 +83,7 @@ Then, we can run:
8483
```sh
8584
samply record 'TODO(template) update with your binary e.g. ./target/release/...'
8685
```
87-
This command will open a browser page that contains a graphic representation of where the time is being spent in our application.
86+
This command will open a browser page that contains a graphic representation of where the time is being spent in our application.
8887

8988
### Dhat
9089
We can add Dhat as a dependency:
@@ -114,4 +113,4 @@ But these 3 should be enough for the average application to identify bottlenecks
114113

115114
For async-rust we also recommend: [Tracing](https://crates.io/crates/tracing), [Tokio-Console](https://crates.io/crates/tokio-console), and [Oha](https://crates.io/crates/oha).
116115
For Rayon-based parallel Rust code, we recommend Samply.
117-
It provides good profiling despite missing some multithreading details.
116+
It provides good profiling despite missing some multithreading details.

0 commit comments

Comments
 (0)