-
Notifications
You must be signed in to change notification settings - Fork 15
optimistic wallet identity added as annotation to submitted bacalhau jobs #601
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
optimistic wallet identity added as annotation to submitted bacalhau jobs #601
Conversation
…mistic wallet identity annotation to bacalhau jobs
LAB-500 add optimistic wallet identity to bacalhau job annotation
Related to LAB-341. This will let us associate users' wallet addresses with bacalhau job IDs for |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Update: this needs to be built for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me. My plan will be to pull the userId out and save it as a column in the DB, so as long as I can find it in the JSON, it will be all good.
if err != nil { | ||
fmt.Println("Error:", err) | ||
os.Exit(1) | ||
} | ||
|
||
if autoRun && userID != "" { | ||
*annotationsForAutoRun = append(*annotationsForAutoRun, fmt.Sprintf("userId=%s", userID)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What characters are possible values in this wallet id? It would be nice to pick a separator that won't occur in the given user id. Or at least be aware that it can exist for parsing down the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hevans66 userId
can only point to an EVM wallet address. We have a helper validator function with some regex that could be helpful for parsing on the metabase side.
Lines 7 to 11 in f8552a2
func IsValidEthereumAddress(address string) bool { | |
pattern := `^0x[0-9a-fA-F]{40}$` | |
match, _ := regexp.MatchString(pattern, address) | |
return match | |
} |
PR Summary
|
Annotations are added in the format
userId=<optimistic wallet identity>