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: add Reth node bindings #1092

Merged
merged 42 commits into from
Sep 5, 2024
Merged

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Jul 23, 2024

Motivation

Closes #1062

Solution

Adds reth node bindings and reth to the Github workflow for tests.

The reth binary appears to be incompatible with the Windows CI:

[crates\node-bindings\src\nodes\reth.rs:369:13] &line = "2024-09-04T12:39:10.637528Z  INFO reth::cli: Opening database path=\"C:\\\\Users\\\\RUNNER~1\\\\AppData\\\\Local\\\\Temp\\\\.tmp4XoSee\\\\db\"\n"
[crates\node-bindings\src\nodes\reth.rs:369:13] &line = "2024-09-04T12:39:10.731699Z ERROR reth::cli: shutting down due to error\n"
Error: failed to open the database: environment or database is not compatible with the requested operation or flags (-30784)

Location:
    /project/crates/storage/db/src/mdbx.rs:28:8

For now I've disabled the reth binding tests for Windows.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zerosnacks
Copy link
Member Author

zerosnacks commented Sep 3, 2024

@mattsse I'm running into some issues with reth not closing in a similar way geth and anvil are and I'm not sure whether it is related to the way I'm spawning the binary or how Reth waits for ctrl-c. Is this something you could have a look at?

To run the relevant test: cargo test --package alloy-node-bindings --lib -- nodes::reth::tests::can_launch_reth --show-output

FYI: because reth stays open drop is not called and the temporary directory isn't cleaned up

@zerosnacks
Copy link
Member Author

Github workflow for installing Geth and Reth binary is now fixed, cancelled the last workflow because the test doesn't end.

[crates\node-bindings\src\nodes\reth.rs:369:13] &line = "2024-09-04T12:39:10.637528Z  INFO reth::cli: Opening database path=\"C:\\\\Users\\\\RUNNER~1\\\\AppData\\\\Local\\\\Temp\\\\.tmp4XoSee\\\\db\"\n"
[crates\node-bindings\src\nodes\reth.rs:369:13] &line = "2024-09-04T12:39:10.731699Z ERROR reth::cli: shutting down due to error\n"
Error: failed to open the database: environment or database is not compatible with the requested operation or flags (-30784)

Location:
    /project/crates/storage/db/src/mdbx.rs:28:8
@zerosnacks zerosnacks changed the title draft: add Reth node bindings feat: add Reth node bindings Sep 4, 2024
@zerosnacks zerosnacks marked this pull request as ready for review September 4, 2024 14:48
@mattsse mattsse merged commit 002aed5 into main Sep 5, 2024
29 checks passed
@mattsse mattsse deleted the zerosnacks/add-reth-node-bindings branch September 5, 2024 13:17
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.

[Feature] Add reth node bindings
3 participants