Skip to content
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(provider): Add StorageProvider impl, table changes #172

Merged
merged 8 commits into from
Nov 8, 2022

Conversation

rakita
Copy link
Collaborator

@rakita rakita commented Nov 7, 2022

Added:

  • StorageProvider: db bindings needed for executor. Impl of this contains DbTx and not DB so page caches are used.
  • StorageProviderFactory: allows us to create different StorageProvider: 'latest, history_by_block_num, history_block_block_hash

Additionally few small cleanups: SeekKey removed from Table as SubKey is present in DupTable, remove some lifetime restrictions from DbTx, removed nightly toolchain, added bytecode table.

@rakita rakita marked this pull request as ready for review November 8, 2022 11:30
@rakita rakita requested a review from rkrasiuk November 8, 2022 11:57
@codecov
Copy link

codecov bot commented Nov 8, 2022

Codecov Report

Merging #172 (6ae4ace) into main (1408309) will decrease coverage by 0.12%.
The diff coverage is 38.50%.

@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
- Coverage   70.25%   70.13%   -0.13%     
==========================================
  Files         188      191       +3     
  Lines       15278    15407     +129     
==========================================
+ Hits        10734    10805      +71     
- Misses       4544     4602      +58     
Impacted Files Coverage Δ
crates/db/src/kv/cursor.rs 60.00% <0.00%> (ø)
crates/executor/src/executor.rs 0.00% <0.00%> (ø)
crates/executor/src/revm_wrap.rs 0.00% <0.00%> (ø)
crates/interfaces/src/db/mock.rs 0.85% <0.00%> (ø)
crates/interfaces/src/db/mod.rs 94.73% <ø> (ø)
crates/interfaces/src/db/tables.rs 0.00% <ø> (ø)
crates/interfaces/src/error.rs 100.00% <ø> (ø)
crates/interfaces/src/executor.rs 0.00% <ø> (ø)
...rates/interfaces/src/provider/db_provider/block.rs 0.00% <0.00%> (ø)
crates/interfaces/src/provider/error.rs 0.00% <0.00%> (ø)
... and 14 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! left minor suggestions

crates/interfaces/src/provider/db_provider/storage.rs Outdated Show resolved Hide resolved
crates/interfaces/src/provider/db_provider/storage.rs Outdated Show resolved Hide resolved
rakita and others added 2 commits November 8, 2022 14:57
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rakita rakita merged commit 7ecbe01 into main Nov 8, 2022
@rakita rakita deleted the rakita/provider_storage branch November 8, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants