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

refactor(share/shwap): shwap types improvements #3437

Merged
merged 4 commits into from
May 27, 2024

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented May 27, 2024

Changes here are extracted out of #3421

Notable changes:

  • Renamings
    • DataID -> RowNamespaceDataID for consistency with the spec
  • Validation method consistency
    • Singe validation method per type
    • Validate, not Verify
  • Values over pointers
    • The types are small and copy-friendly, so we can benefit from simplicity and efficiency of using values
  • Rearrange method/functions
  • Constructors first, then serialization methods, then other methods
  • Abstracts away small integers in ID types
    • We use uint16 integers over the wire, which are slightly cumbersome to convert. Here we use int everywhere and convert to uint16 during serialization instead.
  • RowsWIthNamespace as an alternative to FilterByNamespace

@Wondertan Wondertan added kind:refactor Attached to refactoring PRs shwap labels May 27, 2024
@Wondertan Wondertan self-assigned this May 27, 2024
@Wondertan Wondertan force-pushed the shwap-types-improvements branch from 48fcb3c to f39dd55 Compare May 27, 2024 11:46
@Wondertan Wondertan merged commit 49946c8 into shwap May 27, 2024
27 checks passed
@Wondertan Wondertan deleted the shwap-types-improvements branch May 27, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:refactor Attached to refactoring PRs shwap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants