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

Add ethportal.net tooling #533

Open
1 task done
cryptix opened this issue Jul 14, 2024 · 2 comments
Open
1 task done

Add ethportal.net tooling #533

cryptix opened this issue Jul 14, 2024 · 2 comments

Comments

@cryptix
Copy link

cryptix commented Jul 14, 2024

Context

I've seen a talk by Nick from the folks of ethportal.net at ethCC[7] last week. It was really inspiring and cool to see how far along they are and how many clients already exist for it. Here is an overview if you haven't heard of it yet. The gist of the idea is splitting up the data a fullnode holds BitTorrent-style. Especially with EIP-4444 coming up work like this will be crucial to not have historical data vanish behind paywalls.

I chatted with him a bit after his talk and while it's still a bit experimental / testnet only I'd love to have a streamlined way to build their tools on nix.

Description

Add their first party clients

  • trin - network client in rust
  • glados - network explorer in rust, with an web interface.

Before submitting

  • I have verified that my idea is a change request and not a bug report
@cryptix
Copy link
Author

cryptix commented Jul 14, 2024

I'm fairly familiar with nix but no so much with rust. While I was able to build glados in an ad-hoc nix-shell -p rustc cargo libiconv darwin.apple_sdk.frameworks.SystemConfiguration., this failed for trin because it needs rustc 1.79.0 and my nixpkgs still only has 1.78.0.

I therefore tried to copy the reth package description and adopt it to build trin. However I'm running into this odd error and was hoping someone here more familiar with the rust toolset has any insight:

error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'trin-v0.1.1'
         whose name attribute is located at /nix/store/wzx1ba5hqqfa23vfrvqmfmkpj25p37mr-source/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'cargoDeps' of derivation 'trin-v0.1.1'

         at /nix/store/wzx1ba5hqqfa23vfrvqmfmkpj25p37mr-source/pkgs/build-support/rust/build-rust-package/default.nix:101:10:

          100| } // {
          101|   inherit buildAndTestSubdir cargoDeps;
             |          ^
          102|

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: No hash was found while vendoring the git dependency alloy-consensus-0.1.0. You can add
       a hash through the `outputHashes` argument of `importCargoLock`:

       outputHashes = {
         "alloy-consensus-0.1.0" = "<hash>";
       };

       If you use `buildRustPackage`, you can add this attribute to the `cargoLock`
       attribute set.

I do have the cargoLock.outputHashes attributes, even with that dependency, as reth also needs it. So i'm a bit confused why it doesn't take / see it. Maybe this could be a workspace issue? trin and glados both have multiple sub-projects but it seems like glados is building fine... I will polish up my WIP branch in a bit.

@cryptix
Copy link
Author

cryptix commented Jul 14, 2024

My WIP is at https://github.com/cryptix/ethereum.nix/tree/add-ethportal I based it on #523 for a more recent rustc version.

All the glados tooling is there but trin still fails to compile with the above issue.

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

No branches or pull requests

1 participant