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

Impose direct allocation limit #16

Open
aionbot opened this issue Dec 4, 2018 · 1 comment
Open

Impose direct allocation limit #16

aionbot opened this issue Dec 4, 2018 · 1 comment
Milestone

Comments

@aionbot
Copy link

aionbot commented Dec 4, 2018

Issue created by jeff-aion (on Thursday May 10, 2018 at 16:03 GMT)

One of the topics discussed in #4 and #6 is that of heap limit nondeterminism.
We need an answer to this problem since it is otherwise possible to construct a contract which would only work on some nodes, based on heap geometries they have chosen. This problem would be further exasperated as concurrent contract execution is enabled.
The core of the problem is that the real limit of memory to a Java process is based on live objects, not allocated objects. This value cannot be truly known at any point.
Therefore, we must impose some restriction which can be known. A possibility is the abstract cost of allocates issued directly from within the contract code. This is something a contract writer could reason about, would be a deterministic function of the execution path taken, could be measured along the same lines of much of our bytecode-level instrumentation, and would be isolated from implementation details of the JVM or our runtime.

@aionbot
Copy link
Author

aionbot commented Dec 4, 2018

Comment by jeff-aion (on Thursday Oct 11, 2018 at 15:56 GMT)

Moving this out to TestNet milestone since this might still be worth considering but we don't yet have a good stress test. I suspect that we won't pursue this but we should at least document on thoughts on the matter.

@jeff-aion jeff-aion added this to the Future milestone Dec 17, 2018
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

No branches or pull requests

2 participants