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: port the node task to hardhat v3 #6025

Merged
merged 3 commits into from
Dec 18, 2024
Merged

feat: port the node task to hardhat v3 #6025

merged 3 commits into from
Dec 18, 2024

Conversation

galargh
Copy link
Member

@galargh galargh commented Dec 6, 2024

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

In this PR, I port the node task from v2 to v3. I describe my design choices in https://www.notion.so/nomicfoundation/Node-Task-154578cdeaf5802c870ee4c7ea7a05ba (this doc should be helpful in guiding the review)

Follow-ups

Testing

  1. I successfully started a node using hardhat3 node and deployed a contract from the v2 sample project to it using ignition.
  2. I added a test case in which I start a JSON RPC server from an EDR provider, create an additional HTTP provider pointing at the server, and compare responses to an eth_chainId request. The test suite could definitely be expanded.

Copy link

changeset-bot bot commented Dec 6, 2024

⚠️ No Changeset found

Latest commit: 5b91fdb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 11:10am

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

hardhat

Total size of the bundle: 228M
Total number of dependencies (including transitive): 61

List of dependencies (sorted by size)
224M	total
30M	@ignored/edr-optimism-linux-x64-musl
30M	@ignored/edr-optimism-linux-x64-gnu
27M	@ignored/edr-optimism-linux-arm64-musl
27M	@ignored/edr-optimism-linux-arm64-gnu
22M	@ignored/edr-optimism-win32-x64-msvc
21M	@ignored/edr-optimism-darwin-x64
20M	esbuild
20M	@ignored/edr-optimism-darwin-arm64
8.9M	solc
2.8M	@sentry/tracing
2.4M	micro-eth-signer
1.9M	@noble/curves
1.7M	undici
1.2M	@sentry/types
1.2M	@noble/hashes
932K	@sentry/node
920K	@sentry/utils
856K	zod
816K	@ignored/hardhat-vnext-utils
616K	micro-packed
576K	tsx
548K	@sentry/core
504K	fast-equals
492K	@scure/bip39
460K	@ignored/edr
384K	@ignored/edr-optimism
368K	ethereum-cryptography
344K	@sentry/hub
320K	enquirer
288K	@ignored/hardhat-vnext-errors
284K	semver
192K	ws
188K	commander
168K	@scure/base
136K	adm-zip
128K	get-tsconfig
96K	@scure/bip32
92K	chalk
88K	tslib
88K	@sentry/minimal
84K	js-sha3
76K	agent-base
72K	@nomicfoundation/solidity-analyzer
68K	debug
64K	lru_map
64K	https-proxy-agent
60K	@ignored/hardhat-vnext-zod-utils
56K	rfdc
56K	follow-redirects
48K	memorystream
48K	command-exists
48K	ansi-colors
44K	tmp
40K	resolve-pkg-maps
36K	p-map
32K	cookie
24K	strip-ansi
24K	env-paths
24K	ansi-regex
20K	os-tmpdir
20K	ms

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@galargh galargh changed the title [WIP - not ready for review] feat: port the node task to hardhat v3 feat: port the node task to hardhat v3 Dec 10, 2024
@galargh galargh marked this pull request as ready for review December 10, 2024 16:50
@galargh
Copy link
Member Author

galargh commented Dec 10, 2024

@schaable Tagging you for a review, too, as per our initiative to spread the process. https://www.notion.so/nomicfoundation/Node-Task-154578cdeaf5802c870ee4c7ea7a05ba should be helpful for a little more context.

Copy link
Member

@schaable schaable left a comment

Choose a reason for hiding this comment

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

Hey Piotr! Overall, this looks good, but I’ve left a couple of comments. Feel free to make a decision on the ones marked as minor and consider them resolved.

return;
}

if (Array.isArray(jsonHttpRequest)) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we deprecated the sendBatch method in EthereumProvider, so handling multiple requests at once could be unnecessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add a note about that next to the block for now and try to find out if we plan to add support for batch requests in the future.

@galargh
Copy link
Member Author

galargh commented Dec 17, 2024

Thanks @schaable - that was really helpful 🙇 I've tried to address all the comments in 5b91fdb (#6025)

@galargh galargh requested a review from schaable December 17, 2024 11:10
Copy link
Member

@schaable schaable left a comment

Choose a reason for hiding this comment

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

LGTM!

@galargh galargh added this pull request to the merge queue Dec 18, 2024
Merged via the queue into v-next with commit 4aade7e Dec 18, 2024
137 checks passed
@galargh galargh deleted the feat/v-next-node branch December 18, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants