Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Integrations): P2P-Persistence integration #15

Merged
merged 6 commits into from
Jan 26, 2023

Conversation

deblasis
Copy link
Contributor

Short description about P2P - Persistence integration and also scaffolding for similar documentation.

Origin: pokt-network/pocket#271

CC: @andrewnguyen22

Short description about P2P - Persistence integration and also scaffolding for similar documentation.

 Origin: pokt-network/pocket#271
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor comments, but in general, I will contribute to this as well.

integrations/README.md Outdated Show resolved Hide resolved
integrations/README.md Outdated Show resolved Hide resolved
An application `Bus` serves as a cross-cutting integration medium.
Without going too much into technical details, its main features for the purposes of this document are:

- acts as a service discovery layer, allowing to get instances of a module from within another
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add details that point #1 is "synchronous communication" and point #2 is "asynchronous communication".

We could even copy-pasta the mermaid diagram from the implementation repo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your points but perhaps this document should be less "loaded" with technicalities and try to explain things in simpler terms, good enough to have an idea of how it works at a high level

Regarding the diagram, if we copy-pasta it, we would have to keep track of it and keep them aligned.

I am sure that whoever reads this and is interested in how it works under the hood, they already pulled the main repo, probably as a first step actually.

Lemme know where your mind is at. Maybe we could ask Jess' point of view on this. I guess her input would be valuable. (not tagging her on purpose in the meantime).

My 2c. Let's keep it simple, actually, I was thinking that it might sound even too technical already perhaps 🤔

Copy link
Member

@Olshansk Olshansk Jan 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. This whole thing spec needs a revamp and I personally think pokt-network/pocket#438 does a better job at introducing the P2P module.

There will be more changes as we also have decided to adopt LibP2P.

  • I've done an initial "revamp" of persistence (but will need another one in the future)
  • Utility is in progress
  • @bryanchriswhite should be able to take p2p on over time
  • The bus & intermodule DI-like bus-like design will evolve over time as well. @deblasis 👀
  • Looking at @gokutheengineer for consensus

After we launch V1 (and have real data), we can write a single whitepaper capturing everything and publish on arxiv :)

integrations/README.md Show resolved Hide resolved
integrations/README.md Outdated Show resolved Hide resolved

Regardless of the underlying algorithm, `P2P` is a stateful business, there's state that has to be stored in memory (RAM) but there's also state that has to be persisted on the blockchain.

In particular, when it comes `Network Churn` where `Actors` such as `Validators` are involved, joining and leaving the network, P2P has to integrate with Persistence in order to keep track of which actors were part of the network at that point in time (`Height` in Protocol terms).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Should we backticket P2P and Persistence?

integrations/README.md Outdated Show resolved Hide resolved
@Olshansk
Copy link
Member

@deblasis Should we finish this off?

@Olshansk Olshansk added the documentation Improvements or additions to documentation label Jan 26, 2023
integrations/README.md Outdated Show resolved Hide resolved
@deblasis
Copy link
Contributor Author

@deblasis Should we finish this off?

@Olshansk PTAL

@deblasis deblasis merged commit f6661f1 into pokt-network:main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants