diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c16a09e921e..c8a3b4128d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,8 @@ jobs: args: --all-targets --all-features - command: check args: --all-targets + - command: doc + args: --all-features --workspace - command: make args: check --locked - command: test diff --git a/CHANGELOG.md b/CHANGELOG.md index e723b587546..682df211ee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Description of the upcoming release here. - [#1591](https://github.com/FuelLabs/fuel-core/pull/1591): Simplify libp2p dependencies and not depend on all sub modules directly. - [#1585](https://github.com/FuelLabs/fuel-core/pull/1585): Let `NetworkBehaviour` macro generate `FuelBehaviorEvent` in p2p - [#1577](https://github.com/FuelLabs/fuel-core/pull/1577): Moved insertion of sealed blocks into the `BlockImporter` instead of the executor. +- [#1601](https://github.com/FuelLabs/fuel-core/pull/1601): Fix formatting in docs and check that `cargo doc` passes in the CI. #### Breaking - [#1593](https://github.com/FuelLabs/fuel-core/pull/1593) Make `Block` type a version-able enum diff --git a/bin/e2e-test-client/src/config.rs b/bin/e2e-test-client/src/config.rs index 456bd34b9ba..9d537043351 100644 --- a/bin/e2e-test-client/src/config.rs +++ b/bin/e2e-test-client/src/config.rs @@ -17,7 +17,7 @@ pub struct SuiteConfig { /// The primary endpoint to connect to pub endpoint: String, /// Max timeout for syncing between wallets - /// Default is [`SYNC_TIMEOUT`](crate::SYNC_TIMEOUT) + /// Default is [`SYNC_TIMEOUT`] #[serde(with = "humantime_serde")] pub wallet_sync_timeout: Duration, /// Enable slower but more stressful tests. Should be used in full E2E tests but not in CI. diff --git a/crates/fuel-core/src/coins_query.rs b/crates/fuel-core/src/coins_query.rs index 254e5f1b7f3..a7e042d1e45 100644 --- a/crates/fuel-core/src/coins_query.rs +++ b/crates/fuel-core/src/coins_query.rs @@ -89,7 +89,7 @@ impl SpendQuery { }) } - /// Return [`Asset`]s. + /// Return `Asset`s. pub fn assets(&self) -> &Vec { &self.query_per_asset } diff --git a/crates/fuel-core/src/database.rs b/crates/fuel-core/src/database.rs index 29ace79dcd1..15151aa063f 100644 --- a/crates/fuel-core/src/database.rs +++ b/crates/fuel-core/src/database.rs @@ -150,7 +150,7 @@ pub enum Column { ContractsStateMerkleData = 23, /// See [`ContractsStateMerkleMetadata`](storage::ContractsStateMerkleMetadata) ContractsStateMerkleMetadata = 24, - /// See [`ProcessedTransactions`](storage::ProcessedTransactions) + /// See [`ProcessedTransactions`](fuel_core_storage::tables::ProcessedTransactions) ProcessedTransactions = 25, } diff --git a/crates/fuel-core/src/database/storage.rs b/crates/fuel-core/src/database/storage.rs index 2c2c5333c6e..872328a74e1 100644 --- a/crates/fuel-core/src/database/storage.rs +++ b/crates/fuel-core/src/database/storage.rs @@ -93,7 +93,7 @@ impl Mappable for FuelBlockMerkleData { type OwnedValue = Self::Value; } -/// The metadata table for [`FuelBlockMerkleData`](FuelBlockMerkleData) table. +/// The metadata table for [`FuelBlockMerkleData`] table. pub struct FuelBlockMerkleMetadata; impl Mappable for FuelBlockMerkleMetadata { @@ -113,7 +113,7 @@ impl Mappable for ContractsAssetsMerkleData { type OwnedValue = Self::Value; } -/// The metadata table for [`ContractsAssetsMerkleData`](ContractsAssetsMerkleData) table +/// The metadata table for [`ContractsAssetsMerkleData`] table pub struct ContractsAssetsMerkleMetadata; impl Mappable for ContractsAssetsMerkleMetadata { @@ -133,7 +133,7 @@ impl Mappable for ContractsStateMerkleData { type OwnedValue = Self::Value; } -/// The metadata table for [`ContractsStateMerkleData`](ContractsStateMerkleData) table +/// The metadata table for [`ContractsStateMerkleData`] table pub struct ContractsStateMerkleMetadata; impl Mappable for ContractsStateMerkleMetadata { diff --git a/crates/fuel-core/src/service.rs b/crates/fuel-core/src/service.rs index 3d5240cab28..da7f9554e63 100644 --- a/crates/fuel-core/src/service.rs +++ b/crates/fuel-core/src/service.rs @@ -122,7 +122,7 @@ impl FuelService { } #[cfg(feature = "relayer")] - /// Wait for the [`Relayer`] to be in sync with + /// Wait for the Relayer to be in sync with /// the data availability layer. /// /// Yields until the relayer reaches a point where it diff --git a/crates/services/p2p/src/config.rs b/crates/services/p2p/src/config.rs index 6f5f6198b58..242e208abe3 100644 --- a/crates/services/p2p/src/config.rs +++ b/crates/services/p2p/src/config.rs @@ -74,7 +74,7 @@ pub struct Config { /// Name of the Network pub network_name: String, - /// Checksum is a hash(sha256) of [`Genesis`](fuel_core_types::blockchain::consensus::Genesis) - chain id. + /// Checksum is a hash(sha256) of [`Genesis`] - chain id. pub checksum: Checksum, /// IP address for Swarm to listen on diff --git a/crates/services/p2p/src/gossipsub/messages.rs b/crates/services/p2p/src/gossipsub/messages.rs index f47e40b6266..07070685991 100644 --- a/crates/services/p2p/src/gossipsub/messages.rs +++ b/crates/services/p2p/src/gossipsub/messages.rs @@ -14,7 +14,7 @@ pub enum GossipTopicTag { NewTx, } -/// Takes Arc and wraps it in a matching GossipsubBroadcastRequest +/// Takes `Arc` and wraps it in a matching GossipsubBroadcastRequest /// The inner referenced value is serialized and broadcast to the network /// It is deserialized as `GossipsubMessage` #[derive(Debug, Clone)] diff --git a/crates/services/p2p/src/p2p_service.rs b/crates/services/p2p/src/p2p_service.rs index 0bc9ab8c9fe..afb2c9cf8e6 100644 --- a/crates/services/p2p/src/p2p_service.rs +++ b/crates/services/p2p/src/p2p_service.rs @@ -106,7 +106,7 @@ pub struct FuelP2PService { /// It will send it to the specified Peer via its unique ResponseChannel inbound_requests_table: HashMap>, - /// NetworkCodec used as for encoding and decoding of Gossipsub messages + /// NetworkCodec used as `` for encoding and decoding of Gossipsub messages network_codec: PostcardCodec, /// Stores additional p2p network info diff --git a/crates/services/relayer/src/service.rs b/crates/services/relayer/src/service.rs index 7e6521754ba..dea48770420 100644 --- a/crates/services/relayer/src/service.rs +++ b/crates/services/relayer/src/service.rs @@ -249,7 +249,7 @@ where } impl SharedState { - /// Wait for the [`Task`] to be in sync with + /// Wait for the `Task` to be in sync with /// the data availability layer. /// /// Yields until the relayer reaches a point where it diff --git a/crates/services/src/service.rs b/crates/services/src/service.rs index ef084e0496a..14cb155fa4e 100644 --- a/crates/services/src/service.rs +++ b/crates/services/src/service.rs @@ -14,7 +14,7 @@ use futures::FutureExt; use tokio::sync::watch; use tracing::Instrument; -/// Alias for Arc +/// Alias for `Arc` pub type Shared = std::sync::Arc; /// A mutex that can safely be in async contexts and avoids deadlocks. diff --git a/crates/storage/src/tables.rs b/crates/storage/src/tables.rs index 27f5cb2fb23..8ee22584dbd 100644 --- a/crates/storage/src/tables.rs +++ b/crates/storage/src/tables.rs @@ -79,8 +79,7 @@ impl Mappable for SealedBlockConsensus { type OwnedValue = Consensus; } -/// The storage table of coins. Each -/// [`CompressedCoin`](fuel_core_types::entities::coins::coin::CompressedCoin) +/// The storage table of coins. Each [`CompressedCoin`] /// is represented by unique `UtxoId`. pub struct Coins; @@ -91,7 +90,7 @@ impl Mappable for Coins { type OwnedValue = CompressedCoin; } -/// The storage table of bridged Ethereum [`Message`](crate::model::Message)s. +/// The storage table of bridged Ethereum message. pub struct Messages; impl Mappable for Messages { @@ -101,7 +100,7 @@ impl Mappable for Messages { type OwnedValue = Message; } -/// The storage table that indicates if the [`Message`](crate::model::Message) is spent or not. +/// The storage table that indicates if the message is spent or not. pub struct SpentMessages; impl Mappable for SpentMessages { diff --git a/crates/types/src/blockchain/consensus/poa.rs b/crates/types/src/blockchain/consensus/poa.rs index 92192f43ad8..44800fd5363 100644 --- a/crates/types/src/blockchain/consensus/poa.rs +++ b/crates/types/src/blockchain/consensus/poa.rs @@ -7,7 +7,7 @@ use crate::fuel_crypto::Signature; /// The consensus related data that doesn't live on the /// header. pub struct PoAConsensus { - /// The signature of the [`FuelBlockHeader`]. + /// The signature of the `FuelBlockHeader`. pub signature: Signature, } diff --git a/crates/types/src/blockchain/header.rs b/crates/types/src/blockchain/header.rs index 68497d3f30c..101fee78364 100644 --- a/crates/types/src/blockchain/header.rs +++ b/crates/types/src/blockchain/header.rs @@ -57,7 +57,7 @@ pub struct ApplicationHeader { /// to have some rules in place to ensure the block number was chosen in a reasonable way. For /// example, they should verify that the block number satisfies the finality requirements of the /// layer 1 chain. They should also verify that the block number isn't too stale and is increasing. - /// Some similar concerns are noted in this issue: https://github.com/FuelLabs/fuel-specs/issues/220 + /// Some similar concerns are noted in this issue: pub da_height: DaBlockHeight, /// Generated application fields. pub generated: Generated, diff --git a/crates/types/src/services/executor.rs b/crates/types/src/services/executor.rs index 8f48c815e79..95efa755b77 100644 --- a/crates/types/src/services/executor.rs +++ b/crates/types/src/services/executor.rs @@ -85,11 +85,11 @@ pub enum ExecutionTypes { } /// Starting point for executing a block. Production starts with a [`PartialFuelBlock`]. -/// Validation starts with a full [`FuelBlock`]. +/// Validation starts with a full `FuelBlock`. pub type ExecutionBlock = ExecutionTypes; impl

ExecutionTypes { - /// Get the hash of the full [`FuelBlock`] if validating. + /// Get the hash of the full `FuelBlock` if validating. pub fn id(&self) -> Option { match self { ExecutionTypes::DryRun(_) => None, diff --git a/crates/types/src/services/p2p.rs b/crates/types/src/services/p2p.rs index 6907ba8e0eb..8cd98385c0d 100644 --- a/crates/types/src/services/p2p.rs +++ b/crates/types/src/services/p2p.rs @@ -160,7 +160,7 @@ impl FromStr for PeerId { impl PeerId { /// Bind the PeerId and given data of type T together to generate a - /// SourcePeer + /// `SourcePeer` pub fn bind(self, data: T) -> SourcePeer { SourcePeer { peer_id: self,