-
Notifications
You must be signed in to change notification settings - Fork 920
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
Load graffiti from file #8041
Load graffiti from file #8041
Conversation
validator/client/propose.go
Outdated
idx, err := v.validatorClient.ValidatorIndex(ctx, ðpb.ValidatorIndexRequest{PublicKey: pubKey[:]}) | ||
if err != nil { | ||
return []byte{}, err | ||
} |
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.
Can this be cached some how? We know this information from the duties as well
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.
Discussed offline, there's no cache but this is ok. The call is cheap and proposing block is not a frequent event
validator/node/node.go
Outdated
if err != nil { | ||
return err | ||
} |
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.
Maybe just log a warning here? It would be sad if parsing a graffiti file failed and the validator remained offline
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.
Good point!
type Graffiti struct { | ||
Default string `yaml:"default,omitempty"` | ||
Random []string `yaml:"random,omitempty"` | ||
Specific map[uint64]string `yaml:"specific,omitempty"` |
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.
In your design, you call this "validators". Why is it "specific" here? I
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.
I changed it to specific in the design doc but i forgot to update the example sections.
You mentioned specific in our chat and I liked it better than validators
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.
Sounds good. No preference here, just wanting consistency. thanks!
b := []byte(`default: "Rice" | ||
random: | ||
- "Sushi" | ||
- "Ramen" | ||
- "Takoyaki" | ||
`) |
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.
yum
Accompany design doc: https://hackmd.io/9su3BOB8TvOMITOsqHtO_A?view
Upon approval I will add a section for this in: https://docs.prylabs.network/docs/prysm-usage
Tested all the possible scenarios in run time with interop mode