Skip to content

Commit

Permalink
Merge branch 'main' into double_download_ci_test
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonPaulGithub authored Mar 14, 2024
2 parents 7990183 + fb9191c commit 129cfda
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ jobs:
shell: bash
run: if [[ ! $(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].features.default[]? | select(. == "local-discovery")') ]]; then echo "local-discovery is not a default feature in any package."; else echo "local-discovery is a default feature in at least one package." && exit 1; fi

# In a cargo workspace, feature unification can occur, allowing a crate to be built successfully even if it
# doesn't explicitly specify a feature it uses, provided another crate in the workspace enables that feature.
# To detect such cases, we must build each crate using `--package` flag, building all packages at once does not work.
- name: Check the whole workspace can build
run: cargo build --all-targets --all-features
shell: bash
run: |
for package in $(cargo metadata --no-deps --format-version=1 | jq -r '.packages[].name'); do
cargo build -p "$package"
done
unit:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly_wan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@ jobs:
run: cargo test --release -p sn_node --test sequential_transfers -- --nocapture --test-threads=1
env:
SN_LOG: "all"
timeout-minutes: 10
timeout-minutes: 45

- name: execute the storage payment tests
run: cargo test --release -p sn_node --test storage_payments -- --nocapture --test-threads=1
env:
SN_LOG: "all"
timeout-minutes: 10
timeout-minutes: 45

- name: Small wait to allow reward receipt
run: sleep 30
Expand Down
3 changes: 2 additions & 1 deletion sn_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sn_peers_acquisition= { path="../sn_peers_acquisition", version = "0.2.8" }
sn_client = { path = "../sn_client", version = "0.104.29" }
sn_logging = { path = "../sn_logging", version = "0.2.23" }
sn_networking = { path = "../sn_networking", version = "0.13.33" }
sn_protocol = { path = "../sn_protocol", version = "0.15.4", features = ["rpc"]}
sn_protocol = { path = "../sn_protocol", version = "0.15.4"}
sn_registers = { path = "../sn_registers", version = "0.3.10" }
sn_transfers = { path = "../sn_transfers", version = "0.16.4" }
sn_service_management = { path = "../sn_service_management", version = "0.1.0" }
Expand All @@ -76,6 +76,7 @@ color-eyre = "0.6.2"
assert_matches = "1.5.0"
reqwest = { version="0.11.18", default-features=false, features = ["rustls"] }
serde_json = "1.0"
sn_protocol = { path = "../sn_protocol", version = "0.15.4", features = ["rpc"]}
tempfile = "3.6.0"
# Do not specify the version field. Release process expects even the local dev deps to be published.
# Removing the version field is a workaround.
Expand Down
4 changes: 2 additions & 2 deletions sn_node/tests/common/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use super::get_safenode_manager_rpc_client;

/// This is a limited hard coded value as Droplet version has to contact the faucet to get the funds.
/// This is limited to 10 requests to the faucet, where each request yields 100 SNT
pub const INITIAL_WALLET_BALANCE: u64 = 10 * 100 * 1_000_000_000;
pub const INITIAL_WALLET_BALANCE: u64 = 3 * 100 * 1_000_000_000;

/// 100 SNT is added when `add_funds_to_wallet` is called.
/// This is limited to 1 request to the faucet, where each request yields 100 SNT
Expand Down Expand Up @@ -315,7 +315,7 @@ impl Droplet {
let _guard = FAUCET_WALLET_MUTEX.lock().await;

let requests_to_faucet = if initial_wallet {
let requests_to_faucet = 10;
let requests_to_faucet = 3;
assert_eq!(
requests_to_faucet * 100 * 1_000_000_000,
INITIAL_WALLET_BALANCE
Expand Down
2 changes: 1 addition & 1 deletion sn_node/tests/verify_data_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ async fn verify_data_location() -> Result<()> {
// and get_all_peer_ids is the same as how we do the iteration inside NodeRestart.
// todo: make this more cleaner.
if all_peers[node_index] == new_peer_id {
error!("new and old peer id are the same {new_peer_id:?}");
println!("new and old peer id are the same {new_peer_id:?}");
return Err(eyre!("new and old peer id are the same {new_peer_id:?}"));
}
all_peers[node_index] = new_peer_id;
node_index += 1;
Expand Down
4 changes: 1 addition & 3 deletions sn_node_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
service-manager = "0.6.0"
sn_peers_acquisition = { path = "../sn_peers_acquisition", version = "0.2.8" }
sn_protocol = { path = "../sn_protocol", version = "0.15.4", features = [
"rpc",
]}
sn_protocol = { path = "../sn_protocol", version = "0.15.4" }
sn_service_management = { path = "../sn_service_management", version = "0.1.0" }
sn-releases = "0.1.7"
sn_transfers = { path = "../sn_transfers", version = "0.16.4" }
Expand Down
4 changes: 1 addition & 3 deletions sn_service_management/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
semver = "1.0.20"
service-manager = "0.6.0"
sn_protocol = { path = "../sn_protocol", version = "0.15.4", features = [
"rpc",
] }
sn_protocol = { path = "../sn_protocol", version = "0.15.4", features = ["rpc"] }
sysinfo = "0.29.10"
thiserror = "1.0.23"
tokio = { version = "1.32.0", features = ["time"] }
Expand Down

0 comments on commit 129cfda

Please sign in to comment.