-
Notifications
You must be signed in to change notification settings - Fork 31
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
Andymck/verify hb cell type #379
Conversation
1ac4ca2
to
16ada19
Compare
} | ||
|
||
message gateway_info { | ||
// The public key binary address and on-chain identity of the gateway | ||
bytes address = 1; | ||
// The gateway metadata as recorded on the blockchain | ||
gateway_metadata metadata = 2; | ||
// the asserted device type of the gateway | ||
device_type device_type = 3; |
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.
why did you move this out of gateway_metadata?
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.
when I added this originally, i had thought the device type was added upon assertion of the gateway. That is not the case and device type will always be available whether the gateway is asserted or not. Metadata currently only holds the location field which is obviously only set upon assertion and mixing in optional and always available fields in the same sub struct doesnt sit 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.
the device metadata is also always available right? It's only the individual fields that are modified with assertions. And perhaps I'm misunderstanding but I thought the device type was going to go on chain as part of metadata?
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.
Internally metadata is an Option which makes accessing fields a lil more cumbersome but you are right in that the device_type is onchain as part of the metadata. I can move it back, no big deal
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.
After discussing we decided to revert/keep the device type in the top-level GatewayInfo. Key reasons were:
- it's similar to
is_full_hotspot
in that it should be an intrinsic aspect of the hotspot instead of a fungible element like asserted location - it makes the handling of the data easier with fewer nested "options"
634f360
to
867ca9c
Compare
No description provided.