F(x)Core testnet setup issue

Hi !

While trying to solve my testnet validator issue, it appears something is wrong in the docs and files.
I’m setting up release/v2.2.x and using the files located here for initialization:

  • https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/genesis.json
  • https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/config.toml
  • https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/app.toml

When I’m using of the latest snapshot (25/JUL, 01/AUG), it would sync on a few blocks then stop with a wrong apphash error, then panic.
If I’m starting from block #0, I’m getting the following error :
panic: genesis supply is incorrect, expected 378604525462891000000000000FX, got 4000000000000000000000FX

Could you please help ?

Thanks.

Hello!

I faced the wrong apphash and fixed the issue by following below steps on my docker full node testnet:

  • stopping the fxcored service
  • delete the old data
  • purge all docker resources
  • download 25/JUL snapshot and extract it, would be good to try 01/AUG as well
  • Follow the upgrade tutorial here Docker - Upgrading Your Node - Function X Docs
    • It is correct if you have below commit when typing the commands git log
      commit d5d54614f3227bb070e4a930c0ca95f0e31006a5 if you checked out the branch without specifying the tags
      or
    • commit 5eef07630e89ad0bd786fb08fa0fb937e5c84d67 (HEAD -> release/v2.2.x, tag: v2.2.1) if you checked out the tags

The other way is to clear out data folder and use daily prune snapshot instead from https://fx-testnet.s3.amazonaws.com/fxcore-pruned-snapshot-testnet-2022-08-02.tar.gz

the prune data doesn’t contain historical data and is enough to participate in consensus/block production with less disk data

this can start the node faster as light node

@lancelai ,

I also tried the 01/AUG pruned snapshot… same result.

Here’s the detailed procedure I’m following to setup my testnet node (I didn’t setup my validator files for this trial):

  1. systemctl stop fxcore && rm -rf ~/.fxcore && rm -rf ~/fx-core → nothing remains on server, related to fxcored
  2. git clone -b release/v2.2.x https://github.com/FunctionX/fx-core.git
  3. cd ~/fx-core && git checkout -b release/v2.2.x && git log → I’m on the correct d5d5… version
  4. make go.sum && make install
  5. fxcored init frenchxcore
  6. wget https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/genesis.json -O ~/.fxcore/config/genesis.json && wget https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/config.toml -O ~/.fxcore/config/config.toml && wget https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/app.toml -O ~/.fxcore/config/app.toml
  7. wget https://fx-testnet.s3.amazonaws.com/fxcore-pruned-snapshot-testnet-2022-08-01.tar.gz → I checked the md5 with the one provided on the other link and they correspond
  8. tar -xzvf fxcore-pruned-snapshot-testnet-2022-08-01.tar.gz -C ~/.fxcore/
  9. systemctl start fxcored

The full log of events is available here
As you can see, until block 4028465, the node is catching up.
The first wrong Block.Header.AppHash happens at Aug 02 16:43:41 fxcored[791167]: 4:43PM ERR Error in validation err="wrong Block.Header.AppHash. Expected 66D0C0EA89DDAFC9D9B0975DA5C7F57E304BAF55BD097132BEAEEBF99EDC334A, got 5529C286A4A4E811D7E6EA1A9923E39C0C2A713085FAFC6FB0AE419D7B0CE654" module=blockchain server=node
Then, no more catching up possible… And block won’t ever increase. At some point, the system will even panic.
I also noted this happens right after an IBC transaction : Aug 02 16:43:41 fxcored[791167]: 4:43PM INF IBCTransfer amount={"amount":"1000000","denom":"usdt"} destChannel=channel-0 fee={"amount":"0","denom":"usdt"} receive=0x1842353332AFE5839FcC9230c0ed2b70cE296791 ro>

Any help would be greatly appreciated.

Regards/
FrenchXCore

Hi!, i have exactly the same problem in the same block and with se same header hash, any news?, thank you very much!

For pruned-snapshot use the latest, which is 2 AUG for yesterday, and 3 AUG should be available now as well

@lancelai ,

The same happens with August 3rd pruned snapshot: here’s the log (reverse order). (full log here)
It happens again right while catching up, right after an IBCTransfer transaction.

