-
Notifications
You must be signed in to change notification settings - Fork 114
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
Conversation
modPrecompiled/test/org/aion/precompiled/contracts/TXHashContractTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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?
There was a problem hiding this 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. |
There was a problem hiding this comment.
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) -> { |
There was a problem hiding this comment.
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.
103c613
to
349f72f
Compare
b5443eb
to
d50c1b6
Compare
d50c1b6
to
4bf7677
Compare
- 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.
4bf7677
to
09472b1
Compare
Step 3 in the kernel integration.
This PR is mostly concerned with the interplay between the
BulkExecutor
andTransactionExecutor
. 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.