Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: test targets #3378

Open
wants to merge 2 commits into
base: mainnet-staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
957 changes: 371 additions & 586 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ version = "=0.1.24"
default-features = false

[workspace.dependencies.snarkvm]
#path = "../snarkVM"
git = "https://github.com/AleoNet/snarkVM.git"
rev = "be171ce" # If this is updated, the rev in `node/rest/Cargo.toml` must be updated as well.
git = "https://github.com/joske/snarkVM.git"
branch = "feat/test-targets"
# rev = "be171ce" # If this is updated, the rev in `node/rest/Cargo.toml` must be updated as well.
#version = "=0.16.18"
features = [ "circuit", "console", "rocks" ]

Expand All @@ -58,6 +58,7 @@ path = "snarkos/main.rs"
[features]
metrics = [ "snarkos-node-metrics", "snarkos-node/metrics" ]
history = [ "snarkos-node/history" ]
test_targets = [ "snarkos-cli/test_targets" ]

[dependencies.anyhow]
version = "1.0.79"
Expand Down
3 changes: 3 additions & 0 deletions account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ categories = [ "cryptography", "operating-systems" ]
license = "Apache-2.0"
edition = "2021"

[features]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0.79"

Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ edition = "2021"

[features]
default = [ "snarkos-node/metrics" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.aleo-std]
workspace = true
Expand Down
6 changes: 6 additions & 0 deletions cli/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ impl Start {
// Print the welcome.
println!("{}", crate::helpers::welcome_message());

// Check if we are running with the lower coinbase and proof targets. This should only be
// allowed in --dev mode.
if cfg!(feature = "test_targets") && self.dev.is_none() {
bail!("The 'test_targets' feature is enabled, but the '--dev' flag is not set");
}

// Parse the trusted peers to connect to.
let mut trusted_peers = self.parse_trusted_peers()?;
// Parse the trusted validators to connect to.
Expand Down
1 change: 1 addition & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ metrics = [
"snarkos-node-tcp/metrics"
]
history = [ "snarkos-node-rest/history" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.aleo-std]
workspace = true
Expand Down
1 change: 1 addition & 0 deletions node/bft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
default = [ ]
metrics = [ "dep:metrics", "snarkos-node-bft-events/metrics", "snarkos-node-bft-ledger-service/metrics" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.aleo-std]
workspace = true
Expand Down
1 change: 1 addition & 0 deletions node/bft/events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
default = [ ]
metrics = ["dep:metrics", "snarkvm/metrics"]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0"
Expand Down
1 change: 1 addition & 0 deletions node/bft/ledger-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ mock = [ "parking_lot", "tracing" ]
prover = [ ]
test = [ "mock", "translucent" ]
translucent = [ "ledger" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.async-trait]
version = "0.1"
Expand Down
1 change: 1 addition & 0 deletions node/bft/storage-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ default = [ ]
memory = [ "parking_lot", "tracing" ]
persistent = [ ]
test = [ "memory" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.aleo-std]
workspace = true
Expand Down
1 change: 1 addition & 0 deletions node/cdn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
default = [ "parallel" ]
parallel = [ "rayon" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0.79"
Expand Down
1 change: 1 addition & 0 deletions node/consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
default = [ ]
metrics = [ "dep:metrics" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.aleo-std]
workspace = true
Expand Down
1 change: 1 addition & 0 deletions node/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ edition = "2021"
default = [ "rayon", "snarkvm/metrics"]
metrics = [ "snarkvm/metrics" ]
serial = ["snarkvm/metrics"]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.metrics-exporter-prometheus]
version = "0.13"
Expand Down
8 changes: 5 additions & 3 deletions node/rest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ edition = "2021"
default = [ "parallel" ]
parallel = [ "rayon" ]
history = [ "snarkvm-synthesizer/history" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0.79"
Expand Down Expand Up @@ -65,9 +66,10 @@ path = "../router"
version = "=2.2.7"

[dependencies.snarkvm-synthesizer]
#path = "../../../snarkVM/synthesizer"
git = "https://github.com/AleoNet/snarkVM.git"
rev = "be171ce"
git = "https://github.com/joske/snarkVM.git"
branch = "feat/test-targets"
# git = "https://github.com/AleoNet/snarkVM.git"
# rev = "be171ce"
default-features = false
optional = true

Expand Down
1 change: 1 addition & 0 deletions node/router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
test = [ ]
metrics = [ "dep:metrics" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0.79"
Expand Down
1 change: 1 addition & 0 deletions node/router/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
default = [ ]
test = [ ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0"
Expand Down
1 change: 1 addition & 0 deletions node/sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ edition = "2021"
default = [ ]
metrics = [ "dep:metrics" ]
test = [ "snarkos-node-sync-locators/test" ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0"
Expand Down
1 change: 1 addition & 0 deletions node/sync/locators/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ edition = "2021"
[features]
default = [ ]
test = [ ]
test_targets = [ "snarkvm/test_targets" ]

[dependencies.anyhow]
version = "1.0"
Expand Down