pokt-network / pocket

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

[Persistence] Consolidate common behaviour between `Pool` and `Account` into a shared interface #102

Closed Olshansk closed 1 year ago

Olshansk commented 2 years ago

Objective

Remove redundant code used by the Pool and Account actors in the persistence module introduced in https://github.com/pokt-network/pocket/pull/73.

This is a good starter task opportunity to get acquainted with the codebase in the persistence module.

Origin Document

From the utility specification, a Pool is described as:

    A ModulePool is a particular type that though similar in structure to an Account, the
    functionality of each is quite specialized to its use case. These pools are maintained by
    the protocol and are completely autonomous, owned by no actor on the network. Unlike Accounts,
    tokens are able to be directly minted to and burned from ModulePools. Examples of ModuleAccounts
    include StakingPools and the FeeCollector

Similar to how the functionality of Fisherman, ServiceNode, Validator and Application was consolidated via persistence/schema/protocol_actor.go and persistence/schema/base_actor.go, the functionality of Pool and Account can also be shared to remove redundant code.

Goals

Deliverables

Testing Methodology

Non-goals

Creator: @Olshansk Owner: @DragonDmoney Co-Owners: @andrewnguyen22

DragonDmoney commented 2 years ago

Note: I am currently working on this.

Olshansk commented 2 years ago

+1 Updated you as an owner in the description changed this to in progress

Olshansk commented 2 years ago

@DragonDmoney Do you think this is something you can have up for review by the end of the month?

andrewnguyen22 commented 2 years ago

Somewhat tackled in #154 by merging the two structures in protobuf. Will leave the rest to #163

Olshansk commented 2 years ago

Spoke to @DragonDmoney offline and he mentioned he won't be working on this any longer.

h5law commented 1 year ago

@Olshansk I would like to take a swing at this issue if its still relevant? I have working code that passes tests ready to submit a PR if its still applicable?

Olshansk commented 1 year ago

@Olshansk I would like to take a swing at this issue if its still relevant? I have working code that passes tests ready to submit a PR if its still applicable?

Still applicable, let's do it!