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

WIP: local as runtime opt #2595

Merged
merged 32 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b4a2f12
feat: remove feat flags
grumbach Jan 3, 2025
4edfe6f
feat: remove feat flags from ci
grumbach Jan 3, 2025
0be759b
feat: local as runtime opt
grumbach Jan 3, 2025
cee5d51
feat: cli local setup
grumbach Jan 3, 2025
924daff
chore: keep old order
grumbach Jan 3, 2025
ce9e9a7
chore: fix cli wallet error management
grumbach Jan 6, 2025
854582a
feat: local mode in config
grumbach Jan 6, 2025
010b6db
fix(node): evm network initialization logic
mickvandijke Jan 7, 2025
780a3d8
Merge pull request #8 from mickvandijke/local_as_runtime_opt
grumbach Jan 7, 2025
30fd900
Merge branch 'main' into local_as_runtime_opt
grumbach Jan 7, 2025
f3cf215
chore: remove expects
grumbach Jan 7, 2025
9857040
chore: set default evm network to Arbitrum Sepolia
mickvandijke Jan 7, 2025
904b201
Merge pull request maidsafe#2609
mickvandijke Jan 7, 2025
339b13f
refactor: get evm network from single source
mickvandijke Jan 7, 2025
c0d6bfd
feat: remove local from antctl too
grumbach Jan 7, 2025
e7ea9bc
Merge pull request #9 from mickvandijke/local_as_runtime_opt
grumbach Jan 7, 2025
fb410ce
Merge branch 'main' into local_as_runtime_opt
grumbach Jan 7, 2025
ede5f34
chore: small cleanups
grumbach Jan 7, 2025
178a064
fix: enable feature gated logging option
grumbach Jan 7, 2025
51f00b6
fix: adapt e2e ci tests
grumbach Jan 7, 2025
46de268
feat: centralize evm network selection code
grumbach Jan 7, 2025
8d8a1c9
Merge branch 'main' into local_as_runtime_opt
grumbach Jan 8, 2025
d77b844
fix: remove duplicate if local
grumbach Jan 8, 2025
540906c
test: fix networking async test
b-zee Jan 14, 2025
f98319e
Merge remote-tracking branch 'origin/main' into local_as_runtime_opt
b-zee Jan 14, 2025
f71cec8
refactor: base evm network on local setting
b-zee Jan 14, 2025
189c5be
ci: fix double upload
b-zee Jan 14, 2025
f1bcad1
fix: enable process-metrics feature
b-zee Jan 14, 2025
fc61526
ci: fix local vault sync
b-zee Jan 14, 2025
5e9a669
ci: add --local flags to ant
b-zee Jan 14, 2025
9db5100
feat: enable mDNS behavior only with --local
b-zee Jan 14, 2025
fa5b005
docs: remove reference to --local in README.md
b-zee Jan 14, 2025
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
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/main' into local_as_runtime_opt
  • Loading branch information
b-zee committed Jan 14, 2025
commit f98319ec2664a009c6455b64d5872e86d78a0fd6
3 changes: 2 additions & 1 deletion .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
@@ -99,7 +99,8 @@ jobs:
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
./target/release/ant --log-output-dest=data-dir --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'Total cost: 0 AttoTokens' ./upload_output_second -c --stats
./target/release/ant --log-output-dest=data-dir --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'All chunks already exist on the network.' ./upload_output_second -c --stats
env:
ANT_LOG: "all"
timeout-minutes: 25
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions ant-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -23,13 +23,11 @@ name = "files"
harness = false

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.2" }
ant-build-info = { path = "../ant-build-info", version = "0.1.22" }
ant-logging = { path = "../ant-logging", version = "0.2.43" }
ant-protocol = { path = "../ant-protocol", version = "0.3.2" }
autonomi = { path = "../autonomi", version = "0.3.2", features = [
"loud",
] }
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
autonomi = { path = "../autonomi", version = "0.3.3", features = [ "loud" ] }
clap = { version = "4.2.1", features = ["derive"] }
color-eyre = "0.6.3"
const-hex = "1.13.1"
@@ -56,7 +54,7 @@ tracing = { version = "~0.1.26" }
walkdir = "2.5.0"

