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

[Core] Redesign actor.proto to handle actor specific parameters #555

Open
10 tasks
Olshansk opened this issue Feb 27, 2023 · 1 comment
Open
10 tasks

[Core] Redesign actor.proto to handle actor specific parameters #555

Olshansk opened this issue Feb 27, 2023 · 1 comment
Assignees
Labels
core Core infrastructure - protocol related persistence Persistence specific changes utility Utility specific changes

Comments

@Olshansk
Copy link
Member

Objective

A clear & modular to handle and maintain differences and commonalities between different actor protobuf types.

Origin Document

In #550, we tended #313 which consolidated ActorSpecificParam and GenericParam into ServiceURL while getting rid of MaxRelays. The new actor proto type is:

message Actor {
  ActorType actor_type = 1;
  string address = 2;
  string public_key = 3;
  repeated string chains = 4; // Not applicable to `Validator` actors
  string service_url = 5; // Not applicable to `Application` actors
  string staked_amount = 6;
  int64 paused_height = 7;
  int64 unstaking_height = 8;
  string output = 9;
}

However, service_url is not pertinent to Applications; the field exists but is unused which can lead to confusion and lack of clarity throughout the codebase while adding hidden techdebt.

Screenshot 2023-02-27 at 3 38 22 PM

Goals

  • Design a method that makes it easy to distinguish between fields common to all actors and those that are actor specific
  • Design a method that makes it easy to extend actor functionality (e.g. adding new fields) with minimal efforts (e.g., BaseActor + ValActor` protobuf?)

Deliverable

  • A PR that tends to the Goals above
  • Documentation on:
    • All the different actor protobuf types and how they're used (if applicable)
    • How one would go about adding a new field specific to one type of actor

Non-goals / Non-deliverables

  • Adding new functionality to any of the existing actors

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @Olshansk
Co-Owners: @deblasis

@Olshansk Olshansk added core Core infrastructure - protocol related utility Utility specific changes persistence Persistence specific changes labels Feb 27, 2023
@Olshansk Olshansk moved this to Backlog in V1 Dashboard Feb 28, 2023
@deblasis deblasis changed the title [Core] Redesign actor.proto to handle actor specific parametesr [Core] Redesign actor.proto to handle actor specific parameters Feb 28, 2023
@Olshansk
Copy link
Member Author

Fun attempt at getting ChatGPT to suggest a proto structure:

Screenshot 2023-04-26 at 3 07 25 PM

Screenshot 2023-04-26 at 3 13 13 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core infrastructure - protocol related persistence Persistence specific changes utility Utility specific changes
Projects
Status: Backlog
Development

No branches or pull requests

1 participant