From d38289932f248a1f47f14e14a28486b91b6cd87a Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 15 Feb 2025 14:48:06 +0300 Subject: [PATCH 1/3] lib.rs --- common/unused_port/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/unused_port/src/lib.rs b/common/unused_port/src/lib.rs index 4a8cf17..4aa4770 100644 --- a/common/unused_port/src/lib.rs +++ b/common/unused_port/src/lib.rs @@ -11,7 +11,7 @@ pub fn unused_tcp_port() -> Result { unused_port(Transport::Tcp) } -/// A convenience function for `unused_port(Transport::Tcp)`. +/// A convenience function for `unused_port(Transport::Udp)`. pub fn unused_udp_port() -> Result { unused_port(Transport::Udp) } From 5a6f1329346f174481403e5d703e71add371858f Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 15 Feb 2025 14:53:06 +0300 Subject: [PATCH 2/3] architecture.md --- docs/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture.md b/docs/architecture.md index b988e58..4e67033 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -4,7 +4,7 @@ ZeroGravity system consists of a data availability layer (0G DA) on top of a decentralized storage system (0G Storage). There is a separate consensus network that is part of both the 0G DA and the 0G Storage. For 0G Storage, the consensus is responsible for determining the ordering of the uploaded data blocks, realizing the storage mining verification and the corresponding incentive mechanism through smart contracts. -Figure 1 illustrates the architecture of the 0G system. When a data block enters the 0G DA, it is first erasure coded and organized into multiple consecutive chunks through erasure coding. The merkle root as a commitment of the encoded data block is then submitted to the consensus layer to keep the order of the data entering the system. The chunks are then dispersed to different storage nodes in 0G Storage where the data may be further replicated to other nodes depending on the storage fee that the user pays. The storage nodes periodically participate the mining process by interacting with the consensus network to accrue rewards from the system. +Figure 1 illustrates the architecture of the 0G system. When a data block enters the 0G DA, it is first erasure coded and organized into multiple consecutive chunks through erasure coding. The merkle root as a commitment of the encoded data block is then submitted to the consensus layer to keep the order of the data entering the system. The chunks are then dispersed to different storage nodes in 0G Storage where the data may be further replicated to other nodes depending on the storage fee that the user pays. The storage nodes periodically participate in the mining process by interacting with the consensus network to accrue rewards from the system.

Figure 1. The Architecture of 0G System

From 341bf016e77b7e135dc7513c5828f40c26c2714e Mon Sep 17 00:00:00 2001 From: Eric Date: Sat, 15 Feb 2025 15:00:20 +0300 Subject: [PATCH 3/3] chunk_write_control.rs --- node/chunk_pool/src/mem_pool/chunk_write_control.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/chunk_pool/src/mem_pool/chunk_write_control.rs b/node/chunk_pool/src/mem_pool/chunk_write_control.rs index 768c149..bf5c1e7 100644 --- a/node/chunk_pool/src/mem_pool/chunk_write_control.rs +++ b/node/chunk_pool/src/mem_pool/chunk_write_control.rs @@ -13,7 +13,7 @@ enum SlotStatus { } /// Sliding window is used to control the concurrent uploading process of a file. -/// Bounded window allows segments to be uploaded concurrenly, while having a capacity +/// Bounded window allows segments to be uploaded concurrently, while having a capacity /// limit on writing threads per file. Meanwhile, the left_boundary field records /// how many segments have been uploaded. struct CtrlWindow { @@ -165,7 +165,7 @@ impl ChunkPoolWriteCtrl { if file_ctrl.total_segments != total_segments { bail!( - "file size in segment doesn't match with file size declared in previous segment. Previous total segments:{}, current total segments:{}s", + "file size in segment doesn't match with file size declared in previous segment. Previous total segments:{}, current total segments:{}", file_ctrl.total_segments, total_segments );