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

Option to create custom node startup #6472

Open
SebastienGllmt opened this issue Mar 14, 2025 · 1 comment
Open

Option to create custom node startup #6472

SebastienGllmt opened this issue Mar 14, 2025 · 1 comment
Assignees
Labels
hardhat-3-alpha Feedback about the Hardhat 3 Alpha status:needs-decision We need to make a decision about this

Comments

@SebastienGllmt
Copy link
Contributor

Feedback

For my project, I want to have a custom way to create a Hardhat node that is instrumented with my own logic instead of the Hardhat one (specifically, we want opentelemetry support)

What worked in Hardhat v2

In hardhat v2, this was possible with either:

  • TASK_NODE_CREATE_SERVER (as mentioned here
  • By simply doing import { JsonRpcServer } from "hardhat/internal/hardhat-network/jsonrpc/server.js";

Why it doesn't work in Hardhat v3

In Hardhat v3, this is not possible:

  1. There is not only a monlithic node which not only does too much for my use-case, it also has no return type
  2. Doing import { JsonRpcServer } from "hardhat/internal/builtin-plugins/node/json-rpc/server.ts"; doesn't work because the path is not publicly exported

I can copy-paste the contents as-is, but that's not ideal since this folder also depends on builtin-plugins/network-manager as well

@SebastienGllmt SebastienGllmt added the hardhat-3-alpha Feedback about the Hardhat 3 Alpha label Mar 14, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Mar 14, 2025
@kanej kanej assigned kanej and unassigned ChristopherDedominici Mar 14, 2025
@kanej kanej added status:needs-decision We need to make a decision about this and removed status:triaging labels Mar 14, 2025
@kanej
Copy link
Member

kanej commented Mar 14, 2025

Hey @SebastienGllmt thanks for opening the issue. Can I try and understand the use case more clearly.
The goal is to get opentelemetry integrated with all requests going through the Hardhat node connecting to a remote network? And it looks as if there aren't appropriate extension points or the equivalent of HH2 where you could create a server and wrap with opentelemetry support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardhat-3-alpha Feedback about the Hardhat 3 Alpha status:needs-decision We need to make a decision about this
Projects
Status: Backlog
Development

No branches or pull requests

3 participants