pokt-network / pocket

Official implementation of the Pocket Network Protocol v1
https://pokt.network
MIT License
63 stars 33 forks source link

[P2P] RainTree Redundancy Layer Implementation #85

Open Olshansk opened 2 years ago

Olshansk commented 2 years ago

Objective

Implement and test RainTree's redundancy layer on top of the Pre2P module.

Origin Document

The Pocket Network V1 P2P Specification, supported by this explanation of RainTree is partially implemented in the pre2p/raintree branch atop the Pre2P module at the time of creating this issue, but without the redundancy and cleanup layers.

This implementation has already been started and is available in the pre2p/raintree_redundancy branch at the time of writing this thread in https://github.com/pokt-network/pocket/pull/80.

The initial implementation of the redundancy layer code is available in the following commit: https://github.com/pokt-network/pocket/commit/756b0a09cd7b33a72b46e1690e4a858c6033792b.

Goals

Deliverables

Testing Methodology

  1. Use make test_pre2p to run existing tests
  2. Update the test suite in raintree_utils_test.go and add raintree_redundancy_layer_test.go int he same package with new tests
  3. [Optional] Use LocalNet as described in docs/development/README.md
  4. [Optional] Using Telemetry (if ready) to validate the results from (2)

Non-goals

Creator: @Olshansk Co-Owners: @andrewnguyen22

andrewnguyen22 commented 2 years ago

I'm increasing the scope of this issue to add the cleanup layer

Olshansk commented 2 years ago

This is being worked on in https://github.com/pokt-network/pocket/pull/137

jessicadaugherty commented 2 years ago

Make redundancy and clean-up configurable for existing tests, and add new tests with manually hard-coded static values. Out of scope: update Python simulator to accept these input configurations. CC @andrewnguyen22

Olshansk commented 2 years ago

Make redundancy and clean-up configurable for existing tests, and add new tests with manually hard-coded static values. Out of scope: update Python simulator to accept these input configurations. CC @andrewnguyen22

Just wanted to add additional detail here. There is a fair amount of short/mid/long work here:

  1. Short-term: @andrewnguyen22 will tackle the first piece here: https://github.com/pokt-network/pocket/pull/137#issuecomment-1306181043. Implementing the redundancy & cleanup layers in Go and adding "simple" (i.e. small network) tests.

  2. Mid-term: @Olshansk will add cleanup & redundancy to the python simulator (https://github.com/pokt-network/rain-tree-sim).

  3. Mid-term: @Olshansk / @andrewnguyen22 will use (2) to add additional unit tests into (1) and verify that the logic in both are the same. If discrepancies are found, additional work to fix it will be necessary. The implementation and python simulator are both sources of truth for each other than require manual engineering intervention.

  4. Long-term: The go implementation will be leveraged to build a go simulator that can be used to write large-scale fuzzy tests. This will deprecated the python simulator.

@jessicadaugherty Note that tasks 2 through 4 are not captured in other tickets yet. Could you add placeholders for them?

jessicadaugherty commented 1 year ago

Rescoping here