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

Add IsWorkerAddress method #756

Closed
wants to merge 12 commits into from
Closed

Add IsWorkerAddress method #756

wants to merge 12 commits into from

Conversation

dcasem
Copy link
Contributor

@dcasem dcasem commented Jul 24, 2023

No description provided.

@Stebalien
Copy link
Member

  • General feedback: This should link to a discussion specific to this FIP.
  • Specific feedback: Why not GetWorkerExported (like GetOwnerExported)?

@anorth
Copy link
Member

anorth commented Jul 25, 2023

This proposal isn't discussed in the linked-to discussion (and should really have started a new one). There is some discussion of this proposal in Slack, but it appears to be concluded with an alternative solution to @dcasem's original motivating need here. Do you still intend to advocate for this proposal, or are you satisfied without it for now? I'm sure we'll revisit this when next expanding the built-in APIs anyway.

Editor nit: FIP numbers are assigned at the point a draft is reviewed by editors and ready to merge

@anorth anorth changed the title Create fip-0066.md Add IsWorkerAddress method Jul 25, 2023
FIPS/fip-0066.md Outdated Show resolved Hide resolved
FIPS/fip-0066.md Outdated Show resolved Hide resolved
whether a given address belongs to a miner actor as a worker in the Filecoin network.

## Change Motivation
There are several scenarios in the Filecoin protocol where it is necessary to confirm if a particular address belongs to a miner actor as a worker key. Having a dedicated exported method in the miner actorto handle such checks can increase efficiency and readability of the codebase.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Editor comment)

This is a weak motivation without examples. Can you please list 3-4 such examples?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The primary example is to facilitate associating a miner with a voter, given that many SPs hand over their owner wallet keys to a lender.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @raulk.

@dcasem can you please commit changes directly to your FIP draft?

FIPS/fip-0066.md Outdated Show resolved Hide resolved
Comment on lines +63 to +65
`IsWorkerAddress` correctly identifies the worker address

`IsWorkerAddress` correctly identifies non-worker addresses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Peer review)

Good that we're thinking about positive and negative testing, but these definitions are a bit unspecific. Consider test cases involving miners that have no worker, and queries with different address types.

`IsWorkerAddress` correctly identifies non-worker addresses

## Implementation
This FIP does not require any changes to existing protocols. The changes would be implemented in the actor package in the. The exact implementation details will depend on the codebase at the time of implementation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Peer)

Introducing any change in Wasm bytecode is protocol-breaking because bytecode is referenced by CID.

FIPS/fip-0066.md Outdated
Comment on lines 17 to 18
The proposed FIP introduces a new built-in actor method to the miner actors for address validation to be used in determining \
whether a given address belongs to a miner actor as a worker in the Filecoin network.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the Simple Summary, but ok for such a simple FIP. Would be good to cite the method name here.

FIPS/fip-0066.md Outdated Show resolved Hide resolved
FIPS/fip-0066.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@kaitlin-beegle kaitlin-beegle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for editorial soundness.

Outstanding questions and requests need to be addressed before this draft can be merged.

@@ -0,0 +1,78 @@
---
fip: "0066"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave as FIP00XX for now. There is already a FIP0066. FIP Editors assign FIP numbers once the draft is reviewed and merged.

whether a given address belongs to a miner actor as a worker in the Filecoin network.

## Change Motivation
There are several scenarios in the Filecoin protocol where it is necessary to confirm if a particular address belongs to a miner actor as a worker key. Having a dedicated exported method in the miner actorto handle such checks can increase efficiency and readability of the codebase.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @raulk.

@dcasem can you please commit changes directly to your FIP draft?

@dcasem dcasem closed this by deleting the head repository Aug 16, 2023
@dcasem
Copy link
Contributor Author

dcasem commented Aug 16, 2023

Need to resubmit this, I guess. Lost the head repo, so will include new changes in the updated FIP.

@jennijuju
Copy link
Member

  • Specific feedback: Why not GetWorkerExported (like GetOwnerExported)?

ha - I missed tGetOwnerExported exists. @Stebalien I guess the reason for doing it the way you proposed is to do only on if checks in user actors, rather than doing one in both built in and user actors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants