-
Notifications
You must be signed in to change notification settings - Fork 589
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
Creating revm-primitives, revm better errors and db components #334
Conversation
PrecompileError, | ||
NonceOverflow, | ||
/// Create init code size exceeds limit (runtime). | ||
CreateContractSizeLimit, |
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.
@rakita, I was looking at the reference implementation and am now wondering whether CreateContractSizeLimit
is considered an exceptional halt:
Wouldn't we be able to catch that by validating the arguments passed to a create transaction at the very start?
Additionally, the WriteInStaticContext
is considered an exceptional halt, but we treat is as an internal error. Why the difference? Can we guarantee recovery?
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.
CreateContractSizeLimit
Not exactly, as data that is sent with a transaction is used as bytecode that is going to be executed, that bytecode can do anything and return of execution is newly created bytecode that is saved to db.
WriteInStaticContext
Is not possible for a call of depth 1(as in the first call or create) it is only possible when call of depth 1 calls opcode STATIC_CALL for depth 2.
revm-primitives
contain low level structures and traits that rest of the project needs.It contains big numbers and hash structs, account/storage/byteciode/log structs, env variables, return types, Database traits and some utilities as CREATE address calculation. Task: #304
Bytecode are found in primitives but analysis is left to interpreter as it is instruction related.
Database components are added (State, BlockHash) and wrapper around them. Task: #298
And finally, we are getting proper return types. @Wodann did a lot of investigation here: #309
And they look something like:
and it removes revmjs as it became a burden to maintain.