-
Notifications
You must be signed in to change notification settings - Fork 145
Allow sharing ReferenceCounter between engines #340
Conversation
are we going to try and run engines in parallel or? |
I want to run an engine inside another engine. In this way, you can create an isolated environment from the contract, execute another contract, and observe whether it succeeds or fails. |
For example, contract A and B. A calls to B. If B fails, then A will also fail, and all state changes must be rolled back. If there is a mechanism that allows A to create an isolated environment to execute B, then the execution state of B will be captured by A. Even if B fails to execute, A can capture it and continue execution. |
Thanks for giving the background information regarding this change 👍 |
@erikzhang, this was our intention when we proposed |
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.
Just left some comments over possible surpassing max limits.
|
||
protected ExecutionEngine(ReferenceCounter referenceCounter) | ||
{ | ||
this.ReferenceCounter = referenceCounter; |
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.
So, my previous question comes here: do we need to ensure that "globally" a nesting access (call X -> call Y -> call Z -> ...) in such a way that it surpasses limits for array counts, etc, in a dangerous way?
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.
What do you mean? This change is to ensure that it won't surpass the limits.
No description provided.