Aug 03 08:15:51 fxcored[799843]: 8:15AM ERR Error in validation err="wrong Block.Header.AppHash.  Expected E84B569E8DAE5F2A335B26E9128943428A7726A5EEA90D7F12D29A1964CDA6C5, got FE1993A57E44EECADEEDAE35A81474E3
1C5CB9D4B7EBED90C9757CAC3D12B21D" module=blockchain server=node
Aug 03 08:15:51 fxcored[799843]: 8:15AM INF committed state app_hash=E84B569E8DAE5F2A335B26E9128943428A7726A5EEA90D7F12D29A1964CDA6C5 height=4061050 module=state num_txs=1 server=node
Aug 03 08:15:51 fxcored[799843]: 8:15AM INF commit synced commit=436F6D6D697449447B5B3233322037352038362031353820313431203137342039352034322035312039312033382032333320313820313337203637203636203133382031313920
3338203136352032333820313639203133203132372031382032313020313534203235203130302032303520313636203139375D3A3344463737417D
Aug 03 08:15:50 fxcored[799843]: 8:15AM INF executed block height=4061050 module=state num_invalid_txs=0 num_valid_txs=1 server=node
Aug 03 08:15:50 fxcored[799843]: 8:15AM INF acknowledgement written dst_channel=channel-0 dst_port=transfer module=x/ibc/channel sequence=855 src_channel=channel-0 src_port=transfer
Aug 03 08:15:50 fxcored[799843]: 8:15AM INF burned tokens from module account amount=1000000000000000000ibc/4757BC3AA2C696F7083C825BD3951AE3D1631F2A272EA7AFB9B3E1CCCA8560D4 from=bsc module=x/bank
Aug 03 08:15:50 fxcored[799843]: 8:15AM INF IBCTransfer amount={"amount":"1000000000000000000","denom":"ibc/4757BC3AA2C696F7083C825BD3951AE3D1631F2A272EA7AFB9B3E1CCCA8560D4"} destChannel=channel-0 fee={"amount
":"0","denom":"ibc/4757BC3AA2C696F7083C825BD3951AE3D1631F2A272EA7AFB9B3E1CCCA8560D4"} receive=0x49474635061c20A0486BED85ED7227bAC3E7aaA5 router=bsc sender=fx1k6d9hdhmkvhzyza8uwq46ycwgpl8peelnf2kp0 sequence=855 transfer route sourceChanne
l=channel-0

I see 2 issues :

  1. not being able to sync from genesis or with a full node snapshot,
  2. 2/3 of testnet validators are running a different version of fxcore (and especially tendermint), computing the AppHash differently for blocks containing IBCTransfer transactions…

Regards/
@Mdmdmd83

  1. I believe it’s because the full-node snapshot was taken before the upgrade, suggest to wait for next Monday then, anyway a pruned-snapshot only should also work since that’s taken after the upgrade as I have tested it.
  2. Yes, 2 version is fine for now depending which the user git checkout to.

I also believe in future, they may change the snapshot structure for full node become daily

Btw, i have the same issue and fixed with below steps:

  1. systemctl stop fxcored
  2. cd ~/fx-core/
  3. git pull
  4. git checkout release/v2.2.x
  5. make go.sum
  6. make install
  7. wget https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/genesis.json -O ~/.fxcore/config/genesis.json
  8. wget https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/config.toml -O ~/.fxcore/config/config.toml
  9. wget https://raw.githubusercontent.com/FunctionX/fx-core/release/v2.2.x/public/testnet/app.toml -O ~/.fxcore/config/app.toml
  10. wget https://fx-testnet.s3.amazonaws.com/fxcore-pruned-snapshot-testnet-2022-08-02.tar.gz
  11. rm -r ~/.fxcore/data/
  12. tar -xzvf fxcore-pruned-snapshot-testnet-2022-08-02.tar.gz -C ~/.fxcore/
  13. systemctl start fxcored

Still the same…
I even retried everything by setting pex=false in config.toml but then, it would be rejected by all peers at some point.

i made a testnet node a fue days ago, maybe 2 weeks. used 2.1 and then update

I eventually found what was wrong, and that’s so stupid that I can only blame myself for it.
Actually, my service was launched using /usr/bin/fxcored.
However, when upgrading fxcored, the binary was installed in ~/go/bin and not /usr/bin.
Thus, I was endlessly trying to run my testnet node on the wrong version !!

I’m really sorry for this issue which wasn’t one.

Thanks again for your help.

Regards/
@FrenchXCore

2 Likes