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

Bump hardhat from 2.10.2 to 2.11.0 #315

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 5, 2022

Bumps hardhat from 2.10.2 to 2.11.0.

Release notes

Sourced from hardhat's releases.

Hardhat v2.11.0 — The Merge support and fast compilation

We are excited to release this new version of Hardhat, as it makes Hardhat Network compatible with The Merge and makes our compilation much faster. Read on to learn more about these and other improvements.

Support for The Merge

Hardhat Network now has support for The Merge. To try it out, use the new merge hardfork setting. This hardfork is not selected by default, but you can enable it in your config:

module.exports = {
  networks: {
    hardhat: {
      hardfork: "merge"
    }
  }  
};

Selecting this new hardfork will introduce a few changes to how Hardhat Network runs, but your contracts should still work without any modification. The rest of this section explains what these changes are.

The DIFFICULTY opcode (now renamed to PREVRANDAO) will return a pseudo-random value. This value is also exposed in the block header as mixHash.

You can use the new hardhat_setPrevRandao RPC method to modify the value returned by DIFFICULTY/PREVRANDAO in the next block. We recommend using the setPrevRandao network helper for this.

Hardhat Network’s JSON-RPC now accepts the new safe and finalized block tags, which in Hardhat Network are just aliases for the latest block tag, and correspond to the latest block.

Faster compilation

We optimized Hardhat’s compilation pipeline, significantly reducing the overhead it adds on top of solc. Compilation takes 40% less in most workflows, with a few taking 90% less!

How much of an impact this has depends on the size of your project, setup, and workflow, so we’ll explore two examples here, running the same benchmarks on each.

We’ll focus on a few different workflows:

  • Clean compilation: compiling the entire codebase from scratch
  • No recompilation: trying to compile when there has been no modification, and everything is cached.
  • Leaf contract: modifying and recompiling a contract with tons of dependencies but that’s not imported by others after a clean compilation.
  • Deep contract: modifying and recompiling a contract used in the entire codebase after a clean compilation
  • Syntax error: introducing a syntax error to the leaf contract and trying to recompile it after a clean compilation

Open Zeppelin Contracts

This project is an example of a large codebase with a JavaScript setup. We expect most JavaScript projects to see similar or better results.

Workflow Time with Hardhat 2.10.12 Time with Hardhat 2.11.0 Time reduction
Clean compilation 15.37s 8.61s 43.98%
No recompilation 0.67s 0.31s 53.73%
Leaf contract 8.02s 3.06s 61.84%
Deep contract 11.9s 6.96s 41.51%
Syntax error 4.77s 0.36s 92.45%

... (truncated)

Commits
  • 4cce025 Version Packages
  • 780cc17 Merge pull request #3119 from NomicFoundation/no-ga-on-compilation
  • a75de34 Never wait for the GA hit on compilation
  • 32884a2 Merge pull request #3116 from NomicFoundation/downgrade-ethereum-cryptography
  • 344fc9f Use keccak package
  • afafec4 Fix compilation error in test
  • e80b2bb Use new RCs and upgrade ethereum-cryptography just in hh
  • 61e4e54 Downgrade ethereum-cryptography
  • eed0d36 Merge pull request #3112 from NomicFoundation/add-changesets
  • f3ba15c Add changesets
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [hardhat](https://github.com/nomiclabs/hardhat) from 2.10.2 to 2.11.0.
- [Release notes](https://github.com/nomiclabs/hardhat/releases)
- [Commits](https://github.com/nomiclabs/hardhat/compare/hardhat@2.10.2...hardhat@2.11.0)

---
updated-dependencies:
- dependency-name: hardhat
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Sep 5, 2022
@Orland0x Orland0x merged commit 7aa9b13 into develop Sep 5, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/hardhat-2.11.0 branch September 5, 2022 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant