-
Notifications
You must be signed in to change notification settings - Fork 306
feat(pyth-lazer/publisher-sdk): Move Transaction Envelope Definitions to SDK #2623
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
So we determine the publisher id from auth?
Yep, Lazer will determine their ID based on their public key/access key. Also sorry I will do some more things with this PR actually. Will ping when I'm done. |
d242c12 to
a0428fc
Compare
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.
Looks good! See one comment below.
| // Submitted over Message Queue to be read by rest of Pyth Lazer service. | ||
| message PayloadContext { | ||
| // [required] ID of publisher based on the access token used to connect | ||
| optional uint32 publisher_id = 1; |
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.
The next option we will likely add to PayloadContext.context is a governance update context. That one doesn't have a publisher_id, so I think it makes more sense to move this publisher_id field to PublisherUpdateContext message.
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 don't imagine that we would have a permissionless endpoint on Relayer. If permissioned, we need some way for governance to authn/z with Relayer, at which point we could read their ID. We may not necessarily want to. Maybe the ID takes another form.
Just curious what you had in mind. For now, I don't mind moving it into publisher context. I had a comment on your PR adding governance on how we determine the governance source.
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 in Slack. If we add publisher's public key to the payload, I guess we won't need publisher id in the context at all.
Summary
Rationale
Reduces some burden on publishers by not requiring them to know their own IDs. The update index field was also confusing. It's better to write thoroughly tested code and make some assumptions instead. The added rust docs should also help with understanding the generated types.
How has this been tested?