[dev-dependencies]
autonomi = { path = "../autonomi", version = "0.3.2"}
autonomi = { path = "../autonomi", version = "0.3.3" }
criterion = "0.5.1"
eyre = "0.6.8"
rand = { version = "~0.8.5", features = ["small_rng"] }
20 changes: 10 additions & 10 deletions ant-node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -23,14 +23,14 @@ otlp = ["ant-logging/otlp"]
upnp = ["ant-networking/upnp"]

[dependencies]
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.2" }
ant-build-info = { path = "../ant-build-info", version = "0.1.22" }
ant-evm = { path = "../ant-evm", version = "0.1.7" }
ant-logging = { path = "../ant-logging", version = "0.2.43", features = ["process-metrics"] }
ant-networking = { path = "../ant-networking", version = "0.3.2" }
ant-protocol = { path = "../ant-protocol", version = "0.3.2" }
ant-registers = { path = "../ant-registers", version = "0.4.6" }
ant-service-management = { path = "../ant-service-management", version = "0.4.6" }
ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.3" }
ant-build-info = { path = "../ant-build-info", version = "0.1.23" }
ant-evm = { path = "../ant-evm", version = "0.1.8" }
ant-logging = { path = "../ant-logging", version = "0.2.44" }
ant-networking = { path = "../ant-networking", version = "0.3.3" }
ant-protocol = { path = "../ant-protocol", version = "0.3.3" }
ant-registers = { path = "../ant-registers", version = "0.4.7" }
ant-service-management = { path = "../ant-service-management", version = "0.4.7" }
async-trait = "0.1"
bls = { package = "blsttc", version = "8.0.1" }
bytes = { version = "1.0.1", features = ["serde"] }
@@ -82,8 +82,8 @@ xor_name = "5.0.0"
[dev-dependencies]
ant-protocol = { path = "../ant-protocol", version = "0.3.3", features = ["rpc"] }
assert_fs = "1.0.0"
evmlib = { path = "../evmlib", version = "0.1.7" }
autonomi = { path = "../autonomi", version = "0.3.2" }
evmlib = { path = "../evmlib", version = "0.1.8" }
autonomi = { path = "../autonomi", version = "0.3.3" }
reqwest = { version = "0.12.2", default-features = false, features = [
"rustls-tls-manual-roots",
] }
3 changes: 1 addition & 2 deletions ant-node/src/bin/antnode/main.rs
Original file line number Diff line number Diff line change
@@ -308,8 +308,7 @@ fn main() -> Result<()> {
if opt.peers.local {
rt.spawn(init_metrics(std::process::id()));
}
let initial_peres = rt.block_on(opt.peers.get_addrs(None, Some(100)))?;
debug!("Node's owner set to: {:?}", opt.owner);
let initial_peers = rt.block_on(opt.peers.get_addrs(None, Some(100)))?;
let restart_options = rt.block_on(async move {
let mut node_builder = NodeBuilder::new(
keypair,
12 changes: 11 additions & 1 deletion autonomi/src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -84,6 +84,16 @@ pub struct ClientConfig {
pub evm_network: EvmNetwork,
}

// impl Default for ClientConfig {
// fn default() -> Self {
// Self {
// local: false,
// peers: None,
// evm_network: EvmNetwork::try_from_env().unwrap_or_default(),
// }
// }
// }

/// Error returned by [`Client::init`].
#[derive(Debug, thiserror::Error)]
pub enum ConnectError {
@@ -139,7 +149,7 @@ impl Client {
Self::init_with_config(ClientConfig {
local,
peers: Some(peers),
evm_network: EvmNetwork::try_from_env().unwrap_or_default(),
evm_network: EvmNetwork::new(local).unwrap_or_default(),
})
.await
}
6 changes: 3 additions & 3 deletions evmlib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
// permissions and limitations relating to use of the SAFE Network Software.

use crate::common::Address;
use crate::utils::get_evm_network_from_env;
use crate::utils::get_evm_network;
use alloy::primitives::address;
use alloy::transports::http::reqwest;
use serde::{Deserialize, Serialize};
@@ -104,8 +104,8 @@ impl std::fmt::Display for Network {
}

impl Network {
pub fn try_from_env() -> Result<Self, utils::Error> {
get_evm_network_from_env().inspect_err(|err| {
pub fn new(local: bool) -> Result<Self, utils::Error> {
get_evm_network(local).inspect_err(|err| {
warn!("Failed to select EVM network from ENV: {err}");
})
}
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.