Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

rename miner-addr to storage-provider-id #37

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

merlinran
Copy link
Contributor

@merlinran merlinran commented Aug 15, 2021

To conform with https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0018.md (maybe wait for it to be official?)

Also checks its format to fail fast. Saw someone put the actor address there then got cryptic error message.

To conform with https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0018.md

Also checks its format to fail early

Signed-off-by: Merlin Ran <merlinran@gmail.com>
@merlinran merlinran force-pushed the merlin/rename-storage-provider-id branch from dd55bfc to b4762e9 Compare August 15, 2021 21:01
@@ -48,6 +49,7 @@ var (

dealsListFields = []string{"ID", "DealSize", "DealDuration", "Status", "AskPrice", "VerifiedAskPrice",
"StartEpoch", "DataURIFetchAttempts", "CreatedAt", "ErrorCause"}
validStorageProviderID = regexp.MustCompile("^[a-z]0[0-9]+$")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually there are only "f0..." and "t0..." https://docs.filecoin.io/about-filecoin/how-filecoin-works/#id-addresses-f0, but just don't put too rigid rules

@@ -16,7 +16,7 @@ message Auction {

message Bid {
string auction_id = 1;
string miner_addr = 2;
string storage_provider_id = 2;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hesitated to do this last time but renaming a field is in fact not a back incompatible change.

@merlinran merlinran requested a review from sanderpick August 18, 2021 20:36
Copy link
Member

@sanderpick sanderpick left a comment

Choose a reason for hiding this comment

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

Nice!

@merlinran merlinran merged commit 64f2bdf into main Aug 18, 2021
@merlinran merlinran deleted the merlin/rename-storage-provider-id branch August 18, 2021 21:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants