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

devp2p/client: upgrade to eth/66 #1331

Merged
merged 8 commits into from
Jul 8, 2021
Merged

devp2p/client: upgrade to eth/66 #1331

merged 8 commits into from
Jul 8, 2021

Conversation

ryanio
Copy link
Contributor

@ryanio ryanio commented Jul 2, 2021

This PR upgrades devp2p and client to communicate eth/66 since geth plans to deprecate eth/65 after london is activated on mainnet.

I updated devp2p's peer-communication.ts which was working for me (would appreciate someone else to run it to verify everything looks good), along with client's full sync with npm run client:start.

devp2p has no breaking changes as the payload logic is handled in the client, but the client will no longer support versions prior to eth/66 since structural changes needed to be made to support the encoding and decoding of messages to handle the new reqId field.

@codecov
Copy link

codecov bot commented Jul 2, 2021

Codecov Report

Merging #1331 (63fce78) into master (103402b) will decrease coverage by 1.34%.
The diff coverage is 65.78%.

Impacted file tree graph

Flag Coverage Δ
block 85.68% <ø> (+0.16%) ⬆️
blockchain 83.49% <ø> (+0.06%) ⬆️
client 83.94% <64.86%> (+0.05%) ⬆️
common 94.01% <ø> (ø)
devp2p 83.32% <100.00%> (-0.38%) ⬇️
ethash 82.83% <ø> (ø)
tx 88.36% <ø> (+0.11%) ⬆️
vm 79.23% <ø> (-3.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

I was able to successfully run peer-communication.ts so that looks good. As far as syncing the chain, here are my observations:

  • mainnet, ropsten, and goerli all start syncing just fine
  • rinkeby doesn't seem to find any suitable peers so not sure if the bootnodes there just haven't adopted eth/66 or not
  • kovan won't start syncing though that doesn't appear to be an issue related to this PR as it throws the same error when trying to sync from the master branch

packages/client/lib/sync/fetcher/blockfetcher.ts Outdated Show resolved Hide resolved
@acolytec3
Copy link
Contributor

Ironically, it looks like my suggested change is causing the CI to fail though I can say with confidence that this is not always falsy. Is this a case of //@ts-ignore or whatever the equivalent linter ignore command is?

error: Unnecessary conditional, value is always falsy (@typescript-eslint/no-unnecessary-condition) at lib/sync/fetcher/blockfetcher.ts:33:10:
  31 |       })
  32 |     )[1]
> 33 |     if (!headers) {

@ryanio ryanio merged commit 2bcfc40 into master Jul 8, 2021
@ryanio ryanio deleted the eth-66 branch July 8, 2021 17:56
@holgerd77
Copy link
Member

Cool! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants