From 67c9abdae3332345ea97d338704d5420a82595e0 Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Tue, 11 Oct 2022 23:09:05 +0100 Subject: [PATCH 1/6] docs(Integrations): P2P-Persistence integration Short description about P2P - Persistence integration and also scaffolding for similar documentation. Origin: https://github.com/pokt-network/pocket/issues/271 --- README.md | 1 + integrations/README.md | 71 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 integrations/README.md diff --git a/README.md b/README.md index b74eaf0..c7446fa 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ The implementation of the protocol is accessible [here](https://github.com/pokt- - [Consensus](consensus/README.md) - [P2P](p2p/README.md) - [Persistence](persistence/README.md) +- [Cross module integrations](integrations/README.md) ## Support & Contact diff --git a/integrations/README.md b/integrations/README.md new file mode 100644 index 0000000..44abc78 --- /dev/null +++ b/integrations/README.md @@ -0,0 +1,71 @@ +# Pocket Network 1.0 Cross Module Integrations + + + + + + + + + + +
+

+ Alessandro De Blasis + @deblasis
+

+
+

+ Andrew Nguyen + @andrewnguyen22
+

+
+

+ Daniel Olshansky + @olshansky
+

+
+ + + +

+ Version 1.0.0
+

+ + + +## Overview + +In this section, we will describe in which way the various modules interact with each other. + +## Introduction + +While we proceed in the R&D of the individual modules, we need to consider that even if we are developing them in a microservice fashion, they still need to communicate with each other so that the application and therefore the Protocol itself can function as expected. + +The purpose of this document is not to highlight the capabilities of each model but to focus on the point of contact/interactions with a brief explanation about the motivation behind the integration under discussion. + +## Integrations + +### Bus + +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 +- provides access to messaging functionality (EventBus) + +### P2P - Persistence + +#### P2P AddressBook management / Network Churn + +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). + +The running instance of the P2P module in a node, keeps in memory an "Address List" of the peers and that's being updated constantly. + +Whenever the `Consensus` determines a new `Height`, an event via the `Bus` notifies its listeners (`P2P` included) that the list of the current `Actors` that are part of the network has to be stored in `Persistence`. + +Essentially, in simple terms, we can now call a function that returns the list of the Validators at a certain `Height`. + +This function is used to deliver messages that are relevant only for a specific `Height` to the relevant actors. From 33b37de53ae23cc5c5c8c48742df2c28acdc9a40 Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Thu, 26 Jan 2023 14:50:16 +0000 Subject: [PATCH 2/6] Update integrations/README.md Co-authored-by: Daniel Olshansky --- integrations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/README.md b/integrations/README.md index 44abc78..659fc32 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -62,7 +62,7 @@ Regardless of the underlying algorithm, `P2P` is a stateful business, there's st 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). -The running instance of the P2P module in a node, keeps in memory an "Address List" of the peers and that's being updated constantly. +The running instance of the P2P module in a node, keeps an in memory "Address List" of the peers that's being constantly updated. Whenever the `Consensus` determines a new `Height`, an event via the `Bus` notifies its listeners (`P2P` included) that the list of the current `Actors` that are part of the network has to be stored in `Persistence`. From 48f3ea469e2dd5bf8308e5536cd63bd7e6fdc0d3 Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Thu, 26 Jan 2023 14:50:27 +0000 Subject: [PATCH 3/6] Update integrations/README.md Co-authored-by: Daniel Olshansky --- integrations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/README.md b/integrations/README.md index 659fc32..80ddab3 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -64,7 +64,7 @@ In particular, when it comes `Network Churn` where `Actors` such as `Validators` The running instance of the P2P module in a node, keeps an in memory "Address List" of the peers that's being constantly updated. -Whenever the `Consensus` determines a new `Height`, an event via the `Bus` notifies its listeners (`P2P` included) that the list of the current `Actors` that are part of the network has to be stored in `Persistence`. +Whenever the `Consensus` module determines a new `Height`, an event via the `Bus` notifies its listeners (`P2P` included) that the list of the current `Actors` that are part of the network has to be updated at the `Persistence` layer. Essentially, in simple terms, we can now call a function that returns the list of the Validators at a certain `Height`. From a60e9414cac594a2427d6f333f1d7608a928ba7e Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Thu, 26 Jan 2023 15:25:18 +0000 Subject: [PATCH 4/6] Update README.md --- integrations/README.md | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/integrations/README.md b/integrations/README.md index 80ddab3..b7d38ee 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -1,38 +1,11 @@ # Pocket Network 1.0 Cross Module Integrations - - - - - - - - - -
-

- Alessandro De Blasis - @deblasis
-

-
-

- Andrew Nguyen - @andrewnguyen22
-

-
-

- Daniel Olshansky - @olshansky
-

-
- - - -

- Version 1.0.0
-

- - +

+ @andrewnguyen22 - Andrew Nguyen
+ @olshansk - Daniel Olshansky
+ @polyMatto - Alessandro De Blasis
+ Version 1.0.0 +

## Overview From fee493a7f323203ad9b843979927726c6467256b Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Thu, 26 Jan 2023 15:28:28 +0000 Subject: [PATCH 5/6] chore(authors): github handles --- integrations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/README.md b/integrations/README.md index b7d38ee..09daef7 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -3,7 +3,7 @@

@andrewnguyen22 - Andrew Nguyen
@olshansk - Daniel Olshansky
- @polyMatto - Alessandro De Blasis
+ @deblasis - Alessandro De Blasis
Version 1.0.0

From 57987ceedfcd016989c5386ce044348a9e7d665e Mon Sep 17 00:00:00 2001 From: Alessandro De Blasis Date: Thu, 26 Jan 2023 16:00:20 +0000 Subject: [PATCH 6/6] Update integrations/README.md --- integrations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/README.md b/integrations/README.md index 09daef7..ac07d7d 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -33,7 +33,7 @@ Without going too much into technical details, its main features for the purpose 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). +In particular, when it comes `Network Churn` where `Actors` such as `Validators` are involved, joining and leaving the network, [P2P](https://github.com/pokt-network/pocket-network-protocol/blob/main/p2p/README.md) has to integrate with [Persistence](https://github.com/pokt-network/pocket-network-protocol/blob/main/persistence/README.md) in order to keep track of which actors were part of the network at that point in time (`Height` in Protocol terms). The running instance of the P2P module in a node, keeps an in memory "Address List" of the peers that's being constantly updated.