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

Issues with running on the ethereum merge testnets #132

Open
parithosh opened this issue Dec 3, 2021 · 3 comments · May be fixed by #145
Open

Issues with running on the ethereum merge testnets #132

parithosh opened this issue Dec 3, 2021 · 3 comments · May be fixed by #145

Comments

@parithosh
Copy link
Contributor

Description

I tried to run dshackle in front of a geth execution client for the etherum testnet merge-devnet-2 with the following config:

version: v1
port: 2449
tls:
  enabled: false

proxy:
  host: 0.0.0.0
  port: 2450
  routes:
    - id: eth
      blockchain: ethereum

cluster:
  defaults:
    - chains:
        - ethereum
  upstreams:
    - id: geth
      chain: ethereum
      connection:
        ethereum:
          rpc:
            url: "http://localhost:8550"

Dshackle fails to update its height as shown by the logs:

2021-03-12 20:10:35.650 | INFO  |          Multistream | State of ETH: height=21611, status=[UNAVAILABLE/1], lag=[0], weak=[geth]
2021-03-12 20:10:50.641 | INFO  |          Multistream | State of ETH: height=21611, status=[OK/1], lag=[0], weak=[]
2021-03-12 20:11:05.642 | INFO  |          Multistream | State of ETH: height=21611, status=[OK/1], lag=[0], weak=[]
2021-03-12 20:11:35.642 | INFO  |          Multistream | State of ETH: height=21611, status=[OK/1], lag=[0], weak=[]
2021-03-12 20:12:05.642 | INFO  |          Multistream | State of ETH: height=21611, status=[OK/1], lag=[0], weak=[]

Dshackle seems to find a height during the startup process and never updates it even though the chain progresses.
So when i request for the eth_getBlockByNumber latest block, i always get the one shown in the logs as height. However, manually requesting for a newer block works fine.

However this behaviour isn't seen on mainnet, i aimed my Dshackle towards a mainnet node and it updates/works fine.

This leads me to believe its an issue with the change in behaviour introduced by the merge testnets.

How to reproduce:

  • Sync a merge devnet Execution client(eth1)+Consensus client(eth2) pair(both are needed for the merge testnet): instructions
  • Configure Dshackle to the Execution client RPC port
  • Test the call eth_getBlockByNumber with latest, multiple times with some gap in between

Potential theories:

  • It seems like Dshackle has some logic around Total difficulty to check if a block is to be updated, merge testnets after "the merge" will have the same difficulty throughout - meaning Dshackle might not update its understanding of the latest block
  • ??

Other debug steps I tried:

  • I ran a json rpc snooper to capture all req/responses and compared them between the merge and mainnet nodes. The JSON bodies are unchanged. Dshackle does seem to be calling eth_blockNumber and receiving a later block than shown by height, it is also using this new block in the subsequent eth_getBlockByNumber call - however it doesn't seem to be updating its view afterwards.

Note:

  • The merge-devnets are re-launched every week, I'd be happy to point to newer instructions/configs or even keep this one around.
  • I'm unsure if the maintainers are aware of the merge changes, I'd be happy to answer questions/forward to more knowledgeable people if needed.
  • Thank you so much for looking at my issue :)
@skylenet
Copy link
Contributor

skylenet commented Dec 4, 2021

Nice! @splix maybe you know how we can quickly hack this together to make it work.

As @parithosh described it well, we think the main issue is that after the merge the difficulty field becomes 0 on every block. We suspect that it has something to do with that.

More infos on that change is here: https://blog.ethereum.org/2021/11/29/how-the-merge-impacts-app-layer/

Would be cool if you could point us or help us on this one as we're trying to use Dshackle for the public merge testnets 🙏

@ligi ligi linked a pull request Jan 20, 2022 that will close this issue
@MysticRyuujin
Copy link
Contributor

bump!

@splix
Copy link
Member

splix commented Mar 29, 2022

I started to work on supporting The Merge. No strategy so far but thinking how it can work with Dshackle. Just letting you know

vdoflip pushed a commit to jit-strategies/dshackle that referenced this issue Aug 1, 2023
* add detailed upstream availability metrics

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

Successfully merging a pull request may close this issue.

4 participants