-
Notifications
You must be signed in to change notification settings - Fork 111
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
StateTransitionRunner refactoring. #614
Conversation
Codecov Report
|
6d6e05d
to
9f3aaf6
Compare
@bkolad, does design in this PR accommodates running a prover? Or is it only for a full node? |
Future work: |
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.
Looks amazing overall. Just two small things!
Description
The goal of this PR is to restructure the logic for running the rollup, enabling it to function with various combinations of
Runtime/Data-Availability/State-Transition-Function
. This modification has several benefits:demo-rollup
).After this PR, the responsibilities of the relevant components are as follows:
sov-stf-runner
: Abstracts the logic for executing the STF.demo-stf
: Contains code specific to a particularRuntime
, includinghooks
,configs
, and a concreteSTFR
.demo-rollup
: Uses bothsov-stf-runner
anddemo-stf
, acting as the glue code to initiate the rollup process.The changes introduced in this PR are as follows:
StateTransitionRunner(STFR)
is transformed into a concrete type and moved from therollup-interface
to a separate cratefull-node/sov-stf-runner
. By making it a concrete type, we were able to eliminateDemoAppRunner, NativeAppRunner, and DemoApp
, all of which essentially represent the same type beneath the surface. To simplify matters, we removedDaVerifier
from theSTFR
since it was initially included solely for demonstration purposes. However, it can easily be reintroduced if necessary. The logic for running the rollup lives in therun
method.We eliminated the
RpcRunner
trait. As there were no methods or types reliant on this trait, so we didn't really make use of it.All the
ledger_XXX
rpc methods ware moved tosov-stf-runner
because they are common to any kind of rollup.Future work:
MockDA
and testsov-stf-runner
.demo-prover/host
also has blob processing logic which is similar to the one inSTFR
, but it simultaneously writes to the host. If we hide thehost
behind a trait and make it a noop for thenode
we will be able to extendSTFR
and use it both in theprover
&node
sov-stf-runner
was mostly copied fromdemo-stf
&demo-rollup
and it needs to be cleanup further. For example we have many differentConfigs
with the same name. The code is mostly internal to the crate and don't leak outside.Linked Issues
Testing
Ci passes.
Docs
All related docs to
StateTransitionRunner
updated.