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

FVM contract encoding update #867

Merged
merged 5 commits into from
Apr 5, 2019
Merged

Conversation

AlexandraRoatis
Copy link
Contributor

@AlexandraRoatis AlexandraRoatis commented Apr 4, 2019

Description

  1. Bug fix: closing the database where the VM type is stored and storing the information only if the contract creation was successful.
  2. Added VM type to contract details and saved it to stored encoding assuming only FVM contracts exist on the network.

Subset of #866.

Type of change

Insert x into the following checkboxes to confirm (eg. [x]):

  • Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

Please describe the tests you used to validate this pull request. Provide any relevant details for test configurations as well as any instructions to reproduce these results.

  • existing test suite + tests to verify encoding switch

Verification

Insert x into the following checkboxes to confirm (eg. [x]):

  • I have self-reviewed my own code and conformed to the style guidelines of this project.
  • New and existing tests pass locally with my changes.
  • I have added tests for my fix or feature.
  • I have made appropriate changes to the corresponding documentation.
  • My code generates no new warnings.
  • Any dependent changes have been made.

@AlexandraRoatis AlexandraRoatis added bug Something isn't working enhancement New feature or request labels Apr 4, 2019
@AlexandraRoatis AlexandraRoatis added this to the 0.3.4 milestone Apr 4, 2019
@AlexandraRoatis AlexandraRoatis self-assigned this Apr 4, 2019
Copy link
Contributor

@aion-kelvin aion-kelvin left a comment

Choose a reason for hiding this comment

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

looks pretty sane ... should we add any tests to make sure this vm type field gets saved now?


/**
* Decodes the new version of encoding which is a list of 6 elements, specifically:<br>
* { 0:address, 1:vmType, 2:isExternalStorage, 3:storageRoot, 4:storage, 5:code }
Copy link
Collaborator

Choose a reason for hiding this comment

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

the rlp encode/decode order can be the original order plus the vmType. Then we can make sure the logic will be more neat and safe.

Copy link
Contributor

@aion-kelvin aion-kelvin left a comment

Choose a reason for hiding this comment

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

thanks for the test!

@AionJayT AionJayT merged commit 5bf1f18 into master-pre-merge Apr 5, 2019
@AlexandraRoatis AlexandraRoatis deleted the contract-encoding branch April 5, 2019 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants