-
Notifications
You must be signed in to change notification settings - Fork 4
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
Block and Chain drivers #29
Conversation
9da5cef
to
25ed451
Compare
|
||
let trevm = trevm.close_block().map_err(EvmErrored::err_into)?; | ||
|
||
match driver.post_block_checks(&trevm) { |
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.
I think we should mark this as a TODO too indicating it's a noop atm.
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.
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.
LGTM, I like how each trait now handles an specific part of the system, and pushing generics to the functions instead of the traits.
Working on higher-level traits to drive trevm instances through many txns in a single function call
BlockDriver
andChainDriver
traitsSome significant refactoring to achieve this:
BlockContext
generics have been moved to the functions involvedBlockContext
error is now generic overDb
EvmNeedsFirstBlock
andEvmNeedsNextBlock
have been collapsed toEvmNeedsBlock
to simplify context handling. Separating them was a holdover from earlier designs where trevm would accumulate context info-
Trevm::errored()
-
EvmErrored::err_into
-
EvmErrored::map_err
take_context