Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Dec 19, 2023
1 parent dfa0247 commit 0e793db
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ const MAX_GOSSIPINPUT_CACHE = 5;
// ssz.deneb.BlobSidecars.elementType.fixedSize, 131256 is size for mainnet preset;
const BLOBSIDECAR_FIXED_SIZE = ssz.deneb.BlobSidecars.elementType.fixedSize ?? 131256;

/**
* SeenGossipBlockInput tracks and caches the live blobs and blocks on the network to solve data availability
* for the blockInput. If no block has been seen yet for some already seen blobs, it responds will null, but
* on the first block or the consequent blobs it responds with blobs promise till all blobs become available.
*
* One can start processing block on blobs promise blockInput response and can await on the promise before
* fully importing the block. The blobs promise is gets resolved as soon as all blobs corresponding to that
* block are seen by SeenGossipBlockInput
*/
export class SeenGossipBlockInput {
private blockInputCache = new Map<RootHex, BlockInputCacheType>();

Expand Down

0 comments on commit 0e793db

Please sign in to comment.