Conversation
onbjerg
left a comment
There was a problem hiding this comment.
Mostly nits, however I'm not sure if this is enough though. MDBX is structured as a top-level Environment from which you get transactions. Each transaction can then fetch/put values from underlying databases which are loaded from a transaction as well. The way libmdbx is structured requires some generics and lifetimes - generics are for the environment type that specifies how the write-map behaves, as well as for the transaction permissions (RW or RO).
I think the way you can think of MDBX is that Environment is the database and the databases in MDBX are tables, so at least the abstractions should account for the difference between tables, the main database and some notion of transactions. Not sure though - wdyt?
878624f to
3e76290
Compare
There is probably some space for different designs, but I see that merging the |
3e76290 to
18574e1
Compare
fix build failures with optimism feature
release: prepare for v0.1.0-beta.1
…igmxyz#14) - Implement committing states for partition and scheduler - Perform `cargo fix -p reth-grevm --allow-dirty`
…igmxyz#14) - Implement committing states for partition and scheduler - Perform `cargo fix -p reth-grevm --allow-dirty`
* test(optimism): Test that sequence stops before a gap (paradigmxyz#18228) * feat(optimism): Warn if `FlashBlockService` has stopped (paradigmxyz#18227) * chore: safe None check (paradigmxyz#18225) * chore: improve flashblock logs (paradigmxyz#18232) * fix(download): use updated merkle base URL (paradigmxyz#18236) * chore(engine): add better logs and spans for execution (paradigmxyz#18240) * chore(trie): use instrument instead of manual span (paradigmxyz#18239) * fix: filter zero storage values when computing withdrawals root in genesis header (paradigmxyz#18213) * perf(reth-optimism-flashblocks): rm redundant clone (paradigmxyz#18196) * perf(txpool): eliminate allocations in basefee enforcement (paradigmxyz#18218) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * docs: update urls in docs (paradigmxyz#18245) * feat(optimism): Respond to ping messages with pong in `WsFlashBlockStream` (paradigmxyz#18212) * test(optimism): Test that `WsFlashBlockStream` pongs a ping (paradigmxyz#18217) * chore: downgrade debug to trace for peer reputation logs (paradigmxyz#18250) * chore: unify engine downloader targets (paradigmxyz#18248) * fix(optimism): Compare parent hash and latest hash to invalidate cached flashblock (paradigmxyz#18238) * feat(optimism): Decode text messages in `WsFlashBlockStream` (paradigmxyz#18257) * chore: remove redundant payload trait bounds (paradigmxyz#18262) * feat(optimism): Respond to close messages in `WsFlashBlockStream` (paradigmxyz#18256) * fix(optimism): Reconnect if ws stream ends in `WsFlashBlockStream` (paradigmxyz#18226) * test(optimism): Test that UTF-8 encoded messages are received in `WsFlashBlockStream` (paradigmxyz#18269) * chore: log prune settings on unwind (paradigmxyz#18270) * chore: extract `validate_against_parent_gas_limit` into separate fn (paradigmxyz#18277) * perf: rm redundant collect (paradigmxyz#18281) * perf: build local pending block without updates (paradigmxyz#18271) * perf(db): do not heap-allocate the stage key per query (paradigmxyz#18284) * chore(txpool): add sanity tests for blob fee bit handling (paradigmxyz#18258) * fix: check prune checkpoints for unwind target limit (paradigmxyz#18263) * perf: optimize send raw batching (paradigmxyz#18280) * perf: specialize single batch request (paradigmxyz#18289) * chore: delist unused deps with `cargo-machete` (paradigmxyz#18259) * test(optimism): Test that close message is responded to in `WsFlashBlockStream` (paradigmxyz#18268) * perf: specialize validate_transactions_with_origin for task validator (paradigmxyz#18288) * feat(metrics): add `TxPoolValidatorMetrics` to track inflight validation jobs (paradigmxyz#18295) * feat(gpo): add default fee price argument (paradigmxyz#18297) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * feat: introduce setting for delegated txs slots (paradigmxyz#18298) * feat: expose `EvmEnv` to `caller_gas_allowance` (paradigmxyz#18302) * perf: specialize len 1 (paradigmxyz#18307) * chore: fix various typos in comments and documentation (paradigmxyz#18296) * perf(e2e-test-utils): optimize block checking by fetching header instead of full block (paradigmxyz#18254) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * feat: introduce maybe_pending method to StateProviderFactory (paradigmxyz#18260) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: clippy happy (paradigmxyz#18310) * feat(download): support zst archives in reth download (paradigmxyz#18237) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore: introduce validationtask with capacity (paradigmxyz#18291) * chore(deps): weekly `cargo update` (paradigmxyz#18312) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * fix(rpc): error code `eth_sendRawTransactionSync` timeout (paradigmxyz#18252) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * chore(trie): dont warn on blinded node reveals (paradigmxyz#18317) * refactor(optimism): Extract pending block building responsibility out of `FlashBlockService` (paradigmxyz#18247) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> * refactor: change PendingPool and PendingTransaction visibility to pub (paradigmxyz#18267) * refactor(engine): persistence logic (paradigmxyz#18318) * feat(optimism): flashblock completed sequences (paradigmxyz#18272) * feat(trie): Add helper sub-command (paradigmxyz#18301) * ci: pin Rust to 1.88 when building for Windows in Cross (paradigmxyz#18320) * docs(reth-bench): fix markdown (paradigmxyz#18322) * fix(bench): fix deadlock in test data generation (paradigmxyz#18321) * fix(stateless): verify_execution_witness doc for pre-state mismatch (paradigmxyz#18319) * fix: DB benches (paradigmxyz#18314) * chore: bump version 1.7.0 (paradigmxyz#18323) --------- Co-authored-by: Roman Hodulák <roman.hodulak@polyglot-software.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com> Co-authored-by: Ivan Wang <wff19940326@gmail.com> Co-authored-by: nk_ysg <nk_ysg@163.com> Co-authored-by: YK <chiayongkang@hotmail.com> Co-authored-by: quantix9 <quantix9@proton.me> Co-authored-by: Hai | RISE <150876604+hai-rise@users.noreply.github.com> Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com> Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com> Co-authored-by: zhygis <5236121+Zygimantass@users.noreply.github.com> Co-authored-by: James Niken <155266991+dizer-ti@users.noreply.github.com> Co-authored-by: Femi Bankole <llordbanks500@gmail.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: Emilia Hane <elsaemiliaevahane@gmail.com> Co-authored-by: Brian Picciano <me@mediocregopher.com> Co-authored-by: kien-rise <157339831+kien-rise@users.noreply.github.com> Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com> Co-authored-by: Julio <30329843+julio4@users.noreply.github.com> Co-authored-by: radik878 <radikpadik76@gmail.com>
* feat: add bsc snapshot table * Update crates/storage/db-api/src/tables/mod.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Clyde <clyde.m@nodereal.io> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The main point for this pull request is to show
Tabletrait abstraction and how it is used insideExecutorDb.Tableis then implemented by DbDetails: I am not sure what are best options to have: as maybe having
TableMutandTableto haveinesrtas&mut self, or maybe an additionalget_reffunction that would return reference value.Added a few more types and some dummy interfaces for consensus and executor.