-
Notifications
You must be signed in to change notification settings - Fork 649
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
Check access restrictions during tx execution #276
Conversation
Also don't convert read/write list format in message constructor -- this should happen only once right after transaction decoding.
1. Set `reads` and `writes` properties for accessing `_reads` and `writes` 2. Modified the `exsits` and `deletes` to store the accessed key-value result in dicts
This operates in a O(n*logn) time complexity because of the sort. Closes ethereum#212
Encode integers as big endian and code as bytes, instead both as RLP
two layer trie backend -> nested trie backend (storage tries are referenced in account trie, so we have a nested structure) one layer trie backend -> flat trie backend (just one trie, no additional structure)
The methods are - account_exists - delete_account - delete_storage Those would require additional trie methods, but are likely not needed anyway, so they are explicitly NotImplemented for now.
@jannikluhn oh, sad. #269 also added some new test cases, just wondering if we merge #269 first, could help for reducing conflicts for this PR? |
I will get the #269 merged as soon as tests passed. |
34d6a29
to
340e978
Compare
Rebased and added access lists to the tests of #269 . Also marked them with xfail because of #281 and old gas payment style. The tests pass if the following lines are commented out:
I'll apply similar fixes to #230 once it is merged, that's why I'm setting this as work in progress again. |
@jannikluhn FYI This is a common pytest pitfall. In cases where we have an explicit failure, I'd rather stay away from In general, I think we should stay way from |
The pytest documentation says the following:
so I think xfail is correct here. I'm not a fan of adding I agree though that it would be nicer if the test would fail if it passes unexpectedly. |
@jannikluhn eating my words. Looks like Also, I have a preference towards using |
Replaced by #313. |
What was wrong?
#263
How was it fixed?
Computation.state_db
transaction.access_list
to prefix list form during initialization and store the result intransaction.prefix_list
.Computation
object is available (i.e. in all opcode functions) usecomputation.state_db
instead ofcomputation.vm_state.state_db
to access state.vm.state.state_db
but passtransaction.prefix_list
explicitly.Cute Animal Picture