# Gossipsub

### What is Gossipsub?

Gossipsub is a pubsub (publish/subscribe) protocol that provides the routing for messaging that can be used in blockchain environments for transaction messages that transfer value, and block messaging that update the status of the blockchain, along with other applications.

Before Gossibpsub, permissionless networks like Ethereum and Fliecoin used a messaging layer called flooding (or floodsub) to help protect against malicious attacks that would slow down or stop messaging on that network, however flooding can create a lot of redundancy because it floods the nodes in the network with messages.

Gossipsub uses a different method of communication, forwarding metadata to peers in the network, using a **lazy pull** that limits the number of peers a node communicates with, but directly sharing nodes in their network (known as an **Eager Push**), and uses a **score function** to highlight good behavior or nodes, and help flag malicious activity.

Learn more in the [GossipSub paper](https://arxiv.org/pdf/2007.02754.pdf)

### Videos

#### Demystifying libp2p Gossipsub | Ethereum Foundation - Raúl Kripalani

{% embed url="<https://www.youtube.com/watch?v=BUc4xta7Mfk>" %}

#### Gossipsub 1.1 | David Dias

A scalable, extensible & hardened P2P PubSub Router protocol | Ready Layer One - David Dias

{% embed url="<https://www.youtube.com/watch?v=H9Eb4uftrSA>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://protocol-labs.gitbook.io/launchpad-curriculum/launchpad-learning-resources/libp2p/gossipsub.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
