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

Extracting an API for the Virtual Machine #48

Closed
wants to merge 10 commits into from
Closed

Conversation

AlexandraRoatis
Copy link
Contributor

@AlexandraRoatis AlexandraRoatis commented Dec 20, 2018

aionick and others added 7 commits December 19, 2018 14:54
- All changes here reflect the fact that the kernel Address has
  been renamed.
- Bringing in the new changes to the base module. This includes now
  having AionTransaction in aion_api implement TransactionInterface.
- So far this is co-existing with ITransaction and there are duplicate
  methods. A real cleanup needs to be done on this project.
- Some methods were duplicated (with differing names slightly)
  due to the introduction of the TransactionInterface type. This
  commit simply cleans this up to remove these duplications where
  possible.
- This is required so fastVM can implement VirtualMachine.
- The API has made some naming changes, those changes are reflected
  here.
@AlexandraRoatis AlexandraRoatis added the enhancement New feature or request label Dec 20, 2018
@AlexandraRoatis AlexandraRoatis changed the title Refactoring for extracting an API for the Virtual Machine Extracting an API for the Virtual Machine Dec 20, 2018
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.

Hey, looks pretty sane so far.

Question: it looks like org.aion.base.type.Address has become two classes/interfaces: org.aion.vm.api.interfaces.Address and org.aion.base.type.AionAddress.

Can you explain a bit what the difference is and when each should be used? I'm guessing one is an interface and the other an impl, but their code isn't in this PR so just want to check...

Also have one small comment in-line below.


// NOTE: a number of methods are now duplicated here (but with different names) because of issue
// #734.
// This should be eventually cleaned up, but is not currently a priority.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to create an issue or jira to track and link it here

@AlexandraRoatis
Copy link
Contributor Author

@aion-kelvin these are the current implementations:
https://github.com/aionnetwork/aion/blob/vm-api-pr/modAionBase/src/org/aion/base/type/AionAddress.java
https://github.com/aionnetwork/vm_api/blob/vm-api-pr/src/org/aion/vm/api/interfaces/Address.java
This is only a first step in the refactoring. The objective would be to have most modules reference only the interface but the interface is not fully specified yet.

Copy link
Collaborator

@AionJayT AionJayT left a comment

Choose a reason for hiding this comment

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

LGTM

@aion-kelvin
Copy link
Contributor

Spoke with Jeff and Nick a bit about AionAddress/Address. Conclusion was probably they don't need to be separated into interface and class, but we can fix that later.

@AlexandraRoatis
Copy link
Contributor Author

will be reopened in stages

@AlexandraRoatis AlexandraRoatis deleted the vm-api-pr branch February 14, 2019 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants