pokt-network / pocket-core

Official implementation of the Pocket Network Protocol
http://www.pokt.network
MIT License
210 stars 103 forks source link

Beta-0.9.1 Feature Flag #1474

Closed jessicadaugherty closed 1 year ago

jessicadaugherty commented 2 years ago

Objective

Allow pocket-core to reproduce the behavior of omitting rewards for a subset of nodes (from this point on "the undesired behavior") when the non-custodial flag was turned on, while also allowing pocket-core to have the behavior we want for "Non-Custodial".

There are several ways to achieve this; letting the original flag preserve its undesired behavior and creating a new flag for the desired behavior is a mechanism that allows preserving the history of the blockchain and allows for quick testing of both the undesired and desired behaviors which would be needed to synch the blockchain.

Goals / Deliverables

Non-goals

Testing Methodology

Creator: @jessicadaugherty

iajrz commented 1 year ago

Fleshing out the alternatives we have for the historical replay of the NC issue (part of this is documented here, I'm aiming to distill pros and cons here).

The alternatives to compare are these:

Classical Style Pros

Classical Style Cons

Proposed Style Pros

Proposed Style Cons

Olshansk commented 1 year ago

@iajrz Thank you for the clear outline.

tl;dr After reading this I left a comment and approved https://github.com/pokt-network/pocket-core/pull/1476#pullrequestreview-1117458974.

My opinion is, given:

  1. We want to ship AC ASAP
  2. The classic approach is slow/clumsy, but is simple, proven and tested.
  3. Because of the urgency of (1) and the benefit of (2), I say we go with this approach.

This way, we won't be under duress and have the time to design a better approach (what you suggested in the proposed style) for future v0 changes, as well as transfer those learnings to v1.

Olshansk commented 1 year ago

@iajrz Also, if we ship this (clumsy and hard-to-test approach) and implement the other one in the future, would it not technically be a consensus-breaking change?

iajrz commented 1 year ago

Both are consensus breaking: both imply introducing a new behavior, the working-as-intended NC.

Olshansk commented 1 year ago

Yea, my question was moreso:

  1. Current chain
  2. Implement the "classic approach" -> consensus breaking relative to (0)
  3. Implement the "new approach" -> is this still consensus-breaking relative to (1)?
iajrz commented 1 year ago

Ah, I understand. Yes, they are mutually incompatible. We can't swap out implementations of the fix.

iajrz commented 1 year ago

We have chosen the classic approach~! This issue can serve as a reference for the future if we ever need to amend the behavior of a network-wide flag in v0 or v1.

Thank you everybody for weighing in!

Olshansk commented 1 year ago

Thank you @iajrz for outlining the approaches & tradeoffs so clearly!