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

Compile time checking for architecture dependent types on serialized structures #2004

Closed
SamHSmith opened this issue Mar 24, 2022 · 1 comment
Labels
Enhancement New feature or request good first issue Good for newcomers iroha2-dev The re-implementation of a BFT hyperledger in RUST

Comments

@SamHSmith
Copy link
Contributor

It would be useful to have compile time checks that ensure our serialized and deserialized types are identical across architectures so that we don't reintroduce fields containing eg usize/isize in future.

@Arjentix Arjentix added Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST labels Mar 24, 2022
@mversic
Copy link
Contributor

mversic commented Mar 31, 2022

We should also add a runtime test which would traverse the schema map and make sure that no pointer sized type is encountered. This is necessary to guard against faulty manual implementations. Compile test can be added to make sure that there is no pointer sized types in derived implementation

@appetrosyan appetrosyan added the good first issue Good for newcomers label Apr 19, 2022
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 2, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 2, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 5, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 5, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 6, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit that referenced this issue May 6, 2022
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
appetrosyan added a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
mversic pushed a commit to mversic/iroha that referenced this issue May 13, 2022
…oming `IntoSchema`.

Signed-off-by: Aleksandr Petrosyan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request good first issue Good for newcomers iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

No branches or pull requests

4 participants