-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Tracking: Staged sync #40
Comments
Great breakdown, agree on all. @rkrasiuk can you pls open an issue for Headers stage? And let's open them one by one as we pursue them. @rakita opened #39 which is relevant to general eth testing of stages, Dragan do you want to open another specific one for how you're going to be approaching the Executor + Execution Stage? |
@onbjerg Noticing there's a bunch of stages in erigon not present here, WDYT? e.g. https://github.com/ledgerwatch/erigon/tree/devel/eth/stagedsync#stage-15-transaction-pool-stage |
It seems we're only missing 2? Transpilation stage, which we can't have because we don't have anything like TEVM, and the txpool stage, but we talked about having block building be a separate part since it's a bit more involved (might be custom, flashbots etc etc) so I don't think having that stage makes sense for us. Instead the block building part will just push down the block elsewhere through the pipeline |
I added an additional trackng issue and reworded existing one:
|
@onbjerg there are things that are common for all consensus types so that thing can be in reth-executor. I am not sure atm if consensus is going to call execution for additional verification or execution is going to call consensus we can see this later. |
@rakita My point is - should these commonalities not be in a consensus crate (or a consensus-traits crate) instead of the execution crate? From what I've seen from e.g. Akula and Erigon, the stage calls consensus and the VM itself does not |
I am not sure to be honest, consensus should contain only different consensus engines, for common things I mean block building, roots, execution etc. I would like to separate them into a standalone crate to have them in one place. I see your point, for the stage side, to not complicate things maybe it is best just to use one trait |
Closing this as it is out of date - the stages have been shuffled around/merged/split etc. We need a few more stages, but those are handled in separate issues. |
Stage abstraction
This abstraction should be mostly done, pending changes related to how the database abstractions evolve - e.g. instead of taking a raw MDBX transaction, we will likely receive another type in the future.
Pipeline
Ran
andUnwound
events are emitted with "special" values that denote that a stage either failed or was skipped. We should just add events for these casesStage::execute
, but realistically this behavior should be tuneable to only commit meaningful progressTooling
tracing
to mark out spans and emit events - we might be able to leverage this info in conjunction with e.g.tracing_tracy
to be able to use Tracy. However, there may be tools that are better suited for profiling in our case.Stages
Initially we will use the good learnings from Akula, which is based on good learnings from Silkworm and Erigon, and essentially delineate the stages around the same boundaries as they have. As we progress, we might need more stages than listed here (or fewer).
For the more complex stages I propose we create separate tracking issues that link back to this one.
BlockNumber -> TotalGas
. Seems to mostly be used for reporting.BlockHash -> BlockNumber
from theBlockNumber -> BlockHash
table built in theHeaderDownload
stageTxId -> Tx
.BlockNumber -> TotalTx
. Seems to only be used for reporting in the next stage.TxHash -> BlockNumber
, used in the RPC to look up transactions by hash.Footnotes
These stages are generally what I would categorize as indexes, which we may be able to generalize somewhat. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
The text was updated successfully, but these errors were encountered: