-
Notifications
You must be signed in to change notification settings - Fork 81
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
EVM-C: Classification of external data for EVM #110
Comments
Python implementation might be closest to this, C++ on the other hand has additional abstraction layer that flattens account access (no address argument required). Go is somewhere in the middle, probably closer to Python anyway. |
So in C++ you have an Address class with balance() and kin as member functions? |
In C++ we have |
What is the overhead of just providing all the immutable data at the point of the call in a flat byte array? |
In case of transaction & block data it is the cost of the accesing and coping the data -- ~136 bytes (no matter if the application has the data in already in the single array or not). I'm gessing it is the same order of cost as the call itself. Because it is immutable per transaction the EVM will not need to ask for it in the same call/transaction again. I can do some microbenchmarks if needed. |
Ok, looks good to me! |
I think this is closed now? |
This document tries to organize external data needed to perform any execution in EVM. The hypothesis is:
Message
Immutable data:
Functions:
log(data, topics)
The message contains immutable data valid for the current call. ~112 bytes in total, but might be bigger if extended by code and code hash.
The
log()
function attaches logs to the current message. All logs attached should be discarded if the message execution fails.Transaction & Block
Immutable data:
Functions:
blockhash(number)
Information about the current transaction and block is mostly immutable data that are valid for the whole transactions (all calls in it). ~136 bytes in total.
The
blockhash()
function provides hashes of 256 recent blocks (8192 bytes of information in total).State (accounts)
Query functions:
balance(address)
get_storage(address, key)
exists(address)
code(address)
code_size(address)
Update functions:
set_storage(address, key, value)
selfdestruct(address, beneficiary)
create(creator, code)
This provides information about accounts in the state, so address is always a required argument.
The text was updated successfully, but these errors were encountered: