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
contribute-nearcore: add info on ROCKSDB_LIB_DIR and other minor updates (#1076)
Most notably, add a section about compiling while using rocksdb
library provided by the system. Based on my observation, this helps
with OOMs. I think (though I haven’t tested it) that rust-rocksdb
builds rocksdb library with LTO enabled which consumes bunch of
memory.
While at it, make some minor fixes to the document. Change ‘bash’
preformatted blocks to ‘console’ where the latter is more appropriate
and remove mention of `start_localnet.py` script which no longer
exists.
Also add `env` to replace `time VAR=foo command` since the latter only
works with some shells which provide `time` built-in. Using `env` to
set the environment variables makes it more portable.
Copy file name to clipboardExpand all lines: docs/community/contribute/nearcore.md
+71-33
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,8 @@ cd nearcore
38
38
Navigate to the root of the repository, and run:
39
39
40
40
```bash
41
-
cargo run --package neard --bin neard -- init
42
-
cargo run --package neard --bin neard -- run
41
+
cargo run -p neard -- init
42
+
cargo run -p neard -- run
43
43
```
44
44
45
45
This will setup a local chain with `init` and will run the node.
@@ -63,10 +63,11 @@ If you are using CLion IDE you can configure it to run rustfmt automatically eve
63
63
64
64
## Testing {#testing}
65
65
66
-
To run NEARCore node in the testing mode, for example to test it or for development of `near-api-js` or `near-cli` you can use scripts that sets up special tests-only local testnet:
66
+
To run NEARCore node in the testing mode, for example to test it or for development of `near-api-js` or `near-cli` you can use commands that sets up special tests-only local testnet:
67
67
68
68
```bash
69
-
./scripts/start_localnet.py
69
+
cargo run -p neard -- localnet -v1
70
+
cargo run -p neard -- run
70
71
```
71
72
72
73
This sets up a new single node testnet, with predetermined private key of the validator and turns on "fast" mode of block production to make development and testing easy.
@@ -76,7 +77,7 @@ This sets up a new single node testnet, with predetermined private key of the va
76
77
Many times in development of the node it's useful to see detailed logs about what is happening. `neard` binary has `--verbose` mode to show more details about what is happening:
77
78
78
79
```bash
79
-
cargo run --package neard --bin neard -- --verbose=true run
80
+
cargo run -p neard -- --verbose= run
80
81
```
81
82
82
83
You can also use the `RUST_LOG` environment variable, with `env_logger`[semantics](https://docs.rs/env_logger/0.6.0/env_logger/#enabling-logging) to override the log level for specific targets. `RUST_LOG` can also be used in integration tests which spawn runnable apps.
@@ -115,7 +116,7 @@ Official image is published at `nearprotocol/nearcore`
### Setting for building release binary with debug symbols and reduced inlining {#setting-for-building-release-binary-with-debug-symbols-and-reduced-inlining}
0 commit comments