-
Notifications
You must be signed in to change notification settings - Fork 21.3k
all: generate and embed block-access-lists in block bodies when --experimentalbal
is enabled
#32586
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
base: master
Are you sure you want to change the base?
Conversation
7a96aa6
to
c98f0aa
Compare
// Block Access List flags | ||
|
||
ExperimentalBALFlag = &cli.BoolFlag{ | ||
Name: "experimentalbal", |
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.
--experimental.bal
?
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.
sgtm
// a block. It is an amalgamation of state access/modification functionality | ||
// utilized by EVM execution and other functionality needed in block execution | ||
// (e.g. state root calculation). | ||
type BlockProcessingDB interface { |
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.
Most of the methods here are the same as vm.StateDB
, can we somehow combine these interfaces? So that we don't need to change 2 places if anything changes.
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.
Yes, but we will have to move the interface up to the core
package.
Originally, I tried to define BlockProcessingDB
as being composed of vm.StateDB
. However, that creates a cyclical import between core/vm
and core/state
.
This pulls a few changes out from the larger BAL branch #32263:
StateDB
is modified to return the modified state as well as accessed state fromFinalise
if it has been explicitly enabled withStateDB.EnableStateDiffRecording
.StateDB
functionality required for fully executing blocks is introduced instate.BlockProcessingDB
(tentative name). Block state processor/validator, consensus engines have been modified to take aBlockProcessingDB
in place ofStateDB
.AccessListCreationDB
(tentative name) is introduced which implementsBlockProcessingDB
. It wraps access to an innerBlockProcessingDB
instance and is responsible for intercepting state reads/mutations returned fromFinalise
and using these to construct a block access list.StateDB
itself in order to construct BALs, and keep the concept of block-access-lists opaque to theStateDB
.--experimentalbal
is specified. The use-case for this is that I self-validate the BAL-generation and verification in the other larger BAL branch by executing the entire blockchain test spec.TODOs