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

Private chain hangs out when volumes has been mapped in a docker. #27298

Closed
Gelassen opened this issue May 18, 2023 · 4 comments
Closed

Private chain hangs out when volumes has been mapped in a docker. #27298

Gelassen opened this issue May 18, 2023 · 4 comments
Labels

Comments

@Gelassen
Copy link

System information

Geth version: 1.11.6-stable-ea9e62ca
CL client & version: nope
OS & Version: Ubuntu 22.04.2 LTS
Commit hash : nope

Expected behaviour

Miner starts generate blocks

geth-miner         | INFO [05-18|10:56:28.692] Generating DAG in progress               epoch=1 percentage=24 elapsed=15.332s
geth-miner         | INFO [05-18|10:56:29.292] Generating DAG in progress               epoch=1 percentage=25 elapsed=15.933s
geth-miner         | TRACE[05-18|10:56:29.457] Ethash nonce found and reported          miner=0 attempts=596833 nonce=1909703742858224521
geth-miner         | INFO [05-18|10:56:29.458] Successfully sealed new block            number=1 sealhash="dcc090…a4c095" hash="725f81…54699e" elapsed=1m12.399s
geth-miner         | INFO [05-18|10:56:29.458] 🔨 mined potential block                  number=1 hash="725f81…54699e"
geth-miner         | TRACE[05-18|10:56:29.459] Propagated block                         hash="725f81…54699e" recipients=1 duration=2562047h47m16.854s
geth-miner         | TRACE[05-18|10:56:29.459] Announced block                          hash="725f81…54699e" recipients=0 duration=2562047h47m16.854s
geth-miner         | TRACE[05-18|10:56:29.459] Propagated block                         id=db565fdaf0888786 conn=dyndial number=1 hash="725f81…54699e" td=131073
geth-miner         | INFO [05-18|10:56:29.460] Commit new mining work                   number=2 sealhash="580ab0…212c2a" uncles=0 txs=0 gas=0 fees=0 elapsed="180.76

Actual behaviour

Generating DAG finishes 0 and 1st epochs, but no block has been mined

Steps to reproduce the behaviour

  1. Start eth private chain in docker containers over docker compose up --build
  2. Wait when generating DAG will reach 1st epoch
  3. After generating DAG has finished 0 epoch and starts 1st epoch look for miner starts mining blocks

Backtrace

nope

Additional information

I wrote docker scripts to run private network in containers and it works. After that I added volume mapping to preserve chain state across containers launches, otherwise it started from scratch and chain is building since the beginning. When this volumes sections has been added, my chain stops work properly. Volumes mapping is done in this way for each of all my three nodes:

    volumes:
      - ./eth-chain/miner/geth/chaindata:/tmp/geth/chaindata
      - ./eth-chain/miner/geth/ethash:/tmp/geth/ethash
      - ./eth-chain/miner/ethash:/root/.ethash

Adding this line cause my issue: - ./eth-chain/miner/geth/chaindata:/tmp/geth/chaindata
docker-eth-private-chain.zip

I attach zip archive with all necessary code to reproduce this issue.

@karalabe
Copy link
Member

You should perhaps check if the access performance takes a hit for some reason.

That said, we have already dropped ethash on master and will push it to stable very soon, so you really don't want to rely on PoW any more, it's going away for good. We can definitely check this issue if it still happens on Clique or a PoS network, but PoW is something unsupported from now on.

@Gelassen
Copy link
Author

@karalabe, thank you, I am happy to hear you continue work to make ethereum better, but don't you think dropping support of PoW is a bit early? The only alternative I am familiar with is Clique, I tried it last month and almost immediately faced with a quite severe issue which has been opened 4 years ago and still relevant. It totally blocks its usage for my project.

If you are open to help me further with this issue, could you please clarify what do you mean by " access performance takes a hit"?

@karalabe
Copy link
Member

Wrt PoW, no, it's not early. PoW is meaningless unless you have a global miner network. Anything smaller is just easy enough to attack with off the shelf resources. It just doens't make sense.

Wrt Clique, that was designed always as a quick hack on top of the PoW system to allow running PoA testnets that aren't non-stop attacked. Clique was never meant to be a production consensus system, rather a simple replacement for testnets. It served its purpose well, but at the end of the day it wasn't designed to be fool-proof robust, so an occasional manual resolution is kind of fine.

For production networks, you should really really really run a PoS chain. There's no getting around it, just bit the bullet and read up on it and how to launch one.

@Gelassen
Copy link
Author

Thank you for sharing more info about Clique and the intent behind it. I will check PoS chain, but I would like to finish my PoC first: my project is going to leverage a private network and with authorized nodes it should close vector of attack from malicious user with higher computation resources. (please fix me, if it is not correct)

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

No branches or pull requests

2 participants