From 03ebb8c725028c2bd4eade422ced758a54dc7de1 Mon Sep 17 00:00:00 2001 From: chad Date: Tue, 25 Mar 2025 08:11:29 -0500 Subject: [PATCH] chore: add taplo fmt --- .github/workflows/ci.yml | 16 ++++ .vscode/settings.json | 11 ++- Cargo.toml | 140 +++++++++++++++++----------------- atoma-confidential/Cargo.toml | 38 ++++----- atoma-daemon/Cargo.toml | 41 ++++------ atoma-p2p-tester/Cargo.toml | 32 ++++---- atoma-p2p/Cargo.toml | 52 ++++++------- atoma-service/Cargo.toml | 46 +++++------ atoma-state/Cargo.toml | 26 +++---- atoma-sui/Cargo.toml | 28 +++---- atoma-utils/Cargo.toml | 32 ++++---- config.example.toml | 45 +++++------ deny.toml | 92 +++++++++++----------- rustfmt.toml | 1 + taplo.toml | 27 +++++++ 15 files changed, 329 insertions(+), 298 deletions(-) create mode 100644 taplo.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59992aba..42d72a81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,22 @@ jobs: -W clippy::perf \ -W clippy::suspicious \ -W clippy::correctness + toml-format: + name: toml-format + runs-on: ubuntu-22.04 + steps: + - name: checkout + uses: actions/checkout@v4 + - name: Install Taplo + env: + version: "0.9.3" + run: | + curl -Ls "https://github.com/tamasfe/taplo/releases/download/${{ env.version }}/taplo-full-linux-x86_64.gz" | \ + gzip -d > taplo && \ + chmod +x taplo && \ + sudo mv taplo /usr/local/bin/taplo + - name: Run Taplo + run: taplo fmt --check test: name: test diff --git a/.vscode/settings.json b/.vscode/settings.json index a4653015..5842d741 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,14 @@ "clippy::suspicious", "-W", "clippy::correctness" - ] + ], + "[toml]": { + "editor.defaultFormatter": "tamasfe.even-better-toml", + "editor.formatOnSave": true + }, + "evenBetterToml.formatter.alignEntries": true, + "evenBetterToml.formatter.arrayTrailingComma": true, + "evenBetterToml.formatter.columnWidth": 100, + "evenBetterToml.formatter.indentString": " ", + "evenBetterToml.formatter.reorderKeys": true } diff --git a/Cargo.toml b/Cargo.toml index a00c9e5d..b90486bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,88 +5,88 @@ members = [ "atoma-confidential", "atoma-daemon", "atoma-p2p", + "atoma-p2p-tester", "atoma-service", "atoma-state", "atoma-sui", "atoma-utils", - "atoma-p2p-tester", ] [workspace.package] -version = "0.1.0" edition = "2021" license = "Apache-2.0" +version = "0.1.0" [workspace.dependencies] -aes-gcm = "0.10.3" -anyhow = "1.0.97" -atoma-confidential = { path = "./atoma-confidential" } -atoma-daemon = { path = "./atoma-daemon" } -atoma-p2p = { path = "./atoma-p2p" } -atoma-state = { path = "./atoma-state" } -atoma-sui = { path = "./atoma-sui" } -atoma-utils = { path = "./atoma-utils" } -axum = "0.7.5" -base64 = "0.22.1" -blake2 = "0.10.6" -blake3 = "1.6.1" -bytes = "1.10.0" -ciborium = "0.2.2" -chrono = "0.4.39" -clap = "4.5.31" -config = "0.14.0" -dotenvy = "0.15.7" -fastcrypto = "0.1.8" -flate2 = "1.1.0" -flume = "0.11.1" -futures = "0.3.30" -futures-util = "0.3.30" -hex = "0.4.3" -hf-hub = "0.3.2" -hkdf = "0.12.4" -http = "1.2" -hyper = "1.6.0" -isocountry = "0.3.2" -lazy_static = "1.5.0" -libp2p = "0.55.0" -metrics = "0.23" +aes-gcm = "0.10.3" +anyhow = "1.0.97" +atoma-confidential = { path = "./atoma-confidential" } +atoma-daemon = { path = "./atoma-daemon" } +atoma-p2p = { path = "./atoma-p2p" } +atoma-state = { path = "./atoma-state" } +atoma-sui = { path = "./atoma-sui" } +atoma-utils = { path = "./atoma-utils" } +axum = "0.7.5" +base64 = "0.22.1" +blake2 = "0.10.6" +blake3 = "1.6.1" +bytes = "1.10.0" +chrono = "0.4.39" +ciborium = "0.2.2" +clap = "4.5.31" +config = "0.14.0" +dotenvy = "0.15.7" +fastcrypto = "0.1.8" +flate2 = "1.1.0" +flume = "0.11.1" +futures = "0.3.30" +futures-util = "0.3.30" +hex = "0.4.3" +hf-hub = "0.3.2" +hkdf = "0.12.4" +http = "1.2" +hyper = "1.6.0" +isocountry = "0.3.2" +lazy_static = "1.5.0" +libp2p = "0.55.0" +metrics = "0.23" metrics-exporter-prometheus = "0.14.0" -nvml-wrapper = { git = "https://github.com/atoma-network/nvml-wrapper.git", branch = "main" } -once_cell = "1.20.3" -opentelemetry = "0.27.0" -opentelemetry_sdk = "0.27.0" -opentelemetry-otlp = "0.27.0" -prometheus = "0.13.4" -rand = "0.8.5" -remote-attestation = { git = "https://github.com/atoma-network/nvrust.git", branch = "main" } -reqwest = "0.12.12" -rs_merkle = "1.4.2" -serde = "1.0.219" -serde_json = "1.0.140" -serde_yaml = "0.9.34" -serial_test = "3.1.1" -sha2 = "0.10.8" -sqlx = "0.8.2" -sui-keys = { git = "https://github.com/mystenlabs/sui", package = "sui-keys", tag = "testnet-v1.45.2" } -sui-sdk = { git = "https://github.com/mystenlabs/sui", package = "sui-sdk", tag = "testnet-v1.45.2" } -sysinfo = "0.33.1" -tempfile = "3.18.0" -thiserror = "2.0.12" -tokenizers = "0.21.0" -tokio = "1.44.0" -toml = "0.8.12" -tower = "0.5.1" -tower-http = "0.6.2" -tracing = "0.1.40" -tracing-appender = "0.2.3" -tracing-subscriber = "0.3.18" -tracing-opentelemetry = "0.28.0" -tracing-loki = "0.2.6" -url = "2.5.4" -utoipa = "5.1.1" -utoipa-swagger-ui = "8.0.1" -validator = "0.20.0" -x25519-dalek = "2.0.1" +nvml-wrapper = { git = "https://github.com/atoma-network/nvml-wrapper.git", branch = "main" } +once_cell = "1.20.3" +opentelemetry = "0.27.0" +opentelemetry-otlp = "0.27.0" +opentelemetry_sdk = "0.27.0" +prometheus = "0.13.4" +rand = "0.8.5" +remote-attestation = { git = "https://github.com/atoma-network/nvrust.git", branch = "main" } +reqwest = "0.12.12" +rs_merkle = "1.4.2" +serde = "1.0.219" +serde_json = "1.0.140" +serde_yaml = "0.9.34" +serial_test = "3.1.1" +sha2 = "0.10.8" +sqlx = "0.8.2" +sui-keys = { git = "https://github.com/mystenlabs/sui", package = "sui-keys", tag = "testnet-v1.45.2" } +sui-sdk = { git = "https://github.com/mystenlabs/sui", package = "sui-sdk", tag = "testnet-v1.45.2" } +sysinfo = "0.33.1" +tempfile = "3.18.0" +thiserror = "2.0.12" +tokenizers = "0.21.0" +tokio = "1.44.0" +toml = "0.8.12" +tower = "0.5.1" +tower-http = "0.6.2" +tracing = "0.1.40" +tracing-appender = "0.2.3" +tracing-loki = "0.2.6" +tracing-opentelemetry = "0.28.0" +tracing-subscriber = "0.3.18" +url = "2.5.4" +utoipa = "5.1.1" +utoipa-swagger-ui = "8.0.1" +validator = "0.20.0" +x25519-dalek = "2.0.1" [patch.crates-io] hyper-rustls = { git = "https://github.com/rustls/hyper-rustls", branch = "main" } diff --git a/atoma-confidential/Cargo.toml b/atoma-confidential/Cargo.toml index aa4707e4..4a1e6eec 100644 --- a/atoma-confidential/Cargo.toml +++ b/atoma-confidential/Cargo.toml @@ -1,25 +1,25 @@ [package] -name = "atoma-confidential" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-confidential" +version.workspace = true [dependencies] -aes-gcm = { workspace = true } -anyhow = { workspace = true } -atoma-sui = { workspace = true } -atoma-utils = { workspace = true } -base64 = { workspace = true } -blake3 = { workspace = true } -config = { workspace = true } -flume = { workspace = true } -hex = { workspace = true } -nvml-wrapper = { workspace = true } -rand = { workspace = true } +aes-gcm = { workspace = true } +anyhow = { workspace = true } +atoma-sui = { workspace = true } +atoma-utils = { workspace = true } +base64 = { workspace = true } +blake3 = { workspace = true } +config = { workspace = true } +flume = { workspace = true } +hex = { workspace = true } +nvml-wrapper = { workspace = true } +rand = { workspace = true } remote-attestation = { workspace = true } -serde = { workspace = true } -serde_json = { workspace = true } -tokio = { workspace = true } -thiserror = { workspace = true } -tracing = { workspace = true } -x25519-dalek = { workspace = true, features = ["static_secrets"] } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } +x25519-dalek = { workspace = true, features = [ "static_secrets" ] } diff --git a/atoma-daemon/Cargo.toml b/atoma-daemon/Cargo.toml index e6f9a90b..0fed859d 100644 --- a/atoma-daemon/Cargo.toml +++ b/atoma-daemon/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "atoma-daemon" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-daemon" +version.workspace = true [[bin]] name = "atoma-daemon" @@ -17,39 +17,30 @@ axum = { workspace = true } blake2 = { workspace = true } clap = { workspace = true } config = { workspace = true } +once_cell = "1.20" +opentelemetry = { workspace = true, features = [ "logs", "metrics", "trace" ] } +opentelemetry-otlp = { workspace = true, features = [ + "grpc-tonic", + "logs", + "metrics", + "tls", + "trace", +] } +opentelemetry_sdk = { workspace = true, features = [ "logs", "metrics", "rt-tokio", "trace" ] } rs_merkle = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } serde_yaml = { workspace = true } sui-sdk = { workspace = true } tokio = { workspace = true } -once_cell = "1.20" -opentelemetry = { workspace = true, features = ["trace", "metrics", "logs"] } -opentelemetry_sdk = { workspace = true, features = [ - "rt-tokio", - "trace", - "metrics", - "logs", -] } -opentelemetry-otlp = { workspace = true, features = [ - "metrics", - "grpc-tonic", - "trace", - "tls", - "logs", -] } tracing = { workspace = true } tracing-appender = { workspace = true } -tracing-subscriber = { workspace = true, features = [ - "env-filter", - "json", - "local-time", -] } -tracing-opentelemetry = { workspace = true } tracing-loki = { workspace = true } -utoipa = { workspace = true, features = ["axum_extras"] } -utoipa-swagger-ui = { workspace = true, features = ["axum"] } +tracing-opentelemetry = { workspace = true } +tracing-subscriber = { workspace = true, features = [ "env-filter", "json", "local-time" ] } url = { workspace = true } +utoipa = { workspace = true, features = [ "axum_extras" ] } +utoipa-swagger-ui = { workspace = true, features = [ "axum" ] } [dev-dependencies] diff --git a/atoma-p2p-tester/Cargo.toml b/atoma-p2p-tester/Cargo.toml index 3566ce1b..c27655a9 100644 --- a/atoma-p2p-tester/Cargo.toml +++ b/atoma-p2p-tester/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "atoma-p2p-tester" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-p2p-tester" +version.workspace = true [dependencies] -atoma-p2p = { path = "../atoma-p2p" } -atoma-sui = { path = "../atoma-sui" } -atoma-daemon = { path = "../atoma-daemon" } -atoma-utils = { path = "../atoma-utils" } -anyhow = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tracing = { workspace = true } -tracing-subscriber = { workspace = true, features = ["env-filter"] } -clap = { workspace = true, features = ["derive"] } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -config = { workspace = true } -sui-keys = { workspace = true } -flume = { workspace = true } +anyhow = { workspace = true } +atoma-daemon = { path = "../atoma-daemon" } +atoma-p2p = { path = "../atoma-p2p" } +atoma-sui = { path = "../atoma-sui" } +atoma-utils = { path = "../atoma-utils" } +clap = { workspace = true, features = [ "derive" ] } +config = { workspace = true } +flume = { workspace = true } +serde = { workspace = true, features = [ "derive" ] } +serde_json = { workspace = true } +sui-keys = { workspace = true } +tokio = { workspace = true, features = [ "full" ] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true, features = [ "env-filter" ] } diff --git a/atoma-p2p/Cargo.toml b/atoma-p2p/Cargo.toml index de0a63e2..36bb87d9 100644 --- a/atoma-p2p/Cargo.toml +++ b/atoma-p2p/Cargo.toml @@ -1,50 +1,50 @@ [package] -name = "atoma-p2p" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-p2p" +version.workspace = true [dependencies] blake3 = { workspace = true } bytes = { workspace = true } -ciborium = { workspace = true } chrono = { workspace = true } +ciborium = { workspace = true } config = { workspace = true } -isocountry = { workspace = true } -libp2p = { workspace = true, features = [ - "autonat", - "tokio", - "dns", - "identify", - "gossipsub", - "mdns", - "kad", - "macros", - "quic", - "tcp", - "yamux", - "noise", - "metrics", - "rsa", -] } fastcrypto = { workspace = true } flume = { workspace = true } futures = { workspace = true } +isocountry = { workspace = true } +libp2p = { workspace = true, features = [ + "autonat", + "dns", + "gossipsub", + "identify", + "kad", + "macros", + "mdns", + "metrics", + "noise", + "quic", + "rsa", + "tcp", + "tokio", + "yamux", +] } once_cell = { workspace = true } opentelemetry = { workspace = true } -reqwest = { workspace = true } rand = { workspace = true } -serde = { workspace = true, features = ["derive"] } +reqwest = { workspace = true } +serde = { workspace = true, features = [ "derive" ] } +serde_json = { workspace = true } sui-keys = { workspace = true } sui-sdk = { workspace = true } -serde_json = { workspace = true } sysinfo = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true, features = ["full"] } +tokio = { workspace = true, features = [ "full" ] } tracing = { workspace = true } url = { workspace = true } -validator = { workspace = true, features = ["derive"] } +validator = { workspace = true, features = [ "derive" ] } [dev-dependencies] -rand = { workspace = true } +rand = { workspace = true } tempfile = { workspace = true } diff --git a/atoma-service/Cargo.toml b/atoma-service/Cargo.toml index f8622221..08968afe 100644 --- a/atoma-service/Cargo.toml +++ b/atoma-service/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "atoma-service" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-service" +version.workspace = true [[bin]] name = "atoma-node" @@ -29,22 +29,17 @@ hyper = { workspace = true } isocountry = { workspace = true } lazy_static = { workspace = true } once_cell = { workspace = true } -opentelemetry = { workspace = true, features = ["trace", "metrics", "logs"] } -opentelemetry_sdk = { workspace = true, features = [ - "rt-tokio", - "trace", - "metrics", - "logs", -] } +opentelemetry = { workspace = true, features = [ "logs", "metrics", "trace" ] } opentelemetry-otlp = { workspace = true, features = [ - "metrics", - "grpc-tonic", - "trace", - "tls", - "logs", + "grpc-tonic", + "logs", + "metrics", + "tls", + "trace", ] } +opentelemetry_sdk = { workspace = true, features = [ "logs", "metrics", "rt-tokio", "trace" ] } prometheus = { workspace = true } -reqwest = { workspace = true, features = ["json"] } +reqwest = { workspace = true, features = [ "json" ] } serde = { workspace = true } serde_json = { workspace = true } serde_yaml = { workspace = true } @@ -53,25 +48,20 @@ sui-keys = { workspace = true } sui-sdk = { workspace = true } thiserror = { workspace = true } tokenizers = { workspace = true } -tokio = { workspace = true, features = ["signal"] } +tokio = { workspace = true, features = [ "signal" ] } tower = { workspace = true } -tower-http = { workspace = true, features = ["cors"] } +tower-http = { workspace = true, features = [ "cors" ] } tracing = { workspace = true } tracing-appender = { workspace = true } -tracing-subscriber = { workspace = true, features = [ - "env-filter", - "json", - "local-time", -] } tracing-opentelemetry = { workspace = true } +tracing-subscriber = { workspace = true, features = [ "env-filter", "json", "local-time" ] } url = { workspace = true } -utoipa = { workspace = true, features = ["axum_extras"] } -utoipa-swagger-ui = { workspace = true, features = ["axum"] } +utoipa = { workspace = true, features = [ "axum_extras" ] } +utoipa-swagger-ui = { workspace = true, features = [ "axum" ] } x25519-dalek = { workspace = true } [dev-dependencies] -rand = { workspace = true } +rand = { workspace = true } serial_test = { workspace = true } -sqlx = { workspace = true, features = ["runtime-tokio", "postgres"] } -tempfile = { workspace = true } - +sqlx = { workspace = true, features = [ "postgres", "runtime-tokio" ] } +tempfile = { workspace = true } diff --git a/atoma-state/Cargo.toml b/atoma-state/Cargo.toml index 3ee88fa0..8f1c0766 100644 --- a/atoma-state/Cargo.toml +++ b/atoma-state/Cargo.toml @@ -1,22 +1,22 @@ [package] -name = "atoma-state" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-state" +version.workspace = true [dependencies] -atoma-p2p = { workspace = true } -atoma-sui = { workspace = true } -config = { workspace = true } -flume = { workspace = true } -serde = { workspace = true, features = ["derive"] } +atoma-p2p = { workspace = true } +atoma-sui = { workspace = true } +config = { workspace = true } +flume = { workspace = true } +serde = { workspace = true, features = [ "derive" ] } serde_json = { workspace = true } -sqlx = { workspace = true, features = ["runtime-tokio", "postgres", "migrate"] } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tracing = { workspace = true } -utoipa = { workspace = true } +sqlx = { workspace = true, features = [ "migrate", "postgres", "runtime-tokio" ] } +thiserror = { workspace = true } +tokio = { workspace = true, features = [ "full" ] } +tracing = { workspace = true } +utoipa = { workspace = true } [dev-dependencies] -serial_test = { workspace = true } atoma-utils = { workspace = true } +serial_test = { workspace = true } diff --git a/atoma-sui/Cargo.toml b/atoma-sui/Cargo.toml index 2bbb8e84..848de644 100644 --- a/atoma-sui/Cargo.toml +++ b/atoma-sui/Cargo.toml @@ -1,22 +1,22 @@ [package] -name = "atoma-sui" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-sui" +version.workspace = true [dependencies] -anyhow = { workspace = true } -config = { workspace = true } -flume = { workspace = true } -futures = { workspace = true } -hex = { workspace = true } -serde = { workspace = true, features = ["derive"] } +anyhow = { workspace = true } +config = { workspace = true } +flume = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } +serde = { workspace = true, features = [ "derive" ] } serde_json = { workspace = true } -sui-sdk = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true } -toml = { workspace = true } -tracing = { workspace = true } +sui-sdk = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } +toml = { workspace = true } +tracing = { workspace = true } [dev-dependencies] -tempfile = { workspace = true } \ No newline at end of file +tempfile = { workspace = true } diff --git a/atoma-utils/Cargo.toml b/atoma-utils/Cargo.toml index ce5764c1..a03342d3 100644 --- a/atoma-utils/Cargo.toml +++ b/atoma-utils/Cargo.toml @@ -1,22 +1,22 @@ [package] -name = "atoma-utils" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-utils" +version.workspace = true [dependencies] -aes-gcm = { workspace = true } -anyhow = { workspace = true } -axum = { workspace = true } -blake2 = { workspace = true } -fastcrypto = { workspace = true } -flate2 = { workspace = true } -hkdf = { workspace = true } -rand = { workspace = true } -serde_json = { workspace = true } -sha2 = { workspace = true } -sui-sdk = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tracing = { workspace = true } +aes-gcm = { workspace = true } +anyhow = { workspace = true } +axum = { workspace = true } +blake2 = { workspace = true } +fastcrypto = { workspace = true } +flate2 = { workspace = true } +hkdf = { workspace = true } +rand = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +sui-sdk = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = [ "full" ] } +tracing = { workspace = true } x25519-dalek = { workspace = true } diff --git a/config.example.toml b/config.example.toml index 66feafd5..604ca4b2 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,24 +1,24 @@ [atoma_service] -chat_completions_service_urls = { "meta-llama/Llama-3.2-3B-Instruct" = "http://chat-completions:8000"} -embeddings_service_url = "http://embeddings:80" +chat_completions_service_urls = { "meta-llama/Llama-3.2-3B-Instruct" = "http://chat-completions:8000" } +embeddings_service_url = "http://embeddings:80" image_generations_service_url = "http://image-generations:80" # List of models to be used by the service, the current value here is just a placeholder, please change it to the models you want to deploy -models = ["meta-llama/Llama-3.2-3B-Instruct"] -revisions = ["main"] +models = [ "meta-llama/Llama-3.2-3B-Instruct" ] +revisions = [ "main" ] service_bind_address = "0.0.0.0:3000" [atoma_sui] -http_rpc_node_addr = "https://fullnode.testnet.sui.io:443" # Current RPC node address for testnet -atoma_db = "0x7b8f40e38698deb650519a51f9c1a725bf8cfdc074d1552a4dc85976c2b414be" # Current ATOMA DB object ID for testnet -atoma_package_id = "0xc05bae323433740c969d8cf938c48d7559490be5f8dde158792e7a0623787013" # Current ATOMA package ID for testnet -usdc_package_id = "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29" # Current USDC package ID for testnet -request_timeout = { secs = 300, nanos = 0 } # Some reference value -max_concurrent_requests = 10 # Some reference value -limit = 100 # Some reference value -node_small_ids = [1] # List of node IDs under control of the node wallet -sui_config_path = "/root/.sui/sui_config/client.yaml" # Path to the Sui client configuration file, accessed from the docker container (if this is not the case, pass in the full path, on your host machine which is by default ~/.sui/sui_config/client.yaml) -sui_keystore_path = "/root/.sui/sui_config/sui.keystore" # Path to the Sui keystore file, accessed from the docker container (if this is not the case, pass in the full path, on your host machine which is by default ~/.sui/sui_config/sui.keystore) -cursor_path = "/app/data/cursor.toml" # Path to the Sui events cursor file +atoma_db = "0x7b8f40e38698deb650519a51f9c1a725bf8cfdc074d1552a4dc85976c2b414be" # Current ATOMA DB object ID for testnet +atoma_package_id = "0xc05bae323433740c969d8cf938c48d7559490be5f8dde158792e7a0623787013" # Current ATOMA package ID for testnet +cursor_path = "/app/data/cursor.toml" # Path to the Sui events cursor file +http_rpc_node_addr = "https://fullnode.testnet.sui.io:443" # Current RPC node address for testnet +limit = 100 # Some reference value +max_concurrent_requests = 10 # Some reference value +node_small_ids = [ 1 ] # List of node IDs under control of the node wallet +request_timeout = { secs = 300, nanos = 0 } # Some reference value +sui_config_path = "/root/.sui/sui_config/client.yaml" # Path to the Sui client configuration file, accessed from the docker container (if this is not the case, pass in the full path, on your host machine which is by default ~/.sui/sui_config/client.yaml) +sui_keystore_path = "/root/.sui/sui_config/sui.keystore" # Path to the Sui keystore file, accessed from the docker container (if this is not the case, pass in the full path, on your host machine which is by default ~/.sui/sui_config/sui.keystore) +usdc_package_id = "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29" # Current USDC package ID for testnet [atoma_state] # Path inside the container @@ -43,15 +43,9 @@ heartbeat_interval = { secs = 30, nanos = 0 } idle_connection_timeout = { secs = 60, nanos = 0 } # Address to listen for incoming QUIC connections (format: "/ip4/x.x.x.x/udp/x") # Address to listen for incoming QUIC connections (format: "/ip4/x.x.x.x/udp/x") -listen_addrs = [ - "/ip4/0.0.0.0/tcp/4001", - "/ip4/0.0.0.0/udp/4001/quic-v1", -] +listen_addrs = [ "/ip4/0.0.0.0/tcp/4001", "/ip4/0.0.0.0/udp/4001/quic-v1" ] # The list of bootstrap nodes to dial -bootstrap_node_addrs = [ - "/ip4/213.130.147.75/tcp/8083", - "/ip4/213.130.147.75/udp/8083/quic-v1", -] +bootstrap_node_addrs = [ "/ip4/213.130.147.75/tcp/8083", "/ip4/213.130.147.75/udp/8083/quic-v1" ] # Node's small ID (assigned by Atoma smart contract) node_small_id = 1 @@ -61,6 +55,9 @@ public_url = "https://" country = "" # List of endpoints serving metrics to collect, in the form of a map of model name to a tuple of (serving_engine, metrics_endpoint) # (e.g. `"meta-llama/Llama-3.2-3B-Instruct" = ("vllm", "http://chat-completions:8000/metrics")`) -metrics_endpoints = { "meta-llama/Llama-3.2-3B-Instruct" = ["vllm", "http://chat-completions:8000/metrics"] } +metrics_endpoints = { "meta-llama/Llama-3.2-3B-Instruct" = [ + "http://chat-completions:8000/metrics", + "vllm", +] } # The path to the local key local_key = "/app/data/local_key" diff --git a/deny.toml b/deny.toml index a70f7e9a..d312834d 100644 --- a/deny.toml +++ b/deny.toml @@ -7,26 +7,26 @@ version = 2 # The path where the advisory database is cloned/fetched into db-path = "~/cargo/advisory-db" # The url of the advisory database to use -db-urls = ["https://github.com/rustsec/advisory-db"] +db-urls = [ "https://github.com/rustsec/advisory-db" ] # The lint level for crates that have been yanked from their source registry yanked = "warn" # A list of advisory IDs to ignore. Note that ignored advisories will still # output a note when they are encountered. ignore = [ - # These are all related to the sui SDK, which is outside of our control - # derivative is not maintained - "RUSTSEC-2024-0388", - "RUSTSEC-2024-0436", - "RUSTSEC-2024-0437", - # we don't do RSA signing on Sui (only verifying for zklogin) - "RUSTSEC-2023-0071", - # allow yaml-rust being unmaintained - "RUSTSEC-2024-0320", - # allow unmaintained proc-macro-error used in transitive dependencies - "RUSTSEC-2024-0370", - # ring is unmaintained but is a critical dependency through sui-sdk and libp2p - "RUSTSEC-2025-0009", - "RUSTSEC-2025-0010", + # These are all related to the sui SDK, which is outside of our control + # derivative is not maintained + "RUSTSEC-2024-0388", + "RUSTSEC-2024-0436", + "RUSTSEC-2024-0437", + # we don't do RSA signing on Sui (only verifying for zklogin) + "RUSTSEC-2023-0071", + # allow yaml-rust being unmaintained + "RUSTSEC-2024-0320", + # allow unmaintained proc-macro-error used in transitive dependencies + "RUSTSEC-2024-0370", + # ring is unmaintained but is a critical dependency through sui-sdk and libp2p + "RUSTSEC-2025-0009", + "RUSTSEC-2025-0010", ] # Threshold for security vulnerabilities, any vulnerability with a CVSS score # lower than the range specified will be ignored. Note that ignored advisories @@ -48,19 +48,19 @@ version = 2 # See https://spdx.org/licenses/ for list of possible licenses # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. allow = [ - "Apache-2.0 WITH LLVM-exception", - "Apache-2.0", - "BSD-2-Clause", - "BSD-3-Clause", - "ISC", - "MIT", - "MPL-2.0", - "BSL-1.0", - "OpenSSL", - "CC0-1.0", - "Unlicense", - "Unicode-3.0", - "Zlib", + "Apache-2.0 WITH LLVM-exception", + "Apache-2.0", + "BSD-2-Clause", + "BSD-3-Clause", + "BSL-1.0", + "CC0-1.0", + "ISC", + "MIT", + "MPL-2.0", + "OpenSSL", + "Unicode-3.0", + "Unlicense", + "Zlib", ] # The confidence threshold for detecting a license from license text. # The higher the value, the more closely the license text must be to the @@ -71,24 +71,24 @@ confidence-threshold = 0.8 # aren't accepted for every possible crate as with the normal allow list exceptions = [ - { allow = [ - "MIT", - ], name = "addchain" }, - { allow = [ - "MIT", - ], name = "anemo" }, - { allow = [ - "MIT", - ], name = "addr2line" }, + { allow = [ + "MIT", + ], name = "addchain" }, + { allow = [ + "MIT", + ], name = "addr2line" }, + { allow = [ + "MIT", + ], name = "anemo" }, ] # Some crates don't have (easily) machine readable licensing information, # adding a clarification entry for it allows you to manually specify the # licensing information [[licenses.clarify]] -name = "ring" -expression = "ISC AND MIT AND OpenSSL" -license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] +expression = "ISC AND MIT AND OpenSSL" +license-files = [ { path = "LICENSE", hash = 0xbd0eed23 } ] +name = "ring" [licenses.private] # If true, ignores workspace crates that aren't published, or are only @@ -140,15 +140,15 @@ unknown-registry = "deny" unknown-git = "deny" # List of URLs for allowed crate registries. Defaults to the crates.io index # if not specified. If it is specified but empty, no registries are allowed. -allow-registry = ["https://github.com/rust-lang/crates.io-index"] +allow-registry = [ "https://github.com/rust-lang/crates.io-index" ] # List of URLs for allowed Git repositories # Allow the mysten labs repositories for Sui allow-git = [ - "https://github.com/asonnino/prometheus-parser", - "https://github.com/zhiburt/tabled", - "https://github.com/atoma-network/nvml-wrapper.git", - "https://github.com/atoma-network/nvrust.git", + "https://github.com/asonnino/prometheus-parser", + "https://github.com/atoma-network/nvml-wrapper.git", + "https://github.com/atoma-network/nvrust.git", + "https://github.com/zhiburt/tabled", ] [sources.allow-org] -github = ["mystenmark", "bmwill", "mystenlabs", "nextest-rs", "rustls"] +github = [ "bmwill", "mystenlabs", "mystenmark", "nextest-rs", "rustls" ] diff --git a/rustfmt.toml b/rustfmt.toml index e69de29b..8b137891 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -0,0 +1 @@ + diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 00000000..e46780e6 --- /dev/null +++ b/taplo.toml @@ -0,0 +1,27 @@ +exclude = [ ".git/**" ] + +[formatting] +align_comments = true +align_entries = true +array_auto_expand = true +array_trailing_comma = true +column_width = 100 +compact_arrays = false +compact_inline_tables = false +crlf = false +indent_string = " " +reorder_arrays = true +reorder_dependencies = true +reorder_keys = true + +[formatting.tables] +compact = false +inline = false +reorder = true + +[formatting.arrays] +auto_expand = true +trailing_comma = true + +[formatting.keys] +reorder = true