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

Improve EthersDB #1208

Merged
merged 5 commits into from
Mar 22, 2024
Merged

Improve EthersDB #1208

merged 5 commits into from
Mar 22, 2024

Conversation

CorrM
Copy link
Contributor

@CorrM CorrM commented Mar 18, 2024

Improve EthersDB:

  • Rewrite(kinda) new function.
  • Add set_block_number function.
  • Remove unnecessary async blocks.

Why i need to re-create EthersDB instance?
Your node will not querying data 10 minutes old. more info here.

Also im fan of reuse memory, memory are cheap but i prefer to not waste it nor re-create instance.

example of the error:

JsonRpcError { code: -32000, message: "error: missing trie node cd677575d733d1d9478ca4c8af9fc9991d98487964f595750c14a3675c1c86db (path 08) <nil>", data: None })

  - Rewrite(kinda) `new` function.
  - Add `set_block_number` function.
  - Move `block_on` function to separate module.
Add `utils` module.
@CorrM
Copy link
Contributor Author

CorrM commented Mar 18, 2024

@rakita Why it fails to pass tests. it build successfully

@rakita
Copy link
Member

rakita commented Mar 18, 2024

Don't spill the tokio outside the ethersdb as it is behind the feature flag. it fails as it want to build it as no_std.
That function does not make sense outside of ethersdb.rs file.

Copy link
Member

@rakita rakita 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 09df19c into bluealloy:main Mar 22, 2024
25 checks passed
fubuloubu pushed a commit to ApeWorX/revm that referenced this pull request Apr 11, 2024
* Improve EthersDB:
  - Rewrite(kinda) `new` function.
  - Add `set_block_number` function.
  - Move `block_on` function to separate module.
Add `utils` module.

* Remove `utils` module.

* Remove async blocks

* Make fmt happy

* Add `use super::*` back.
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.

2 participants