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

common: add calaveras #1286

Merged
merged 2 commits into from
Jun 8, 2021
Merged

common: add calaveras #1286

merged 2 commits into from
Jun 8, 2021

Conversation

ryanio
Copy link
Contributor

@ryanio ryanio commented Jun 7, 2021

This PR adds the latest ephemeral testnet chain Calaveras to common.

@ryanio
Copy link
Contributor Author

ryanio commented Jun 7, 2021

My first runs on the client are unsuccessful with a subprotocol error, although the STATUS debug message seems accurate, can someone else give the client a run with DEBUG=devp2p* npm run client:start -- --network=calaveras and see if the chain starts syncing?

devp2p:rlpx:peer Received HELLO (message code: 0 - 0 = 0) 3.9.20.133:30303 +0ms
  devp2p:rlpx:peer Send HELLO to 3.9.20.133:30303 +1ms
  devp2p:rlpx handshake with 3.9.20.133:30303 was successful (peer eip8 ack) +1ms
  devp2p:eth Send STATUS message to 3.9.20.133:30303 (eth65): [V:65, NID:123, TD:1, BestH:eb9233d, GenH:eb9233d, ForkHash: 0x49f2f6b6, ForkNext: 500] +2ms
  devp2p:rlpx:peer Received header 3.9.20.133:30303 +302ms
  devp2p:rlpx:peer Received body 3.9.20.133:30303 01c110 +0ms
  devp2p:rlpx:peer Received DISCONNECT (message code: 1 - 0 = 1) 3.9.20.133:30303 +0ms
  devp2p:rlpx:peer DISCONNECT reason: SUBPROTOCOL_ERROR 3.9.20.133:30303 +0ms

I've run into SUBPROTOCOL_ERROR on my local before in other unrelated runs, so I am not sure if it might just be me.

@holgerd77
Copy link
Member

Your fork hashes are wrong, you need to calculate with:

import Common from './src'
let c = new Common({ chain: 'calaveras' })
c._calcForkHash('chainstart') // '0xe34c4aff'

And so on...

@ryanio
Copy link
Contributor Author

ryanio commented Jun 7, 2021

ah thanks, I actually wrote a little script to do that and was surprised it outputted the same fork hashes as baikal, I'll check my code when I'm back on my computer and add a commit to fix.

@codecov
Copy link

codecov bot commented Jun 8, 2021

Codecov Report

Merging #1286 (dc77c19) into master (c765b81) will decrease coverage by 2.04%.
The diff coverage is 100.00%.

Impacted file tree graph

Flag Coverage Δ
block 86.44% <ø> (+0.24%) ⬆️
blockchain 84.36% <ø> (-0.07%) ⬇️
client 84.48% <ø> (ø)
common 88.70% <100.00%> (+0.49%) ⬆️
devp2p 83.61% <ø> (-0.68%) ⬇️
ethash 82.83% <ø> (ø)
tx 88.35% <ø> (-0.13%) ⬇️
vm 81.35% <ø> (-5.71%) ⬇️

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

@ryanio
Copy link
Contributor Author

ryanio commented Jun 8, 2021

great thanks again @holgerd77, updating those fork hashes got me syncing :)
cool to see the
Execution hardfork switch on block number=500 hash=e96eae6d... old=berlin new=london
and no hiccups with the tx heavy blocks on the transition

Screen Shot 2021-06-07 at 8 48 36 PM

@ryanio
Copy link
Contributor Author

ryanio commented Jun 8, 2021

have gotten stuck at block 2100 twice now from fresh starts.

i restarted with devp2p debug and stuck in a loop of...

  devp2p:eth Send GET_BLOCK_BODIES message to 3.9.20.133:30303: f90672a0ed0b123b93c05771ae8c842746e3b28899515c1a7804b27e3e9a... +5ms
  devp2p:rlpx:peer Received header 3.9.20.133:30303 +150ms
  devp2p:rlpx:peer Received body 3.9.20.133:30303 16f896c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0... +1ms
  devp2p:rlpx:peer Received undefined (message code: 22 - 16 = 6) 3.9.20.133:30303 +0ms
  devp2p:eth Received BLOCK_BODIES message from 3.9.20.133:30303: f896c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2... +0ms
  devp2p:eth Send GET_BLOCK_HEADERS message to 3.9.20.133:30303: c6820961328080 +8ms
  devp2p:rlpx:peer Received header 3.9.20.133:30303 +302ms
  devp2p:rlpx:peer Received body 3.9.20.133:30303 14f9762af9025aa05d1fa361b99666d14dd6c81903bfcc4b69cab3d5b250... +5ms
  devp2p:rlpx:peer Received undefined (message code: 20 - 16 = 4) 3.9.20.133:30303 +0ms
  devp2p:eth Received BLOCK_HEADERS message from 3.9.20.133:30303: f9762af9025aa05d1fa361b99666d14dd6c81903bfcc4b69cab3d5b250ad... +0ms
  devp2p:eth Send GET_BLOCK_BODIES message to 3.9.20.133:30303: f90672a083873023d95be49a561e0351faf35202fc1aa4f92978e44a428d... +4ms
  devp2p:rlpx:peer Received header 3.9.20.133:30303 +153ms
  devp2p:rlpx:peer Received body 3.9.20.133:30303 16f896c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0... +1ms
  devp2p:rlpx:peer Received undefined (message code: 22 - 16 = 6) 3.9.20.133:30303 +0ms
  devp2p:eth Received BLOCK_BODIES message from 3.9.20.133:30303: f896c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2c0c0c2... +0ms

it seems fine as it receives headers and bodies but also Received undefined, and no blocks actually syncing. no errors output from our libs or anything. it would be cool to see what blocks are actually being requested and returned (although I'm wary of more string interpolation these days 😄). i am also only connected to one peer 3.9.20.133.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Have tested this locally, this now works fine. 😄

@holgerd77 holgerd77 merged commit ef29902 into master Jun 8, 2021
@holgerd77 holgerd77 deleted the add-calaveras branch June 8, 2021 08:05
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.

None yet

2 participants