diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0960a7c9..df95efb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,23 @@ jobs: -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 runs-on: ubuntu-22.04 diff --git a/.vscode/settings.json b/.vscode/settings.json index b587953e..fef31032 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 } \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index cfea400e..5ba0b817 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,79 +1,76 @@ [workspace] +members = [ "atoma-auth", "atoma-proxy", "atoma-proxy-service", "atoma-state" ] resolver = "2" -members = ["atoma-auth", "atoma-proxy-service", "atoma-proxy", "atoma-state"] [workspace.package] -version = "0.1.0" edition = "2021" license = "Apache-2.0" +version = "0.1.0" [workspace.dependencies] -anyhow = "1.0.91" -async-trait = "0.1.88" -atoma-auth = { path = "./atoma-auth" } -atoma-proxy-service = { path = "./atoma-proxy-service" } -atoma-state = { path = "./atoma-state" } -atoma-p2p = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-p2p", branch = "main" } -atoma-sui = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-sui", branch = "main" } -atoma-utils = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-utils", branch = "main" } -axum = "0.7.7" -base64 = "0.22.1" -bcs = "0.1.6" -blake2 = "0.10.6" -blake3 = "1.6.1" -chrono = "=0.4.39" -clap = "4.5.31" -config = "0.14.1" -fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "69d496c71fb37e3d22fe85e5bbfd4256d61422b9", package = "fastcrypto" } -fastcrypto-zkp = { git = "https://github.com/MystenLabs/fastcrypto", rev = "69d496c71fb37e3d22fe85e5bbfd4256d61422b9", package = "fastcrypto-zkp" } -fastrand = "2.3.0" -flume = "0.11.1" -futures = "0.3.31" -hex = "0.4.3" -hf-hub = "0.3.2" -isocountry = "0.3.2" -itertools = "0.14.0" -jsonwebtoken = "9.3.0" -tracing-loki = "0.2.6" -mockito = "1.6.1" -remote-attestation = { git = "https://github.com/atoma-network/nvrust", branch = "main" } -once_cell = "1.21.0" -opentelemetry = "0.27.1" -opentelemetry-otlp = "0.27.0" -opentelemetry_sdk = "0.27.1" -prometheus = "0.13.4" -pem = "3.0.5" -proptest = "1.6.0" -rand = "0.8.5" -regex = "1.11.1" -reqwest = "0.12.12" -rsa = "0.9.7" -serde = "1.0.214" -serde_json = "1.0.140" -serde_yaml = "0.9.34" -serial_test = "3.1.1" -shared-crypto = { git = "https://github.com/mystenlabs/sui", package = "shared-crypto", tag = "testnet-v1.45.2" } -sqlx = { version = "0.8.2", features = [ - "postgres", - "runtime-tokio-native-tls", -] } -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" } -sui-sdk-types = "0.0.2" -thiserror = "2.0.12" -tokenizers = "0.21.0" -tokio = "1.41.0" -toml = "0.8.19" -tonic = "0.12" -tower = "0.5.1" -tower-http = "0.6.2" -tracing = "0.1.40" -tracing-appender = "0.2.3" +anyhow = "1.0.91" +async-trait = "0.1.88" +atoma-auth = { path = "./atoma-auth" } +atoma-p2p = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-p2p", branch = "main" } +atoma-proxy-service = { path = "./atoma-proxy-service" } +atoma-state = { path = "./atoma-state" } +atoma-sui = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-sui", branch = "main" } +atoma-utils = { git = "https://github.com/atoma-network/atoma-node.git", package = "atoma-utils", branch = "main" } +axum = "0.7.7" +base64 = "0.22.1" +bcs = "0.1.6" +blake2 = "0.10.6" +blake3 = "1.6.1" +chrono = "=0.4.39" +clap = "4.5.31" +config = "0.14.1" +fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "69d496c71fb37e3d22fe85e5bbfd4256d61422b9", package = "fastcrypto" } +fastcrypto-zkp = { git = "https://github.com/MystenLabs/fastcrypto", rev = "69d496c71fb37e3d22fe85e5bbfd4256d61422b9", package = "fastcrypto-zkp" } +fastrand = "2.3.0" +flume = "0.11.1" +futures = "0.3.31" +hex = "0.4.3" +hf-hub = "0.3.2" +isocountry = "0.3.2" +itertools = "0.14.0" +jsonwebtoken = "9.3.0" +mockito = "1.6.1" +once_cell = "1.21.0" +opentelemetry = "0.27.1" +opentelemetry-otlp = "0.27.0" +opentelemetry_sdk = "0.27.1" +pem = "3.0.5" +prometheus = "0.13.4" +proptest = "1.6.0" +rand = "0.8.5" +regex = "1.11.1" +remote-attestation = { git = "https://github.com/atoma-network/nvrust", branch = "main" } +reqwest = "0.12.12" +rsa = "0.9.7" +serde = "1.0.214" +serde_json = "1.0.140" +serde_yaml = "0.9.34" +serial_test = "3.1.1" +shared-crypto = { git = "https://github.com/mystenlabs/sui", package = "shared-crypto", tag = "testnet-v1.45.2" } +sqlx = { version = "0.8.2", features = [ "postgres", "runtime-tokio-native-tls" ] } +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" } +sui-sdk-types = "0.0.2" +thiserror = "2.0.12" +tokenizers = "0.21.0" +tokio = "1.41.0" +toml = "0.8.19" +tonic = "0.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.2.0" -utoipa-swagger-ui = "8.0.3" -uuid = "1.15.1" -x25519-dalek = "2.0.1" -zeroize = "1.8.1" +tracing-subscriber = "0.3.18" +url = "2.5.4" +utoipa = "5.2.0" +utoipa-swagger-ui = "8.0.3" +uuid = "1.15.1" +x25519-dalek = "2.0.1" +zeroize = "1.8.1" diff --git a/atoma-auth/Cargo.toml b/atoma-auth/Cargo.toml index 34127e05..5cf228e7 100644 --- a/atoma-auth/Cargo.toml +++ b/atoma-auth/Cargo.toml @@ -1,39 +1,39 @@ [package] -name = "atoma-auth" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-auth" +version.workspace = true [dependencies] -anyhow.workspace = true -atoma-state.workspace = true -atoma-sui.workspace = true -atoma-utils.workspace = true -base64.workspace = true -bcs.workspace = true -blake2.workspace = true -chrono.workspace = true -config.workspace = true -fastcrypto.workspace = true +anyhow.workspace = true +atoma-state.workspace = true +atoma-sui.workspace = true +atoma-utils.workspace = true +base64.workspace = true +bcs.workspace = true +blake2.workspace = true +chrono.workspace = true +config.workspace = true +fastcrypto.workspace = true fastcrypto-zkp.workspace = true -flume.workspace = true -hex.workspace = true -itertools.workspace = true -jsonwebtoken.workspace = true -pem.workspace = true -rand.workspace = true -regex.workspace = true -reqwest.workspace = true -rsa.workspace = true -serde = { workspace = true, features = ["derive"] } -serde_json.workspace = true -shared-crypto.workspace = true -sui-keys.workspace = true -sui-sdk.workspace = true -sui-sdk-types = { workspace = true, features = ["serde"] } -thiserror.workspace = true -tokio.workspace = true -tracing.workspace = true +flume.workspace = true +hex.workspace = true +itertools.workspace = true +jsonwebtoken.workspace = true +pem.workspace = true +rand.workspace = true +regex.workspace = true +reqwest.workspace = true +rsa.workspace = true +serde = { workspace = true, features = [ "derive" ] } +serde_json.workspace = true +shared-crypto.workspace = true +sui-keys.workspace = true +sui-sdk.workspace = true +sui-sdk-types = { workspace = true, features = [ "serde" ] } +thiserror.workspace = true +tokio.workspace = true +tracing.workspace = true [features] -google-oauth = [] +google-oauth = [ ] diff --git a/atoma-proxy-service/Cargo.toml b/atoma-proxy-service/Cargo.toml index 5c287d4d..99ee4249 100644 --- a/atoma-proxy-service/Cargo.toml +++ b/atoma-proxy-service/Cargo.toml @@ -1,31 +1,31 @@ [package] -name = "atoma-proxy-service" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-proxy-service" +version.workspace = true [dependencies] -anyhow.workspace = true -atoma-auth.workspace = true -atoma-state.workspace = true -atoma-sui.workspace = true -axum.workspace = true -base64.workspace = true -chrono.workspace = true -config.workspace = true -rand.workspace = true -reqwest.workspace = true -serde = { workspace = true, features = ["derive"] } -serde_yaml = { workspace = true } -serde_json.workspace = true -sui-sdk.workspace = true -thiserror = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tower-http = { workspace = true, features = ["cors"] } +anyhow.workspace = true +atoma-auth.workspace = true +atoma-state.workspace = true +atoma-sui.workspace = true +axum.workspace = true +base64.workspace = true +chrono.workspace = true +config.workspace = true +rand.workspace = true +reqwest.workspace = true +serde = { workspace = true, features = [ "derive" ] } +serde_json.workspace = true +serde_yaml = { workspace = true } +sui-sdk.workspace = true +thiserror = { workspace = true } +tokio = { workspace = true, features = [ "full" ] } +tower-http = { workspace = true, features = [ "cors" ] } +tracing.workspace = true tracing-subscriber.workspace = true -tracing.workspace = true -utoipa = { workspace = true, features = ["axum_extras"] } -utoipa-swagger-ui = { workspace = true } +utoipa = { workspace = true, features = [ "axum_extras" ] } +utoipa-swagger-ui = { workspace = true } [features] -google-oauth = ["atoma-auth/google-oauth"] +google-oauth = [ "atoma-auth/google-oauth" ] diff --git a/atoma-proxy/Cargo.toml b/atoma-proxy/Cargo.toml index 61b7b49c..25fb083c 100644 --- a/atoma-proxy/Cargo.toml +++ b/atoma-proxy/Cargo.toml @@ -1,8 +1,8 @@ [package] -name = "atoma-proxy" -version.workspace = true edition.workspace = true license.workspace = true +name = "atoma-proxy" +version.workspace = true [dependencies] anyhow.workspace = true @@ -13,7 +13,7 @@ atoma-proxy-service.workspace = true atoma-state.workspace = true atoma-sui.workspace = true atoma-utils.workspace = true -axum = { workspace = true, features = ["json"] } +axum = { workspace = true, features = [ "json" ] } base64 = { workspace = true } blake2.workspace = true clap.workspace = true @@ -23,23 +23,18 @@ flume.workspace = true futures = { workspace = true } hf-hub = { workspace = true } once_cell = "1.21" -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", + "metrics", + "tls", + "trace", ] } +opentelemetry_sdk = { workspace = true, features = [ "logs", "metrics", "rt-tokio", "trace" ] } rand = { workspace = true } -reqwest = { workspace = true, features = ["json"] } -serde = { workspace = true, features = ["derive"] } +reqwest = { workspace = true, features = [ "json" ] } +serde = { workspace = true, features = [ "derive" ] } serde_json.workspace = true serde_yaml = { workspace = true } sqlx.workspace = true @@ -47,22 +42,18 @@ sui-keys.workspace = true sui-sdk.workspace = true thiserror = { workspace = true } tokenizers = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tonic = { workspace = true, features = ["tls", "tls-roots", "prost"] } +tokio = { workspace = true, features = [ "full" ] } +tonic = { workspace = true, features = [ "prost", "tls", "tls-roots" ] } tower = { workspace = true } -tower-http = { workspace = true, features = ["cors"] } -tracing-appender.workspace = true -tracing-opentelemetry = { workspace = true } -tracing-subscriber = { workspace = true, features = [ - "env-filter", - "json", - "time", -] } +tower-http = { workspace = true, features = [ "cors" ] } tracing.workspace = true +tracing-appender.workspace = true tracing-loki = { workspace = true } -utoipa = { workspace = true, features = ["axum_extras", "preserve_path_order"] } -utoipa-swagger-ui = { workspace = true, features = ["axum"] } +tracing-opentelemetry = { workspace = true } +tracing-subscriber = { workspace = true, features = [ "env-filter", "json", "time" ] } url = { workspace = true } +utoipa = { workspace = true, features = [ "axum_extras", "preserve_path_order" ] } +utoipa-swagger-ui = { workspace = true, features = [ "axum" ] } [features] -google-oauth = ["atoma-auth/google-oauth", "atoma-proxy-service/google-oauth"] +google-oauth = [ "atoma-auth/google-oauth", "atoma-proxy-service/google-oauth" ] diff --git a/atoma-state/Cargo.toml b/atoma-state/Cargo.toml index 67729a4d..0639d100 100644 --- a/atoma-state/Cargo.toml +++ b/atoma-state/Cargo.toml @@ -1,42 +1,38 @@ [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 } -atoma-utils = { workspace = true } -blake3 = { workspace = true } -chrono.workspace = true -config = { workspace = true } -fastrand = { workspace = true } -flume = { workspace = true } -futures = { workspace = true } -hex = { workspace = true } -isocountry = { workspace = true } -mockito = { workspace = true } -prometheus = { workspace = true } +atoma-p2p = { workspace = true } +atoma-sui = { workspace = true } +atoma-utils = { workspace = true } +blake3 = { workspace = true } +chrono.workspace = true +config = { workspace = true } +fastrand = { workspace = true } +flume = { workspace = true } +futures = { workspace = true } +hex = { workspace = true } +isocountry = { workspace = true } +mockito = { workspace = true } +once_cell = { workspace = true } +opentelemetry = { workspace = true } +prometheus = { workspace = true } remote-attestation = { workspace = true } -serde = { workspace = true, features = ["derive"] } -serde_json = { workspace = true } -sqlx = { workspace = true, features = [ - "chrono", - "runtime-tokio-native-tls", - "sqlite", -] } -once_cell = { workspace = true } -opentelemetry = { workspace = true } -reqwest = { workspace = true } -thiserror = { workspace = true } -tokio = { workspace = true, features = ["full"] } -tracing = { workspace = true } -url = { workspace = true } -utoipa = { workspace = true } +reqwest = { workspace = true } +serde = { workspace = true, features = [ "derive" ] } +serde_json = { workspace = true } +sqlx = { workspace = true, features = [ "chrono", "runtime-tokio-native-tls", "sqlite" ] } +thiserror = { workspace = true } +tokio = { workspace = true, features = [ "full" ] } +tracing = { workspace = true } +url = { workspace = true } +utoipa = { workspace = true } [dev-dependencies] -futures = { workspace = true } -proptest = { workspace = true } +futures = { workspace = true } +proptest = { workspace = true } serial_test = { workspace = true } -uuid = { workspace = true } +uuid = { workspace = true } diff --git a/config.example.toml b/config.example.toml index 41cdc44d..833058dc 100644 --- a/config.example.toml +++ b/config.example.toml @@ -1,50 +1,62 @@ [atoma_sui] -http_rpc_node_addr = "https://fullnode.testnet.sui.io:443" # Sui RPC node endpoint for testnet network -atoma_db = "0x741693fc00dd8a46b6509c0c3dc6a095f325b8766e96f01ba73b668df218f859" # ATOMA database object ID on testnet -atoma_package_id = "0x0c4a52c2c74f9361deb1a1b8496698c7e25847f7ad9abfbd6f8c511e508c62a0" # ATOMA smart contract package ID on testnet -usdc_package_id = "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29" # USDC smart contract package ID on testnet -request_timeout = { secs = 300, nanos = 0 } # Maximum time to wait for RPC requests (in seconds) -max_concurrent_requests = 10 # Maximum number of simultaneous RPC requests -limit = 100 # Maximum number of items per page for paginated responses -sui_config_path = "~/.sui/sui_config/client.yaml" # Path to Sui client configuration file (default for Unix systems) -sui_keystore_path = "~/.sui/sui_config/sui.keystore" # Path to Sui keystore containing account keys (default for Unix systems) -cursor_path = "/app/data/cursor.toml" # Path to store the event cursor state +atoma_db = "0x741693fc00dd8a46b6509c0c3dc6a095f325b8766e96f01ba73b668df218f859" # ATOMA database object ID on testnet +atoma_package_id = "0x0c4a52c2c74f9361deb1a1b8496698c7e25847f7ad9abfbd6f8c511e508c62a0" # ATOMA smart contract package ID on testnet +cursor_path = "/app/data/cursor.toml" # Path to store the event cursor state +http_rpc_node_addr = "https://fullnode.testnet.sui.io:443" # Sui RPC node endpoint for testnet network +limit = 100 # Maximum number of items per page for paginated responses +max_concurrent_requests = 10 # Maximum number of simultaneous RPC requests +request_timeout = { secs = 300, nanos = 0 } # Maximum time to wait for RPC requests (in seconds) +sui_config_path = "~/.sui/sui_config/client.yaml" # Path to Sui client configuration file (default for Unix systems) +sui_keystore_path = "~/.sui/sui_config/sui.keystore" # Path to Sui keystore containing account keys (default for Unix systems) +usdc_package_id = "0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29" # USDC smart contract package ID on testnet [atoma_state] # PostgreSQL connection string. Must match ATOMA_STATE_DATABASE_URL in .env database_url = "postgresql://POSTGRES_USER:POSTGRES_PASSWORD@db:5432/POSTGRES_DB" [atoma_state.metrics_collection] -metrics_url = "" # Prometheus endpoint for metrics collection -models = [["MODALITY", "MODEL"]] # Array of [modality_type, model_id] pairs for model configuration (possible values for modality are "Chat Completions", "Embeddings" and "Images Generations") -top_k = 10 # Number of top performing nodes to return in rankings +metrics_url = "" # Prometheus endpoint for metrics collection +models = [ + [ + "MODALITY", + "MODEL", + ], +] # Array of [modality_type, model_id] pairs for model configuration (possible values for modality are "Chat Completions", "Embeddings" and "Images Generations") +top_k = 10 # Number of top performing nodes to return in rankings [atoma_service] -service_bind_address = "0.0.0.0:8080" # HTTP service binding address and port (must match docker-compose.yml) -password = "password" # Authentication password for the service API +hf_token = "" # Hugging Face API token (required for gated/private models) +modalities = [ + [ + "Chat Completions", + ], + [ + "Chat Completions", + ], +] # Supported interaction types for each model models = [ - "meta-llama/Llama-3.2-3B-Instruct", - "meta-llama/Llama-3.2-1B-Instruct", -] # List of supported LLM models by the current proxy -revisions = ["main", "main"] # Model revision/version tags (must match models array length) -modalities = [["Chat Completions"],["Chat Completions"]] # Supported interaction types for each model -hf_token = "" # Hugging Face API token (required for gated/private models) + "meta-llama/Llama-3.2-1B-Instruct", + "meta-llama/Llama-3.2-3B-Instruct", +] # List of supported LLM models by the current proxy +password = "password" # Authentication password for the service API +revisions = [ "main", "main" ] # Model revision/version tags (must match models array length) +service_bind_address = "0.0.0.0:8080" # HTTP service binding address and port (must match docker-compose.yml) [atoma_proxy_service] -service_bind_address = "0.0.0.0:8081" # Proxy service binding address and port (must match docker-compose.yml) -grafana_url = "" # Grafana instance URL for metrics visualization -grafana_api_token = "" # Grafana API token (read-only permissions required) -grafana_dashboard_tag="" # Tag to filter which Grafana dashboards to expose +grafana_api_token = "" # Grafana API token (read-only permissions required) +grafana_dashboard_tag = "" # Tag to filter which Grafana dashboards to expose +grafana_url = "" # Grafana instance URL for metrics visualization +service_bind_address = "0.0.0.0:8081" # Proxy service binding address and port (must match docker-compose.yml) [atoma_auth] -secret_key = "secret_key" # JWT signing key for token generation -access_token_lifetime = 1 # Access token validity duration in minutes +access_token_lifetime = 1 # Access token validity duration in minutes +google_client_id = "" # Google OAuth client ID (required only when google-oauth feature is enabled) refresh_token_lifetime = 1 # Refresh token validity duration in days -google_client_id="" # Google OAuth client ID (required only when google-oauth feature is enabled) +secret_key = "secret_key" # JWT signing key for token generation [atoma_p2p] -heartbeat_interval = { secs = 30, nanos = 0 } # Frequency of peer health check messages -idle_connection_timeout = { secs = 60, nanos = 0 } # Time after which inactive connections are closed +heartbeat_interval = { secs = 30, nanos = 0 } # Frequency of peer health check messages +idle_connection_timeout = { secs = 60, nanos = 0 } # Time after which inactive connections are closed # Network listening addresses for P2P communication # Supports both TCP and QUIC protocols for better reliability and performance @@ -57,19 +69,16 @@ listen_addrs = [ ] # 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" ] # DHT bootstrap nodes for initial P2P network discovery bootstrap_nodes = [ + "12D3KooWKnDdG3iXw9eTFijk3EWSunZcFi54Zka4wmtqtt6rPxc8", "QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", "QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", "QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", "QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", - "12D3KooWKnDdG3iXw9eTFijk3EWSunZcFi54Zka4wmtqtt6rPxc8", ] -metrics_endpoints = {} # Should be empty +metrics_endpoints = {} # Should be empty # The path to the local key local_key = "/app/data/local_key" diff --git a/deny.toml b/deny.toml index 4fe9d513..4d1b4fa8 100644 --- a/deny.toml +++ b/deny.toml @@ -7,29 +7,29 @@ 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", - # 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", - # protobuf crash due to uncontrolled recursion - "RUSTSEC-2024-0437", - # ring AES functions may panic with overflow checking - "RUSTSEC-2025-0009", - # ring unmaintained (older versions) - "RUSTSEC-2025-0010", - # paste is unmaintained - "RUSTSEC-2024-0436", + # These are all related to the sui SDK, which is outside of our control + # derivative is not maintained + "RUSTSEC-2024-0388", + # 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", + # protobuf crash due to uncontrolled recursion + "RUSTSEC-2024-0437", + # ring AES functions may panic with overflow checking + "RUSTSEC-2025-0009", + # ring unmaintained (older versions) + "RUSTSEC-2025-0010", + # paste is unmaintained + "RUSTSEC-2024-0436", ] # Threshold for security vulnerabilities, any vulnerability with a CVSS score # lower than the range specified will be ignored. Note that ignored advisories @@ -51,19 +51,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 @@ -74,24 +74,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 @@ -143,21 +143,14 @@ 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/nvrust", + "https://github.com/asonnino/prometheus-parser", + "https://github.com/atoma-network/nvrust", + "https://github.com/zhiburt/tabled", ] [sources.allow-org] -github = [ - "mystenmark", - "bmwill", - "mystenlabs", - "nextest-rs", - "rustls", - "atoma-network", -] +github = [ "atoma-network", "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..96219fee --- /dev/null +++ b/taplo.toml @@ -0,0 +1,25 @@ +[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