-
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
feat: new engine API handler #8559
Conversation
following progress |
crates/engine/tree/src/engine.rs
Outdated
/// Requests that are buffered and need to be processed. | ||
buffered_events: VecDeque<()>, |
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.
would these be for example. any skipped FCU? assuming incoming_requests
would correspond to requests that have never been processed before
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.
ah, these are internal events that will be popped from the vecdeque on poll
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.
looking gud
crates/engine/tree/src/engine.rs
Outdated
// TODO: should this type spawn the jobs and have access to tree internals or should this be | ||
// entirely handled by the tree handler? basically |
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.
imo by tree handler, no need to introduce extra complexity here
crates/engine/tree/src/tree.rs
Outdated
/// | ||
/// TODO: design: should the engine handler functions also accept the response channel or return the | ||
/// result and the caller redirects the response | ||
pub trait EngineApiTreeHandler: Send + Sync + Clone { |
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.
we also need a separate method for finalizing at block height
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.
and per discussion in discord we should also allow buffering & committing transactions separate from the state/tree/historical indices?
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.
these are tree implementation details that have nothing to do with the interfaces. the tree should be able to decide on its own when to buffer / commit
crates/engine/tree/src/chain.rs
Outdated
/// Ack paused write access to the database | ||
WriteAccessPaused, | ||
/// Operating in write-access mode | ||
WriteAccess, |
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.
WriteAccess, | |
WriteAccessStarted, |
crates/engine/tree/src/chain.rs
Outdated
/// Events/Requests that the [`ChainHandler`] can emit to the [`ChainOrchestrator`]. | ||
#[derive(Debug, Clone)] | ||
pub enum HandlerEvent { | ||
Pipeline(PipelineAction), |
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.
Pipeline(PipelineAction), | |
PipelineTriggered(PipelineAction), |
crates/engine/tree/src/chain.rs
Outdated
#[must_use = "Stream does nothing unless polled"] | ||
pub struct ChainOrchestrator<T> | ||
where | ||
T: ChainHandler, | ||
{ | ||
/// The handler for advancing the chain. | ||
handler: T, | ||
/// Controls pipeline sync. | ||
pipeline: (), | ||
/// Additional hooks (e.g. pruning) that can require exclusive access to the database. | ||
hooks: (), | ||
} |
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 really like how this captures the pipeline into live sync transition along with the hooks, and the live sync logic is a general handler where you don't need to know anything about its internals except where it drove the chain
crates/engine/tree/src/chain.rs
Outdated
pub enum ChainEvent { | ||
/// Pipeline sync started | ||
PipelineStarted, | ||
} |
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.
Will ExEx hook on these chain notifications?
crates/engine/tree/src/tree.rs
Outdated
pub struct TreeState { | ||
// TODO: this is shared state for the blocks etc. | ||
} |
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.
should the types here be CoW?
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.
good start, very excited for the event driven design
crates/engine/tree/src/tree.rs
Outdated
/// | ||
/// TODO: design: should the engine handler functions also accept the response channel or return the | ||
/// result and the caller redirects the response | ||
pub trait EngineApiTreeHandler: Send + Sync + Clone { |
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.
and per discussion in discord we should also allow buffering & committing transactions separate from the state/tree/historical indices?
crates/engine/tree/src/chain.rs
Outdated
/// Controls pipeline sync. | ||
pipeline: (), | ||
/// Additional hooks (e.g. pruning) that can require exclusive access to the database. | ||
hooks: (), |
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 wonder if Pruning
has been all along the wrong way to think about it, and instead we should have an Archiver
hook, and we implement Archiver
for a Static Files Hook and for a State Diffs hook?
crates/engine/tree/src/chain.rs
Outdated
/// A trait that advances the chain by handling actions. | ||
/// | ||
/// This is intended to be implement the chain consensus logic, for example `engine` API. | ||
pub trait ChainHandler: Send + Sync { | ||
/// Informs the handler about an event from the [`ChainOrchestrator`]. | ||
fn on_event(&mut self, event: FromOrchestrator); | ||
|
||
/// Polls for actions that [`ChainOrchestrator`] should handle. | ||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<HandlerEvent>; | ||
} |
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.
This is really good because it completely generalizes between a handler that's for Engine API For L1 usage, an optimized Engine API Handler for OP Sequencer usage which does FCU->GP->NP in a loop instead of allowing forking, or a handler for usage with ABCI or other consensus interfaces.
crates/engine/tree/src/engine.rs
Outdated
/// Receiver for incoming requests that need to be processed. | ||
// TODO add stream type for T::Request, | ||
incoming_requests: (), |
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.
These receivers should be polled in a spawned task in the background right? or will the Engine Handler itself be the thing that's spawned in the background?
crates/engine/tree/src/engine.rs
Outdated
/// Access to the network sync to download blocks on demand. | ||
network_sync: (), |
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.
When do we need to do this? Is it on long reorgs? Something like snap sync?
/// - `on_forkchoice_updated`: Updates the fork choice based on the new head. These require write | ||
/// access to the database and are skipped if the handler can't acquire exclusive access to the | ||
/// database. |
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.
Could on forkchoice updated buffer up the data instead and have a way to configure when the write to the db is done?
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.
buffering should be done wrt to time out #8251 (comment). we should use a data structure that checks if existing entries are expired on insert
fn buffer_fcu(&mut self, msg: ForkChoiceUpdate) {
let mut iter = self.iter_mut().rev();
let mut entry = iter.next();
let mut expired_count = 0;
while entry.is_some() && entry.unwrap().insert_time.elapsed() >= Duration::from_secs(8) {
expired_count += 1;
}
self.split_off(self.len() - expired_count)
self.push(msg)
}
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.
ref #8579
crates/engine/tree/src/tree.rs
Outdated
payload: ExecutionPayload, | ||
cancun_fields: Option<CancunPayloadFields>, | ||
) -> TreeOutcome<PayloadStatus> { | ||
todo!() |
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.
does this cover also op engine types?
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
} | ||
|
||
/// A type that processes incoming requests (e.g. requests from the consensus layer, engine API) | ||
pub trait EngineRequestHandler: Send + Sync { |
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.
pub trait EngineRequestHandler: Send + Sync { | |
pub trait EngineRequestHandler: Send + Sync + Stream<Item = RequestHandlerEvent<Self::Event>> { |
what is the actual problem here with doing this instead?
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.
it's not a stream
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.
probably it should be though
The Stream trait is similar to Future but can yield multiple values before completing
https://rust-lang.github.io/async-book/05_streams/01_chapter.html
/// - `on_forkchoice_updated`: Updates the fork choice based on the new head. These require write | ||
/// access to the database and are skipped if the handler can't acquire exclusive access to the | ||
/// database. |
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.
buffering should be done wrt to time out #8251 (comment). we should use a data structure that checks if existing entries are expired on insert
fn buffer_fcu(&mut self, msg: ForkChoiceUpdate) {
let mut iter = self.iter_mut().rev();
let mut entry = iter.next();
let mut expired_count = 0;
while entry.is_some() && entry.unwrap().insert_time.elapsed() >= Duration::from_secs(8) {
expired_count += 1;
}
self.split_off(self.len() - expired_count)
self.push(msg)
}
fn on_forkchoice_updated( | ||
&mut self, | ||
state: ForkchoiceState, | ||
attrs: Option<<Self::Engine as PayloadTypes>::PayloadAttributes>, | ||
) -> TreeOutcome<Result<OnForkChoiceUpdated, String>> { | ||
todo!() | ||
} |
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.
this impl should close #6217 right?
* fix: skip failed new payload submission (paradigmxyz#9003) * test: disable dns discovery (paradigmxyz#9004) * chore: remove proptest arbitrary from codec derive and tests (paradigmxyz#8968) * chore(deps): rm unused dev deps (paradigmxyz#9005) * chore(deps): rm provider dep (paradigmxyz#9006) * chore: move ratelimit type to tokio util (paradigmxyz#9007) * chore: move different chain hardfork sets to `reth-ethereum-forks` (paradigmxyz#8984) * chore: remove `AllGenesisFormats` (paradigmxyz#9013) * chore: rename net-common to banlist (paradigmxyz#9016) * chore: remove `serde` from `ChainSpec` (paradigmxyz#9017) * chore: remove unused type (paradigmxyz#9019) * chore: rm serde for network builder (paradigmxyz#9020) * chore: rm default serde feature in reth-dns (paradigmxyz#9021) * chore(op): add link to op labs bedrock datadir download (paradigmxyz#9014) * chore(deps): replace fnv with fx (paradigmxyz#9024) * chore(deps): rm reth-rpc-types dep from reth-network (paradigmxyz#9023) * chore: remove some more usages of BytesMut (paradigmxyz#9025) * chore(deps): weekly `cargo update` (paradigmxyz#9036) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * Change the wrong 'Child' and 'Auxiliary' usage (paradigmxyz#9033) * refactor(rpc): add builder pattern for `EthHandlers` (paradigmxyz#9035) * feat: add `AnyNodeTypes` type (paradigmxyz#9034) * chore: release 1.0.0 (paradigmxyz#9045) * feat(rpc): remove ipc future and now using ServerHandle and StopHandle from jsonrpsee (paradigmxyz#9044) * feat(node): derive `Clone` for `FullNode` (paradigmxyz#9046) * feat: integrate Node traits into LaunchContextWith (paradigmxyz#8993) * ci: use reth-prod.png for release notes (paradigmxyz#9047) * chore: tweak profiles, rename debug-fast to profiling (paradigmxyz#9051) * feat(examples): remote exex (paradigmxyz#8890) * fix: Change Arc<KzgSettings> to EnvKzgSettings (paradigmxyz#9054) * fix(op): configure discv5 properly in op builder (paradigmxyz#9058) * chore: move sync test to separate github action (paradigmxyz#9061) * feat: add base mainnet 10k block sync test to CI (paradigmxyz#9062) * fix: move base sync test comment (paradigmxyz#9066) * docs(examples): add Remote ExEx to README.md (paradigmxyz#9067) * feat: use a binary for sync tests (paradigmxyz#9071) * feat: add AnyNode type (paradigmxyz#9056) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: add empty commands crate (paradigmxyz#9039) * fix: check the correct block in op-sync (paradigmxyz#9073) * fix(ci): inherit profiling in bench profile (paradigmxyz#9072) * clippy: rm outdated clippy allow (paradigmxyz#9070) * chore(trie): `TrieOp::as_update` (paradigmxyz#9076) * chore: simplify OptimismGenesisInfo extraction (paradigmxyz#9031) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * fix(ci): use correct profile for iai benches (paradigmxyz#9081) * chore(hive): update failed tests comments (paradigmxyz#9080) * Using associated trait bound for db error (paradigmxyz#8951) * readme: rm wip note * feat(examples): remove Remote ExEx (paradigmxyz#9085) * feat: initial cli abstraction (paradigmxyz#9082) * perf(trie): hold direct reference to post state storage in the cursor (paradigmxyz#9077) * chore(trie): add helpers to return trie keys as variants (paradigmxyz#9075) * test: include unexpected event in panic (paradigmxyz#9087) * chore(trie): hold direct reference to hashed accounts in cursor (paradigmxyz#9078) * fix: do not drop sub protocol messages during EthStream Handshake (paradigmxyz#9086) * ExEx Discv5 (paradigmxyz#8873) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: add optimism cli crate (paradigmxyz#9096) * feat: reth stage unwind --offline (paradigmxyz#9097) Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> Co-authored-by: Oliver <onbjerg@users.noreply.github.com> * Add a metric for blob transactions nonce gaps (paradigmxyz#9106) * feat(cli): fail on invalid config (paradigmxyz#9107) * chore: import from static files crate directly (paradigmxyz#9111) * chore(deps): bump ratatui 0.27 (paradigmxyz#9110) * test: fix flaky connect (paradigmxyz#9113) * chore: rm beta checks (paradigmxyz#9116) * feat(ci): update GPG key in release workflow (paradigmxyz#9121) * refactor: move `DbTool` type to `db-common` (paradigmxyz#9119) * feat(cli): `reth prune` (paradigmxyz#9055) * refactor: move node-core/engine to standalone crate (paradigmxyz#9120) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * Subprotocol example (paradigmxyz#8991) Co-authored-by: owanikin <oderindeife@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * feat: add temporary docker tag action (paradigmxyz#9126) * fix: remove temp docker tag action (paradigmxyz#9128) * feat: add base fee metrics (paradigmxyz#9129) * feat: add parser functionality to `RethCli` (paradigmxyz#9127) * refactor: extract configuration types to `reth-network-types` (paradigmxyz#9136) * feat(trie): forward-only in-memory cursor (paradigmxyz#9079) * chore: remove empty ban_list.rs file (paradigmxyz#9133) * chore: rm utils.rs from cli crate (paradigmxyz#9132) * chore: move engine-primitives to engine folder (paradigmxyz#9130) * fix: use 8 byte SHA in getClientVersionV1 (paradigmxyz#9137) * fix(docs): Fix links node builder docs (paradigmxyz#9140) * chore(rpc): `reth-eth-api` crate (paradigmxyz#8887) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore(rpc): move impl of eth api server out of `reth-rpc-eth-api` (paradigmxyz#9135) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore(rpc): add me to RPC codeowners (paradigmxyz#9144) * refactor: clean-up discv5 configuration (paradigmxyz#9143) * chore: remove unused methods from `EvmEnvProviders` (paradigmxyz#9148) * chore(static_files): fix hacky type inference (paradigmxyz#9150) * feat: integrate CLI runner in CLI trait (paradigmxyz#9146) * feat: use new `ChainHardforks` type on `ChainSpec` (paradigmxyz#9065) * refactor(node-core/matrics): refactor the register version metrics function (paradigmxyz#9149) * chore: rename `TrieCursorFactory::storage_tries_cursor` to `TrieCursorFactory::storage_trie_cursor` (paradigmxyz#9145) * chore: move `revm_spec` methods from `reth-primitives` to chain specific crates (paradigmxyz#9152) * refactor(net): move node record constants to network-peers crate (paradigmxyz#9161) * chore: fix clippy (paradigmxyz#9163) * feat(trie): in-memory trie node overlay (paradigmxyz#8199) Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com> * chore(storage, provider): rename bundle state with receipts (paradigmxyz#9160) * dev: update `NodeExitFuture` (paradigmxyz#9153) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: fix wrong function name (paradigmxyz#9164) * refactor: reduce number of args for `post_block_balance_increments` (paradigmxyz#9154) * fix: derive arbitrary for tests (paradigmxyz#9167) * fix(net/peer): remove the duplicated disconnect logic (paradigmxyz#9162) Signed-off-by: jsvisa <delweng@gmail.com> * feat(exex): backfill executor (paradigmxyz#9123) * chore: rm redundant clone (paradigmxyz#9174) * chore: remove `tx_env_with_recovered` from rpc crates (paradigmxyz#9158) * chore(trie): remove database-related types from trie keys (paradigmxyz#9175) * chore(ecies): expose ECIESCodec for fuzzing (paradigmxyz#9182) * chore: update audit doc to v2 (paradigmxyz#9177) * chore: rm leftover mods (paradigmxyz#9188) * feat(net/peer): add peer with udp socket (paradigmxyz#9156) Signed-off-by: jsvisa <delweng@gmail.com> * chore: replace raw usage of revm evm builder with EvmConfig usage (paradigmxyz#9190) * chore: finally move node-core to node folder (paradigmxyz#9191) * chore(deps): remove igd-next (paradigmxyz#9200) * chore(deps): weekly `cargo update` (paradigmxyz#9199) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * chore(trie): rename in-memory trie cursors (paradigmxyz#9203) * refactor(net): some refactor in eth requests (paradigmxyz#9205) * refactor(revm): simplify `fill_tx_env` (paradigmxyz#9206) * docs: fix the links to code in discv4 docs (paradigmxyz#9204) * feat(net/peer): set rpc added peer as static (paradigmxyz#9201) Signed-off-by: jsvisa <delweng@gmail.com> * refactor: small refactoring (paradigmxyz#9208) * refactor: some simplifications around revm database (paradigmxyz#9212) * refactor(chainspec): simplify `genesis_header` using default pattern (paradigmxyz#9198) * fix: ambiguous deposit mint value in arbitrary (paradigmxyz#9216) * feat: new engine API handler (paradigmxyz#8559) Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com> Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com> Co-authored-by: Federico Gimenez <fgimenez@users.noreply.github.com> * chore: remove unused `MIN_LENGTH_EIPXXXX_ENCODED` (paradigmxyz#9211) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore(trie): clean up trie update operation matching (paradigmxyz#9202) * chore: add builder with rng secret key fn (paradigmxyz#9218) * chore: remove usage of `tx_env_with_recovered` (paradigmxyz#9222) * chore: remove unused `static-file` code (paradigmxyz#9178) * chore: rename pipeline references to backfill sync (paradigmxyz#9223) * chore(execution): verify cumulative gas used before receipts root (paradigmxyz#9224) * docs(book): remote ExEx chapter (paradigmxyz#8992) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore(trie): store only deleted keys in `TrieWalker` (paradigmxyz#9226) * feat: implement write method on persistence task (paradigmxyz#9225) * chore: extract db commands (paradigmxyz#9217) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * feat(clippy): add `iter_without_into_iter` (paradigmxyz#9195) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com> * fix: typo in book intro (paradigmxyz#9228) * fix(rpc/admin): missing enode/enr in admin_peers endpoint (paradigmxyz#9043) Signed-off-by: jsvisa <delweng@gmail.com> * chore(trie): return nibbles from `TrieCursor::current` (paradigmxyz#9227) * chore: disable discovery for --dev (paradigmxyz#9229) * feat: add pruning related persistence API (paradigmxyz#9232) * chore: move `fill_block_env` to `ConfigureEvmEnv` (paradigmxyz#9238) * chore: add send_action method to persistence task (paradigmxyz#9233) * chore: use format_gas and format_gas_throughput for gas logs (paradigmxyz#9247) * chore: remove prune_modes from BlockWriter (paradigmxyz#9231) * chore: fix pruner exex height docs, add run docs (paradigmxyz#9250) * feat: add ChainspecParser trait (paradigmxyz#9259) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * refactor(evm): set prune modes optionally for the batch executor (paradigmxyz#9176) * feat: add pruner to persistence task (paradigmxyz#9251) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Federico Gimenez <fgimenez@users.noreply.github.com> * feat: add non feature gated noop block reader (paradigmxyz#9261) * refactor: move write_peers_to_file to NetworkManager impl (paradigmxyz#9134) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: simplify p2p subcommand (paradigmxyz#9265) * trie: revamp trie updates (paradigmxyz#9239) * feat: moved optimism commands to create and remove from bin (paradigmxyz#9242) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: move `pre_block_beacon_root_contract_call` to evm crates (paradigmxyz#9244) * feat: add ethereum engine chain orchestrator (paradigmxyz#9241) * feat: add empty ethereum cli crate (paradigmxyz#9268) * test: add unit tests for `save_receipts` (paradigmxyz#9255) * chore(rpc): `EthApi` builder (paradigmxyz#9041) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * feat: add resolve blocking for TrustedNode (paradigmxyz#9258) * test(transaction-pool): add unit tests for `BestTransactionsWithFees` `next` (paradigmxyz#9274) * clippy: rm some `type_complexity` (paradigmxyz#9276) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * test: rm useless unit tests for `calc_next_block_base_fee` (paradigmxyz#9280) * fix: always evaluate build_profile_name at compile time (paradigmxyz#9278) * feat(rpc): enable historical proofs (paradigmxyz#9273) * ci(hive): build `reth` externally (paradigmxyz#9281) * chore: Expose `TrieUpdates` inner fields (paradigmxyz#9277) * chore: use direct link to threshold docs (paradigmxyz#9284) * chore(rpc): rm dup getters `EthApi` (paradigmxyz#9283) * chore: move `withdrawal_requests_contract_call` to `reth-evm` (paradigmxyz#9272) * fix(cli): don't init datadir if it doesn't exist in db command (paradigmxyz#9264) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: rename eth engine module orchestrator -> service (paradigmxyz#9288) * chore(trie): revamp inner in-memory trie cursor representation (paradigmxyz#9287) * perf: resolve trusted nodes concurrently (paradigmxyz#9291) * perf: spawn eth proof on IO pool (paradigmxyz#9293) * feat: add empty optimism rpc crate (paradigmxyz#9295) * ci: re-enable hive tests (paradigmxyz#9240) * feat: feature gate tokio::net lookup (paradigmxyz#9289) * chore: remove unused async (paradigmxyz#9299) * feat(rpc/ots): add rpc erigon_getHeaderByNumber (paradigmxyz#9300) Signed-off-by: jsvisa <delweng@gmail.com> * chore(cli): move utils to `reth-cli-utils` crate (paradigmxyz#9297) * fix: remove useless arbitrary feature (paradigmxyz#9307) * fix(rpc/ots): set block_number as u64 instead of NumberOrTag (paradigmxyz#9302) Signed-off-by: jsvisa <delweng@gmail.com> * feat: extract proof generation into `StateProofProvider` (paradigmxyz#9303) * chore(trie): return mutable prefix sets from `HashedPostState::construct_prefix_sets` (paradigmxyz#9306) * Fix: fix the issue of not being able to specify bootnode through command parameters (paradigmxyz#9237) * feat(trie): allow setting hashed cursor factory on `Proof` (paradigmxyz#9304) * feat: backfill job single block iterator (paradigmxyz#9245) * perf: resolve trusted peers (paradigmxyz#9301) * fix: holesky genesis hash (paradigmxyz#9318) * feat(trie): allow supplying prefix sets to `Proof` (paradigmxyz#9317) * feat(trie): `HashedPostState::account_proof` (paradigmxyz#9319) * github-workflows: delete the direction of dead(deleted) code (paradigmxyz#9316) * fix: no_std build (paradigmxyz#9313) * use op-alloy genesis types for genesis parsing (paradigmxyz#9292) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore(evm): turn associated `ConfigureEvm` fns into methods (paradigmxyz#9322) * qol: purge goerli (paradigmxyz#9310) * Remove fullprovider trait restriction in backfill impls (paradigmxyz#9326) * feat(trie): pass state reference to `StateProofProvider::proof` (paradigmxyz#9308) * feat: op eth api scaffolding (paradigmxyz#9324) * feat: implement `HistoricalStateProviderRef::proof` (paradigmxyz#9327) * feat: log throughput in execution stage (paradigmxyz#9253) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: use `*_GENESIS_HASH` constants on ethereum chainspecs (paradigmxyz#9328) * chore(ci): improve `hive` workflow (paradigmxyz#9320) * chore: move `reth test-vectors` to `cli/commands` with feature (paradigmxyz#9329) * chore: disable `test-utils` for `stages-api` on `stages` (paradigmxyz#9331) * fix: format_gas show two decimal places (paradigmxyz#9336) * chore(deps): trim tokio features in eth-wire (paradigmxyz#9343) * move header.rs to eth-wire-types (paradigmxyz#9345) * chore: move featureless commands from `bin` to `reth-cli-commands` (paradigmxyz#9333) * chore: remove `test-utils`, `arbitrary` and `proptest` from built binary (paradigmxyz#9332) * chore: use usize in internal functions (paradigmxyz#9337) * chore: rm unused optimism feature (paradigmxyz#9342) * test: make eth-wire tests compile with --all-features (paradigmxyz#9340) * chore(meta): fix link in issue template config (paradigmxyz#9349) * chore(deps): rm discv4 dep from eth-wire (paradigmxyz#9344) * chore: dont enable serde by default for eth-wire (paradigmxyz#9339) * chore(meta): remove security link from issue template config (paradigmxyz#9350) * chore: make eyre optional in reth-db (paradigmxyz#9351) * chore: remove cfg'ed use serde (paradigmxyz#9352) * fix: encode block as is in debug_getRawBlock (paradigmxyz#9353) * chore: remove unused private stream type (paradigmxyz#9357) * chore(deps): weekly `cargo update` (paradigmxyz#9354) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * test(tx-pool): add unit tests for `BestTransactions` `add_new_transactions` (paradigmxyz#9355) * feat: add entrypoint and main loop to EngineApiTreeHandlerImpl (paradigmxyz#9334) * feat: adds eth request panels to grafana (paradigmxyz#9026) * feat: Add required trait impls for OpEthApi (paradigmxyz#9341) * feat: eip-7251 (paradigmxyz#9335) * replacing network_handle with peer_info trait object (paradigmxyz#9367) * book: add troubleshooting commands to check disk and memory health and performance (paradigmxyz#9364) Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com> * chore(deps): bump alloy 0.1.4 (paradigmxyz#9368) * feat(pruner): log stats as an ordered list of segments (paradigmxyz#9370) * feat: move mev rpc types to alloy (paradigmxyz#9108) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * feat(tree): validate state root (paradigmxyz#9369) * docs: typos (paradigmxyz#9379) * perf(pruner): delete history indices by changeset keys (paradigmxyz#9312) Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com> Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com> * clippy: rm useless clippy statement (paradigmxyz#9380) * feat(tree): pre-validate fcu (paradigmxyz#9371) * Integrate permits for getproof (paradigmxyz#9363) * feat: add support for payload bodies (paradigmxyz#9378) * chore: move `stage` command to `reth-cli-commands` (paradigmxyz#9384) * feat(rpc/ots): implement ots_getContractCreator (paradigmxyz#9236) Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * refactor(rpc): remove intermediate types from rpc start up process (paradigmxyz#9180) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: fix clippy warnings for needless_borrows_for_generic_args (paradigmxyz#9387) * feat(rpc/ots): implement ots_traceTransaction RPC (paradigmxyz#9246) Signed-off-by: jsvisa <delweng@gmail.com> * chore: update private-testnet.md (paradigmxyz#9389) * feat(rpc/ots): implement ots_getTransactionBySenderAndNonce (paradigmxyz#9263) Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Emilia Hane <emiliaha95@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: release 1.0.1 (paradigmxyz#9388) * fix: support additional eth call bundle args (paradigmxyz#9383) * chore(deps): bump revm 11 (paradigmxyz#9391) * chore(deps): rm reth-codecs dep (paradigmxyz#9390) * chore: fmt, clean, refactor --------- Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com> Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com> Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: leniram159 <leniram159@gmail.com> Co-authored-by: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Co-authored-by: Aurélien <3535019+leruaa@users.noreply.github.com> Co-authored-by: Tien Nguyen <116023870+htiennv@users.noreply.github.com> Co-authored-by: Federico Gimenez <fgimenez@users.noreply.github.com> Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com> Co-authored-by: Omid Chenane <155813094+ochenane@users.noreply.github.com> Co-authored-by: Roman Roibu <roman@roibu.xyz> Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com> Co-authored-by: Vid Kersic <38610409+Vid201@users.noreply.github.com> Co-authored-by: Aditya Pandey <prblmslvr.aditya@gmail.com> Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> Co-authored-by: Luca Provini <lucaprovini1989@gmail.com> Co-authored-by: Oliver <onbjerg@users.noreply.github.com> Co-authored-by: owanikin <oderindeife@gmail.com> Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com> Co-authored-by: Michael Sproul <michael@sigmaprime.io> Co-authored-by: Kien Trinh <51135161+kien6034@users.noreply.github.com> Co-authored-by: Darshan Kathiriya <8559992+lakshya-sky@users.noreply.github.com> Co-authored-by: greged93 <82421016+greged93@users.noreply.github.com> Co-authored-by: Huber <HuberyJulianay@gmail.com> Co-authored-by: Delweng <delweng@gmail.com> Co-authored-by: sboou <sboou@proton.me> Co-authored-by: fdsuuo <161194610+fdsuuo@users.noreply.github.com> Co-authored-by: Ninja <DanielGuupta@gmail.com> Co-authored-by: Luca Provini <luca.provini@usemerkle.com> Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com> Co-authored-by: Querty <98064975+Quertyy@users.noreply.github.com> Co-authored-by: clabby <ben@clab.by> Co-authored-by: yutianwu <wzxingbupt@gmail.com> Co-authored-by: 令狐一冲 <43949039+anonymousGiga@users.noreply.github.com> Co-authored-by: Krishang <93703995+kamuik16@users.noreply.github.com> Co-authored-by: John <devthejohn@gmail.com> Co-authored-by: nk_ysg <nk_ysg@163.com> Co-authored-by: kostekIV <27210860+kostekIV@users.noreply.github.com> Co-authored-by: Park Smith <161195644+sdfii@users.noreply.github.com> Co-authored-by: Qiwei Yang <yangqiwei97@gmail.com> Co-authored-by: d3or <97639237+d3or@users.noreply.github.com> Co-authored-by: SHio <161311766+shiowp@users.noreply.github.com> Co-authored-by: daobaniw <161275194+daobaniw@users.noreply.github.com> Co-authored-by: jn <nxqd.inbox+rhacker@gmail.com> Co-authored-by: Sean Matt <s.matthew.english@gmail.com> Co-authored-by: Barnabas Busa <barnabas.busa@ethereum.org> Co-authored-by: Emilia Hane <emiliaha95@gmail.com>
this will eventually replace the beacon-consensus and changes how it interacts with the tree.
The chain requires some component that advances the chain
Chainhandler
, the beacon-consensus (engine-API) is such a type.internally this make use the treeservice to maintain the blockchain tree.
This would also it possible to run the node without the engine API and use something else.
TBD if pruning+pipeline should be part of chainhandler or whether this should be separate.
all naming TBD