From 9beafe8cee4a23a77cf982de837d7b1a46701066 Mon Sep 17 00:00:00 2001 From: ginavalent Date: Mon, 14 Sep 2026 17:35:21 +0800 Subject: [PATCH] chore: minor improvement for docs Signed-off-by: ginavalent --- docs/adr/adr-002-mempool.md | 4 ++-- docs/adr/adr-003-peer-discovery.md | 2 +- docs/learn/sequencing/overview.md | 14 +++++++------- types/header.go | 4 ++-- types/tx.go | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/adr/adr-002-mempool.md b/docs/adr/adr-002-mempool.md index a040ba4aee..22cf635058 100644 --- a/docs/adr/adr-002-mempool.md +++ b/docs/adr/adr-002-mempool.md @@ -4,7 +4,7 @@ For now, mempool implementation from lazyledger-core/Tendermint will be used. ## Pros -* good integration with other re-used code (see ADR-001) +* good integration with other reused code (see ADR-001) * well tested * glue code is not required * it will be updated in case of ABCI++ adoption @@ -23,6 +23,6 @@ For now, mempool implementation from lazyledger-core/Tendermint will be used. * Implementation from scratch * time consuming * error prone -* Re-using other mempool (Celo, Prysm, etc) +* Reusing other mempool (Celo, Prysm, etc) * different API * potential licensing issues diff --git a/docs/adr/adr-003-peer-discovery.md b/docs/adr/adr-003-peer-discovery.md index cee8d59df0..2f996dc360 100644 --- a/docs/adr/adr-003-peer-discovery.md +++ b/docs/adr/adr-003-peer-discovery.md @@ -35,6 +35,6 @@ Libp2p provides multiple ways to discover peers (DHT, mDNS, PubSub peer exchange 2. Custom peer-exchange protocol. - pros: full flexibility of implementation - cons: need to create from scratch and test -3. Re-use of existing peer discovery mechanism like `discv5` +3. Reuse of existing peer discovery mechanism like `discv5` - pros: ready & battle-tested software - cons: use different network stack, requires lot of integration diff --git a/docs/learn/sequencing/overview.md b/docs/learn/sequencing/overview.md index 4e22e0952d..fb3a8f66a7 100644 --- a/docs/learn/sequencing/overview.md +++ b/docs/learn/sequencing/overview.md @@ -9,23 +9,23 @@ Sequencing is the essential first step for handling your transactions. Think of ```go // Sequencer is a generic interface for a sequencer type Sequencer interface { - // SubmitBatchTxs submits a batch of transactions to sequencer + // SubmitBatchTxs submits a batch of transactions to the sequencer // Id is the unique identifier for the target chain // Batch is the batch of transactions to submit - // returns an error if any from the sequencer + // returns any error from the sequencer SubmitBatchTxs(ctx context.Context, req SubmitBatchTxsRequest) (*SubmitBatchTxsResponse, error) - // GetNextBatch returns the next batch of transactions from sequencer to + // GetNextBatch returns the next batch of transactions from the sequencer to the chain // Id is the unique identifier for the target chain - // LastBatchHash is the cryptographic hash of the last batch received by the + // LastBatchData contains the previous batch data received by the chain // MaxBytes is the maximum number of bytes to return in the batch - // returns the next batch of transactions and an error if any from the sequencer + // returns the next batch of transactions and any error from the sequencer GetNextBatch(ctx context.Context, req GetNextBatchRequest) (*GetNextBatchResponse, error) // VerifyBatch verifies a batch of transactions received from the sequencer // Id is the unique identifier for the target chain - // BatchHash is the cryptographic hash of the batch to verify - // returns a boolean indicating if the batch is valid and an error if any from the sequencer + // BatchData contains the batch data to verify + // returns a boolean indicating whether the batch is valid and any error from the sequencer VerifyBatch(ctx context.Context, req VerifyBatchResponse) (*VerifyBatchResponse, error) } ``` diff --git a/types/header.go b/types/header.go index db18079db4..f54c602ff7 100644 --- a/types/header.go +++ b/types/header.go @@ -108,7 +108,7 @@ func (h *Header) Height() uint64 { return h.BaseHeader.Height } -// LastHeader returns last header hash of the header. +// LastHeader returns the last header hash. func (h *Header) LastHeader() Hash { return h.LastHeaderHash[:] } @@ -151,7 +151,7 @@ var ( ) // LegacyHeaderFields captures the deprecated header fields that existed prior -// to the header minimisation change. When populated, these values are re-used +// to the header minimisation change. When populated, these values are reused // while constructing the protobuf payload so that legacy nodes can continue to // verify signatures and hashes. // diff --git a/types/tx.go b/types/tx.go index d2259c157a..82b9105b7b 100644 --- a/types/tx.go +++ b/types/tx.go @@ -2,7 +2,7 @@ package types import "unsafe" -// Tx represents transaction. +// Tx represents a transaction. type Tx []byte // Txs represents a slice of transactions.