ethermint-archive icon indicating copy to clipboard operation
ethermint-archive copied to clipboard

Problem with fast-sync and no-fast-sync

Open ebuchman opened this issue 9 years ago • 3 comments

https://github.com/tendermint/ethermint/blob/master/cmd/ethermint/main.go#L121

ebuchman avatar Feb 14 '17 01:02 ebuchman

How is it unpredictable?

ebuchman avatar Feb 18 '17 14:02 ebuchman

  • fast-sync

    • if it was init by init cmd - it looks like it is not downloading full blockchain or doing it too slowwww and will never sync up
    • if only genesis was copied It fails to start with panic: Paniced on a Consensus Failure: +2/3 committed an invalid block: Wrong Block.Header.AppHash. Expected 8F14AD363351A858CD4773E67B83396D933F6D431E3FA00EFACBB5B6628C4EF0, got 31D867CC05C829F5A809465681FB183DAF8EB22BAB5085593FE30E2B18266711
  • no-fast-sync

    • visible that blockchain gets downloaded, but process was stuck multiple times

illya13 avatar Feb 19 '17 12:02 illya13

TLTR: Can not reproduce.

Tested on develop branch.

  • created 4 instances of tendermint/ethermint.
  • patched tendermint genesis for each instance (the same chain_id and validators)
  • started 3 of 4 tendermint/ethermint
  • waited until some blocks are being generated (few minutes)
  • started last (4) tendermint with fast_sync=true. It imported about 20 blocks/sec. Everything is ok
  • stoped 4th instance
  • wait few minutes
  • started last (4) tendermint with fast_sync=false. It takes about 2 blocks/sec. Everything is ok.

Another test case.

  • started 3 of 4 tendermint/ethermint
  • waited until some blocks are being generated (few minutes)
  • stoped one (for example 2nd) node (consensus is stopped too)
  • started 4th node with fast_sync=false. It synced from remain nodes well. After syncing consensus is up and produces new blocks.
  • start stopped node (2nd). it synced well and adds to consensus.

Some not obvious things:

  • the right way to pass boolean param to tendermint via cli is --fast_sync="false" you need quotes.
  • create 3 tendermint node and run together (in genesis the same chain id and 3 validators). Then try to add one more validator (in genesis the same chain id, 3 prev validator + 1 our new) and start syncing. You will get error Invalid commit -- wrong set size: 4 vs 3. This is because it compare count of validators in current instance with validators in block. Is it correct?

/cc @adrianbrink

ramilexe avatar Jun 17 '17 01:06 ramilexe