From 56dcce1ed1428274ab114e6c389bd4755ce4dd1a Mon Sep 17 00:00:00 2001 From: Ganesha Upadhyaya Date: Tue, 24 Oct 2023 09:32:49 -0500 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Hlib Kanunnikov --- p2p/p2p.md | 2 +- specs/src/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/p2p.md b/p2p/p2p.md index 4f207d06..c1e6a830 100644 --- a/p2p/p2p.md +++ b/p2p/p2p.md @@ -87,7 +87,7 @@ type Head[H Header[H]] interface { } ``` -`Head()` method requests the latest header from trusted peers. The `Head()` requests utilizes 90% of the set deadline (in the form of context deadline) for requests and remaining for determining the best head from gathered responses. The `Head()` call also allows passing an optional `TrustedHead` which allows the caller to specify a trusted header against which the untrusted headers received from a list of tracked peers (limited to `maxUntrustedHeadRequests` of 4) can be verified against, in the absence of trusted peers. Upon receiving headers from peers (either trusted or tracked), the best head is determined as the head: +`Head()` method requests the latest header from trusted or tracked peers. The `Head()` call also allows passing an optional `TrustedHead`, which allows the caller to specify a trusted head against which the untrusted head is verified. By default, `Head()` requests only trusted peers and if `TrustedHead` is provided untrusted tracked peers are also requested (limited to `maxUntrustedHeadRequests` of 4). The `Head()` requests utilize 90% of the set deadline (in the form of context deadline) for requests and the remaining for determining the best head from gathered responses. Upon receiving headers from peers (either trusted or tracked), the best head is determined as the head: * with max height among the received * which is received from at least `minHeadResponses` of 2 peers diff --git a/specs/src/README.md b/specs/src/README.md index 285d47eb..017e76c3 100644 --- a/specs/src/README.md +++ b/specs/src/README.md @@ -2,7 +2,7 @@ Welcome to the go-header Specifications. -go-header is a library for syncing blockchain data such as block headers over the P2P network. It contains services for requesting and receiving headers from the P2P network, serving header requests from other nodes in the P2P network, storing headers, and syncing historical headers in case of fallbacks. +go-header is a library for syncing blockchain data, such as block headers, over the P2P network in a trust-minimized way. It contains services for requesting and receiving headers from the P2P network, serving header requests from other nodes in the P2P network, storing headers, and syncing historical headers in case of fallbacks. |Component|Description| |---|---|