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

Step 3: kernel integration (TransactionExecutor) #779

Merged
merged 6 commits into from
Jan 20, 2019

Conversation

aionick
Copy link
Contributor

@aionick aionick commented Jan 17, 2019

Step 3 in the kernel integration.

This PR is mostly concerned with the interplay between the BulkExecutor and TransactionExecutor. The latter was formerly in modVM and has been moved to the fvm and the former has inherited some of its logic. This is part of the move towards separating these module dependencies out. Some tests have been migrated in the process.

@aionick aionick added this to the 0.3.3 milestone Jan 17, 2019
@aionick aionick changed the title Step 3: kernel integration Step 3: kernel integration (BulkExecutor) Jan 17, 2019
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.

overall looks good. there is a test file has a merge conflict. does these PR pass all the test cases?

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.

I'm ok with this, apart from the GNU headers which should be removed. Also, have one note for something to change/refactor when all this stuff has been merged.

@@ -0,0 +1,308 @@
/*
* Copyright (c) 2017-2018 Aion foundation.
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary header

* There is no post-execution work to do for any calls in this class.
*/
private PostExecutionWork getPostExecutionWork() {
return (k, s, t, b) -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can fix this later, but I think it would make far more sense to instantiate the PostExecutionWork once at constructor (or static) time and return that instance all the time, instead of instantiating it every time this getter is called.

@aionick aionick added the wip Indicates that a PR or issue is Work In Progress, issuer should be notified before any actions label Jan 18, 2019
@aionick aionick changed the title Step 3: kernel integration (BulkExecutor) Step 3: kernel integration (TransactionExecutor) Jan 18, 2019
@aionick aionick removed the wip Indicates that a PR or issue is Work In Progress, issuer should be notified before any actions label Jan 18, 2019
@aionick aionick changed the base branch from incremental-pr2 to master-pre-merge January 18, 2019 22:02
- This class anticipates the needs of the BulkExecutor once it
  eventually starts accepting transactions in bulk. In this case,
  the bulk transactions and their corresponding contexts and
  block will all be passed over using this single object.
- This will eventually be in terms of KernelInterface. But now
  at least all explicit reliance on IRepoCache is removed.
- The BulkExecutor mainly takes care of everything the
  TransactionExecutor used to do in the finish() method. The
  TransactionExecutor now uses the KernelInterface to do its
  checks.
- These tests have been migrated over so that they can use the
  StandaloneBlockchain to perform their integ tests instead of
  relying on the TransactionExecutor directly (the functionality
  they previously depended on is now removed).
- This check is empty currently, it always returns true. But eventually
  we will need real logic here so that the interface can tell the fastvm
  that it is calling an Avm contract and to fail.
@AionJayT AionJayT merged commit 22cbb54 into master-pre-merge Jan 20, 2019
@AlexandraRoatis AlexandraRoatis deleted the incremental-pr3 branch February 11, 2019 19:05
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