-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
chore!: use node v20 throughout monorepo #5730
Conversation
Performance Report✔️ no performance regression detected 🚀🚀 Significant benchmark improvement detected
Full benchmark results
|
Can you confirm the performance regression locally? Seems legit |
This error is only happening in CI, not locally |
Can't reproduce this either, installed several different node versions. Might have to check which node version is actually used in the CI. |
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
No idea what is going on with sim tests, @nazarhussain any ideas? |
This reverts commit e1f07be.
Based on the error, seems like the beacon node had not started.
|
I think it is somehow related with error thrown after updating cross-fetch, still can't make sense of why this produces correct results locally. |
Internally the error says lodestar could not connect to the EL. But Geth is running fine, so it seems like some firewall issue on docker which didn't allowed connecting the host machine to docker container on local IP.
|
I updated cross-fetch because the error was present, but it didn't fix it. |
It seems that node 20 now has |
This reverts commit d296b2f.
await expect(eth1JsonRpcClient.fetch(payload, {timeout})).to.be.rejectedWith(error); | ||
|
||
try { | ||
await eth1JsonRpcClient.fetch(payload, {timeout}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nazarhussain try/catch is problematic here, test case would pass if no error is thrown
Either have to do explicit fail if there is no error like it is done here
expect.fail("Second decrypt should fail due to failure to get lockfile"); |
or can use .to.be.rejected.then
pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I knew that pattern, but we discussed earlier to not use the nested then/catch
and prefer try/catch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case need to explicitly fail the test if there is no error
@@ -8,7 +8,7 @@ | |||
[![Ethereum Consensus Spec v1.1.10](https://img.shields.io/badge/ETH%20consensus--spec-1.1.10-blue)](https://github.com/ethereum/consensus-specs/releases/tag/v1.1.10) | |||
[![codecov](https://codecov.io/gh/ChainSafe/lodestar/branch/unstable/graph/badge.svg)](https://codecov.io/gh/ChainSafe/lodestar) | |||
![ES Version](https://img.shields.io/badge/ES-2020-yellow) | |||
![Node Version](https://img.shields.io/badge/node-18.15.x-green) | |||
![Node Version](https://img.shields.io/badge/node-20.x-green) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wemeetagain I updated this to 20.x as well, not sure if it was intentionally not updated before but as we discussed that we want to advocate for using node 20 I think we should update it here as well.
Last reference to 18.x is in package.json but that might be to disruptive for users to update to 20.x, although we could ensure everyone is using node 20 this way
Line 5 in 1887287
"node": ">=18.15.0" |
@@ -2,7 +2,7 @@ | |||
|
|||
## Prerequisites | |||
|
|||
Make sure to have [Yarn installed](https://classic.yarnpkg.com/en/docs/install). It is also recommended to [install NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) and use the LTS version (currently v18) of [NodeJS](https://nodejs.org/en/). | |||
Make sure to have [Yarn installed](https://classic.yarnpkg.com/en/docs/install). It is also recommended to [install NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) and use the LTS version (currently v20) of [NodeJS](https://nodejs.org/en/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: v20 is not yet LTS version until 2023-10-24, see nodejs-release-working-group for schedule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, everything besides sim tests are using node 20 now.
Ok, when CI is finished running, I'll change the branch rules and merge this |
await expect(eth1JsonRpcClient.fetch(payload, {timeout})).to.be.rejected.then((error) => { | ||
if (testCase.errorCode) { | ||
expect((error as FetchError).code).to.eql(testCase.errorCode); | ||
expect((error as FetchError).code).to.be.equal(testCase.errorCode); | ||
} else { | ||
expect((error as Error).message).includes(testCase.error); | ||
expect((error as Error).message).to.include(testCase.error); | ||
} | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we discussed to no use the nested then/catch
and prefer try/catch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not part of that discussion but in my opinion try/catch in tests should be last resort if there are no other options to use built-in assertion syntax
Regarding the failing sim tests on node 20, it looks like the issue is related to node-fetch and Lighthouse. I am using the script mentioned here #5737 (comment) to fetch the state. For
There is an open issue for it already Edit: I created an issue to track this |
🎉 This PR is included in v1.10.0 🎉 |
Motivation
Since #5611, we support node v20, but we aren't using it everywhere
Description
Update docs, workflows, types, and docker images to use node 20
TODO