From a2f0a399d24177725ffb6249b0b5df71175f554d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:58:10 +0000 Subject: [PATCH 1/3] chore(deps): bump clap from 4.5.42 to 4.5.43 Bumps [clap](https://github.com/clap-rs/clap) from 4.5.42 to 4.5.43. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.42...clap_complete-v4.5.43) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.43 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b36d7d14..adbc9ee0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1636,9 +1636,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.42" +version = "4.5.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882" +checksum = "50fd97c9dc2399518aa331917ac6f274280ec5eb34e555dd291899745c48ec6f" dependencies = [ "clap_builder", "clap_derive", @@ -1646,9 +1646,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.42" +version = "4.5.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966" +checksum = "c35b5830294e1fa0462034af85cc95225a4cb07092c088c55bda3147cfcd8f65" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 463906ac..1f52d3d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ blake3 = "1.8.2" bytes = "1.10.0" chrono = "0.4.41" ciborium = "0.2.2" -clap = "4.5.41" +clap = "4.5.43" config = "0.14.0" dashmap = "6.1.0" dotenvy = "0.15.7" From 656a4250b18bbd97abb6e9a9a9092889fa818069 Mon Sep 17 00:00:00 2001 From: Jorge Antonio Date: Sun, 24 Aug 2025 15:54:14 +0100 Subject: [PATCH 2/3] clippy --- atoma-sui/src/client.rs | 80 ++++++++++++++++++------------------- atoma-sui/src/subscriber.rs | 28 ++++++------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/atoma-sui/src/client.rs b/atoma-sui/src/client.rs index f1eb8df7..36d12bac 100644 --- a/atoma-sui/src/client.rs +++ b/atoma-sui/src/client.rs @@ -133,9 +133,9 @@ impl Client { /// /// # Arguments /// - /// * `gas` - Optional ObjectID to use as gas for the transaction. If None, the system will + /// * `gas` - Optional `ObjectID` to use as gas for the transaction. If None, the system will /// automatically select a gas object. - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` /// constant (5,000,000 MIST = 0.005 SUI). /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's /// reference gas price. @@ -233,9 +233,9 @@ impl Client { /// /// * `model_name` - The name of the model to subscribe to /// * `echelon` - The echelon level for the subscription (0-255) - /// * `node_badge_id` - Optional ObjectID of the node badge. If None, uses the client's stored badge - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price /// /// # Returns @@ -347,11 +347,11 @@ impl Client { /// # Arguments /// /// * `task_small_id` - The small ID of the task to subscribe to - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID /// * `price_per_one_million_compute_units` - The price per compute unit the node is willing to charge - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -461,11 +461,11 @@ impl Client { /// # Arguments /// /// * `task_small_id` - The small ID of the task to update the subscription for - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID /// * `price_per_one_million_compute_units` - The new price per compute unit for the task subscription - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -582,10 +582,10 @@ impl Client { /// # Arguments /// /// * `task_small_id` - The small ID of the task to unsubscribe from - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -689,13 +689,13 @@ impl Client { /// # Arguments /// /// * `stack_small_id` - The small ID of the stack to settle - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID /// * `num_claimed_compute_units` - The number of compute units being claimed for this stack /// * `committed_stack_proof` - The proof data for the committed stack /// * `stack_merkle_leaf` - The merkle leaf data for the stack - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -815,12 +815,12 @@ impl Client { /// # Arguments /// /// * `stack_small_id` - The small ID of the stack being attested - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID /// * `committed_stack_proof` - The proof data for the committed stack /// * `stack_merkle_leaf` - The merkle leaf data for the stack - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -936,11 +936,11 @@ impl Client { /// # Arguments /// /// * `stack_small_id` - The small ID of the stack being disputed - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID /// * `committed_stack_proof` - The proof data for the committed stack that supports the dispute - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -1050,10 +1050,10 @@ impl Client { /// # Arguments /// /// * `settled_ticket_ids` - A vector of ticket IDs that have been settled and are ready for claiming - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -1159,11 +1159,11 @@ impl Client { /// # Arguments /// /// * `stack_small_ids` - A vector of stack small IDs that have been settled and are ready for claiming - /// * `node_badge_id` - Optional Node badge ID of the node. If None, uses the client's stored badge ID + /// * `node_badge_id` - Optional `ObjectID` of the node badge. If None, uses the client's stored badge ID /// * `num_claimed_compute_units` - A vector of the number of compute units claimed for each stack - /// * `gas` - Optional ObjectID to use as gas for the transaction - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas` - Optional `ObjectID` to use as gas for the transaction + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// @@ -1304,10 +1304,10 @@ impl Client { /// * `key_rotation_counter` - The key rotation counter value /// * `device_type` - The device type identifier (as a u16) /// * `task_small_id` - Optional small ID of the task - /// * `gas` - Optional ObjectID to use as gas for the transaction. If None, the system will + /// * `gas` - Optional `ObjectID` to use as gas for the transaction. If None, the system will /// automatically select a gas object - /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to GAS_BUDGET - /// * `gas_price` - Optional gas price for the transaction. If None, uses network's reference price + /// * `gas_budget` - Optional gas budget for the transaction. If None, defaults to `GAS_BUDGET` + /// * `gas_price` - Optional gas price for the transaction. If None, uses the network's reference price /// /// # Returns /// diff --git a/atoma-sui/src/subscriber.rs b/atoma-sui/src/subscriber.rs index 13640bb4..a3485d02 100644 --- a/atoma-sui/src/subscriber.rs +++ b/atoma-sui/src/subscriber.rs @@ -142,26 +142,26 @@ impl Subscriber { ) } - /// Builds a SuiClient based on the provided configuration. + /// Builds a `SuiClient` based on the provided configuration. /// - /// This asynchronous method creates a new SuiClient instance using the settings - /// specified in the AtomaSuiConfig. It sets up the client with the + /// This asynchronous method creates a new `SuiClient` instance using the settings + /// specified in the `AtomaSuiConfig`. It sets up the client with the /// configured request timeout and HTTP RPC node address. /// /// # Arguments /// - /// * `config` - A reference to a AtomaSuiConfig containing the necessary + /// * `config` - A reference to a `AtomaSuiConfig` containing the necessary /// configuration parameters. /// /// # Returns /// - /// * `Result` - A Result containing the newly created SuiClient if successful, - /// or a SuiEventSubscriberError if the client creation fails. + /// * `Result` - A `Result` containing the newly created `SuiClient` if successful, + /// or a `SuiEventSubscriberError` if the client creation fails. /// /// # Errors /// /// This function will return an error if: - /// * The SuiClient cannot be built with the provided configuration. + /// * The `SuiClient` cannot be built with the provided configuration. /// * There's a network issue when connecting to the specified RPC node. #[instrument(level = "info", skip_all, fields( http_rpc_node_addr = %config.http_rpc_node_addr() @@ -188,7 +188,7 @@ impl Subscriber { /// - Queries for new events using the configured filter and cursor /// - Parses and filters events based on node and task IDs /// - Forwards relevant events to the state manager - /// - Updates the cursor periodically (every CURSOR_FILE_UPDATE_ITERATIONS) + /// - Updates the cursor periodically (every `CURSOR_FILE_UPDATE_ITERATIONS`) /// - Implements backoff when no new events are available /// /// 3. Shutdown Handling: @@ -202,7 +202,7 @@ impl Subscriber { /// # Errors /// /// This method may return an error if: - /// * There's a failure in building the Sui client + /// * There's a failure in building the `SuiClient` /// * Event querying encounters an error /// * Stack retrieval operations fail /// * Event processing fails @@ -212,7 +212,7 @@ impl Subscriber { /// # Errors /// /// This method may return an error if: - /// * The Sui client cannot be built + /// * The `SuiClient` cannot be built /// * Event querying encounters an error /// * Stack retrieval operations fail /// * Event processing fails @@ -222,7 +222,7 @@ impl Subscriber { /// # Panics /// /// This method may panic if: - /// * The Sui client cannot be built + /// * The `SuiClient` cannot be built /// * Event querying encounters an error /// * Stack retrieval operations fail #[instrument(level = "trace", skip_all, fields(package_id))] @@ -433,7 +433,7 @@ impl Subscriber { /// # Examples /// /// ```rust,ignore - /// # use your_crate::{AtomaEventIdentifier, AtomaEvent, SuiEventSubscriber}; + /// # use atoma_sui::{AtomaEventIdentifier, AtomaEvent, SuiEventSubscriber}; /// # async fn example(subscriber: &SuiEventSubscriber) -> Result<(), Box> { /// let event_id = AtomaEventIdentifier::TaskRegisteredEvent; /// let event = AtomaEvent::TaskRegisteredEvent(/* ... */); @@ -686,7 +686,7 @@ async fn parse_event( } } -/// Filters an Atoma event based on a list of node small IDs. +/// Filters an `AtomaEvent` based on a list of node small IDs. /// /// This function checks if the given event is related to any of the nodes specified by their small IDs. /// For node-specific events (like registration, subscriptions, etc.), it returns true only if the @@ -694,7 +694,7 @@ async fn parse_event( /// /// # Arguments /// -/// * `event` - Reference to the Atoma event to filter +/// * `event` - Reference to the `AtomaEvent` to filter /// * `node_small_ids` - Slice containing the node small IDs to filter by /// /// # Returns From 07cefd44850d819350d33ef1b63091445d67c21b Mon Sep 17 00:00:00 2001 From: Jorge Antonio Date: Mon, 25 Aug 2025 15:20:33 +0100 Subject: [PATCH 3/3] clippy --- atoma-sui/src/subscriber.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atoma-sui/src/subscriber.rs b/atoma-sui/src/subscriber.rs index a3485d02..12bc57d0 100644 --- a/atoma-sui/src/subscriber.rs +++ b/atoma-sui/src/subscriber.rs @@ -182,7 +182,7 @@ impl Subscriber { /// /// 1. Stack Retrieval: /// - Receives transaction digests and responds with compute units information - /// - Processes StackCreatedEvents from transactions and forwards them to the state manager + /// - Processes `StackCreatedEvents` from transactions and forwards them to the state manager /// /// 2. Event Processing: /// - Queries for new events using the configured filter and cursor @@ -559,7 +559,7 @@ fn write_cursor_to_toml_file(cursor: Option, path: &str) -> Result<()> /// /// * `event` - A reference to the `AtomaEvent` enum indicating the type of event to handle /// * `value` - The serialized event data as a `serde_json::Value` -/// * `db` - A reference to the SQLite connection pool for database operations +/// * `db` - A reference to the `SQLite` connection pool for database operations /// * `node_small_ids` - A slice of node IDs that are relevant for the current context /// /// # Returns