You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sudo apt install protobuf-compiler libprotobuf-dev #Required for gRPC
26
26
```
@@ -36,16 +36,16 @@ The default branch of this repository is `master` and new contributions are cons
36
36
llvm python3-clang
37
37
```
38
38
3. Install the [rust toolchain](https://rustup.rs/)
39
-
40
-
If you already have rust installed, update it by running: `rustup update`
39
+
40
+
If you already have rust installed, update it by running: `rustup update`
41
41
4. Install wasm-pack
42
42
```bash
43
43
cargo install wasm-pack
44
44
```
45
45
4. Install wasm32 target
46
46
```bash
47
47
rustup target add wasm32-unknown-unknown
48
-
```
48
+
```
49
49
5. Clone the repo
50
50
```bash
51
51
git clone https://github.com/kaspanet/rusty-kaspa
@@ -55,52 +55,52 @@ The default branch of this repository is `master` and new contributions are cons
55
55
56
56
57
57
58
-
<details>
58
+
<details>
59
59
<summary>Building on Windows</summary>
60
60
61
61
62
62
1. [Install Git for Windows](https://gitforwindows.org/) or an alternative Git distribution.
63
63
64
64
2. Install [Protocol Buffers](https://github.com/protocolbuffers/protobuf/releases/download/v21.10/protoc-21.10-win64.zip) and add the `bin` directory to your `Path`
Add the `bin` directory of the LLVM installation (`C:\Program Files\LLVM\bin`) to PATH
70
-
70
+
71
71
set`LIBCLANG_PATH` environment variable to point to the `bin` directory as well
72
72
73
73
**IMPORTANT:** Due to C++ dependency configuration issues, LLVM `AR` installation on Windows may not functioncorrectly when switching between WASM and native C++ code compilation (native `RocksDB+secp256k1` vs WASM32 builds of `secp256k1`). Unfortunately, manually setting `AR` environment variable also confuses C++ build toolchain (it should not be setfor native but should be setfor WASM32 targets). Currently, the best way to address this, is as follows: after installing LLVM on Windows, go to the target `bin` installation directory and copy or rename `LLVM_AR.exe` to `AR.exe`.
74
-
74
+
75
75
4. Install the [rust toolchain](https://rustup.rs/)
76
-
77
-
If you already have rust installed, update it by running: `rustup update`
76
+
77
+
If you already have rust installed, update it by running: `rustup update`
78
78
5. Install wasm-pack
79
79
```bash
80
80
cargo install wasm-pack
81
81
```
82
82
6. Install wasm32 target
83
83
```bash
84
84
rustup target add wasm32-unknown-unknown
85
-
```
85
+
```
86
86
7. Clone the repo
87
87
```bash
88
88
git clone https://github.com/kaspanet/rusty-kaspa
89
89
cd rusty-kaspa
90
90
```
91
-
</details>
91
+
</details>
92
92
93
93
94
-
<details>
94
+
<details>
95
95
<summary>Building on Mac OS</summary>
96
96
97
97
98
98
1. Install Protobuf (required for gRPC)
99
99
```bash
100
100
brew install protobuf
101
101
```
102
-
2. Install llvm.
103
-
102
+
2. Install llvm.
103
+
104
104
The default XCode installation of `llvm` does not support WASM build targets.
105
105
To build WASM on MacOS you need to install `llvm` from homebrew (at the time of writing, the llvm version for MacOS is 16.0.1).
106
106
```bash
@@ -133,23 +133,23 @@ To build WASM on MacOS you need to install `llvm` from homebrew (at the time of
133
133
source~/.zshrc
134
134
```
135
135
3. Install the [rust toolchain](https://rustup.rs/)
136
-
137
-
If you already have rust installed, update it by running: `rustup update`
136
+
137
+
If you already have rust installed, update it by running: `rustup update`
138
138
4. Install wasm-pack
139
139
```bash
140
140
cargo install wasm-pack
141
141
```
142
142
4. Install wasm32 target
143
143
```bash
144
144
rustup target add wasm32-unknown-unknown
145
-
```
145
+
```
146
146
5. Clone the repo
147
147
```bash
148
148
git clone https://github.com/kaspanet/rusty-kaspa
149
149
cd rusty-kaspa
150
150
```
151
151
152
-
</details>
152
+
</details>
153
153
154
154
<details>
155
155
@@ -184,7 +184,8 @@ To build WASM on MacOS you need to install `llvm` from homebrew (at the time of
184
184
<summary>
185
185
Kaspa CLI + Wallet
186
186
</summary>
187
-
`kaspa-cli` crate provides cli-driven RPC interface to the node and a
187
+
188
+
`kaspa-cli` crate provides a cli-driven RPC interface to the node and a
188
189
terminal interface to the Rusty Kaspa Wallet runtime. These wallets are
189
190
compatible with WASM SDK Wallet API and Kaspa NG projects.
cargo run --release --bin kaspad -- -C /path/to/configfile.toml
251
252
```
252
-
- The config file should be a list of \<CLI argument\> = \<value\> separated by newlines.
253
+
- The config file should be a list of \<CLI argument\> = \<value\> separated by newlines.
253
254
- Whitespace around the `=` is fine, `arg=value` and `arg = value` are both parsed correctly.
254
255
- Values with special characters like `.` or `=` will require quoting the value i.e \<CLI argument\> = "\<value\>".
255
256
- Arguments with multiple values should be surrounded with brackets like `addpeer = ["10.0.0.1", "1.2.3.4"]`.
@@ -297,17 +298,17 @@ wRPC
297
298
**Sidenote:**
298
299
299
300
Rusty Kaspa integrates an optional wRPC
300
-
subsystem. wRPC is a high-performance, platform-neutral, Rust-centric, WebSocket-framed RPC
301
+
subsystem. wRPC is a high-performance, platform-neutral, Rust-centric, WebSocket-framed RPC
301
302
implementation that can use [Borsh](https://borsh.io/) and JSON protocol encoding.
302
303
303
-
JSON protocol messaging
304
-
is similar to JSON-RPC 1.0, but differs from the specification due to server-side
304
+
JSON protocol messaging
305
+
is similar to JSON-RPC 1.0, but differs from the specification due to server-side
305
306
notifications.
306
307
307
308
[Borsh](https://borsh.io/) encoding is meant for inter-process communication. When using [Borsh](https://borsh.io/)
308
-
both client and server should be built from the same codebase.
309
+
both client and server should be built from the same codebase.
309
310
310
-
JSON protocol is based on
311
+
JSON protocol is based on
311
312
Kaspa data structures and is data-structure-version agnostic. You can connect to the
312
313
JSON endpoint using any WebSocket library. Built-in RPC clients for JavaScript and
313
314
TypeScript capable of running in web browsers and Node.js are available as a part of
@@ -316,27 +317,21 @@ wRPC
316
317
</details>
317
318
318
319
319
-
320
-
<details>
321
-
322
-
323
320
## Benchmarking & Testing
324
321
325
322
326
-
<details>
323
+
<details>
327
324
328
325
<summary>Simulation framework (Simpa)</summary>
329
326
330
-
Logging in `kaspad` and `simpa` can be [filtered](https://docs.rs/env_logger/0.10.0/env_logger/#filtering-results) by either:
331
-
332
-
The current codebase supports a full in-process network simulation, building an actual DAG over virtual time with virtual delay and benchmarking validation time (following the simulation generation).
327
+
The current codebase supports a full in-process network simulation, building an actual DAG over virtual time with virtual delay and benchmarking validation time (following the simulation generation).
333
328
334
329
To see the available commands
335
-
```bash
330
+
```bash
336
331
cargo run --release --bin simpa -- --help
337
-
```
332
+
```
338
333
339
-
The following command will run a simulation to produce 1000 blocks with communication delay of 2 seconds and 8 BPS (blocks per second) while attempting to fill each block with up to 200 transactions.
334
+
The following command will run a simulation to produce 1000 blocks with communication delay of 2 seconds and 8 BPS (blocks per second) while attempting to fill each block with up to 200 transactions.
340
335
341
336
```bash
342
337
cargo run --release --bin simpa -- -t=200 -d=2 -b=8 -n=1000
0 commit comments