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

Serialization and deserialization of nested enums would not match. #5

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

vikalpacn
Copy link
Contributor

@vikalpacn vikalpacn commented Nov 3, 2022

MOTIVATION

There was a small bug where the serialization and deserialization of nested
enums would not match, so a fork created of diem/bcs in the Zefchain org, applied the fix, and
then released v0.1.4 of bcs to crates.io

The fixes done in Zefchain branch, are incorporated in forked repo of Diem bcs and then merged with diem/diem.

-fixes are applied in diem bcs version 0.1.3 regarding the matching of serialization and de-serialization
of Nested enums and updating it to version 0.1.4.

-Then, building diem bcs version 0.1.4.

-referring diem bcs version 0.1.4 to diem code base.

DESCRIPTION

The fixes done in Zefchain branch, are incorporated in forked repo of Diem bcs and then merged with diem/diem.

  1. First step is to apply the fixes in diem bcs version 0.1.3 regarding the matching of serialization and de-serialization
    of Nested enums and updating it to version 0.1.4.

  2. Then, building diem bcs version 0.1.4 and performing unit testing for fn test_recursion_limit() :

  • cargo test --package bcs --test serde -- test_recursion_limit --exact --nocapture
  1. After successful build and testing, referring diem bcs version 0.1.4 to diem code base.

  2. To refer, first making changes in bcs of cargo.toml file of a single module (Applying path of diem bcs- )

    • then,
    1. Build- cargo build
    2. Test- cargo test -p "Name of a particular module"

5.After successful build of a single module, further applying the changes in all the modules by giving address of diem bcs in cargo.toml file.

  1. Then,
  • cargo build diem- cargo build
  • Smoke test- cargo x test --package smoke-test -- --test-threads 1
  • integration test- cargo xtest -p jsonrpc-integration-tests

@vikalpacn
Copy link
Contributor Author

/canary

@KoushikGavini
Copy link

Lets update description and test plan as discussed.

Copy link

@KoushikGavini KoushikGavini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets fix Lint check

@vikalpacn
Copy link
Contributor Author

/canary

@vikalpacn vikalpacn changed the title fixing the issue regarding serialization and deserialization of neste… Serialization and deserialization of nested enums would not match. Nov 16, 2022
@vikalpacn
Copy link
Contributor Author

/canary

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.

3 participants