mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 16:53:21 +08:00
Merge pull request #4599 from jbencin/chore/release-lite-profile
chore: Add `release-lite` profile for low-RAM environments
This commit is contained in:
@@ -37,3 +37,9 @@ opt-level = 3
|
||||
debug = true
|
||||
codegen-units = 1
|
||||
lto = "fat"
|
||||
|
||||
# Release build with less LTO
|
||||
# Useful for faster builds or low-RAM environments
|
||||
[profile.release-lite]
|
||||
inherits = "release"
|
||||
lto = "thin"
|
||||
|
||||
32
README.md
32
README.md
@@ -11,8 +11,8 @@ Reference implementation of the [Stacks blockchain](https://github.com/stacks-ne
|
||||
Stacks is a layer-2 blockchain that uses Bitcoin as a base layer for security and enables decentralized apps and predictable smart contracts using the [Clarity language](https://clarity-lang.org/). Stacks implements [Proof of Transfer (PoX)](https://community.stacks.org/pox) mining that anchors to Bitcoin security. Leader election happens at the Bitcoin blockchain and Stacks (STX) miners write new blocks on the separate Stacks blockchain. With PoX there is no need to modify Bitcoin to enable smart contracts and decentralized apps.
|
||||
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
[](https://github.com/stacks-network/stacks-blockchain/releases/latest)
|
||||
[](https://github.com/stacks-network/stacks-blockchain/actions/workflows/ci.yml?query=event%3Aworkflow_dispatch+branch%3Amaster)
|
||||
[](https://github.com/stacks-network/stacks-core/releases/latest)
|
||||
[](https://github.com/stacks-network/stacks-core/actions/workflows/ci.yml?query=event%3Aworkflow_dispatch+branch%3Amaster)
|
||||
[](https://stacks.chat)
|
||||
|
||||
## Building
|
||||
@@ -22,28 +22,31 @@ Stacks is a layer-2 blockchain that uses Bitcoin as a base layer for security an
|
||||
_For building on Windows, follow the rustup installer instructions at https://rustup.rs/._
|
||||
|
||||
```bash
|
||||
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
$ source $HOME/.cargo/env
|
||||
$ rustup component add rustfmt
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
source $HOME/.cargo/env
|
||||
rustup component add rustfmt
|
||||
```
|
||||
|
||||
- When building the [`master`](https://github.com/stacks-network/stacks-blockchain/tree/master) branch, ensure you are using the latest stable release:
|
||||
- When building the [`master`](https://github.com/stacks-network/stacks-core/tree/master) branch, ensure you are using the latest stable release:
|
||||
|
||||
```bash
|
||||
$ rustup update
|
||||
rustup update
|
||||
```
|
||||
|
||||
### 2. Clone the source repository:
|
||||
|
||||
```bash
|
||||
$ git clone --depth=1 https://github.com/stacks-network/stacks-blockchain.git
|
||||
$ cd stacks-blockchain
|
||||
git clone --depth=1 https://github.com/stacks-network/stacks-core.git
|
||||
cd stacks-core
|
||||
```
|
||||
|
||||
### 3. Build the project
|
||||
|
||||
```bash
|
||||
$ cargo build
|
||||
# Fully optimized release build
|
||||
cargo build --release
|
||||
# Faster but less optimized build. Necessary if < 16 GB RAM
|
||||
cargo build --profile release-lite
|
||||
```
|
||||
|
||||
## Testing
|
||||
@@ -51,14 +54,15 @@ $ cargo build
|
||||
**Run the tests:**
|
||||
|
||||
```bash
|
||||
$ cargo test testnet -- --test-threads=1
|
||||
cargo test testnet -- --test-threads=1
|
||||
```
|
||||
|
||||
**Run all unit tests in parallel using [nextest](https://nexte.st/):**
|
||||
|
||||
_Warning, this typically takes a few minutes_
|
||||
|
||||
```bash
|
||||
$ cargo nextest run
|
||||
cargo nextest run
|
||||
```
|
||||
|
||||
## Run the testnet
|
||||
@@ -66,8 +70,8 @@ $ cargo nextest run
|
||||
You can observe the state machine in action locally by running:
|
||||
|
||||
```bash
|
||||
$ cd testnet/stacks-node
|
||||
$ cargo run --bin stacks-node -- start --config ./conf/testnet-follower-conf.toml
|
||||
cd testnet/stacks-node
|
||||
cargo run --bin stacks-node -- start --config ./conf/testnet-follower-conf.toml
|
||||
```
|
||||
|
||||
_On Windows, many tests will fail if the line endings aren't `LF`. Please ensure that you are have git's `core.autocrlf` set to `input` when you clone the repository to avoid any potential issues. This is due to the Clarity language currently being sensitive to line endings._
|
||||
|
||||
Reference in New Issue
Block a user