Skip to content
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

Merged
merged 6 commits into from
Dec 14, 2023
Merged

Conversation

andymck
Copy link
Contributor

@andymck andymck commented Nov 17, 2023

No description provided.

}

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;
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@madninja madninja Dec 7, 2023

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?

Copy link
Contributor Author

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

Copy link
Contributor

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"

@jeffgrunewald jeffgrunewald marked this pull request as ready for review December 14, 2023 17:24
@jeffgrunewald jeffgrunewald merged commit de51ede into master Dec 14, 2023
7 checks passed
@jeffgrunewald jeffgrunewald deleted the andymck/verify-hb-cell-type branch December 14, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants