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

Bitmap repr field in schema #4524

Open
mversic opened this issue Apr 29, 2024 · 1 comment
Open

Bitmap repr field in schema #4524

mversic opened this issue Apr 29, 2024 · 1 comment
Labels
Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST

Comments

@mversic
Copy link
Contributor

mversic commented Apr 29, 2024

  "AccountEventSet": {
    "Bitmap": {
      "repr": "u32",

I don't think that unsigned vs signed conveys meaningful information for a bitmap, rather it should be "repr": 32

@mversic mversic added Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST labels Apr 29, 2024
@DCNick3
Copy link
Contributor

DCNick3 commented May 14, 2024

Currently the repr just corresponds to the underlying rust type used, as it was just simpler to implement.

The design is also somewhat loosely based on bitflags crate, although there the signedness actually does matter, for generated methods like bits().

In the end, I agree that this is better represented by the amount of bits in the mask; if downstream users of the schema haven't started relying on this (SDKs, iroha2 docs, something else?). I've implemented support in docs (hyperledger/iroha-2-docs@f1ab8d4), though that is still pretty easy to update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
Status: Backlog
Development

No branches or pull requests

3 participants