poanetwork / poa-dapps-validators

DApp for a list of validators with metadata for POA Network (Core/Sokol). Validators can update metadata using DApp.
https://validators.poa.network
GNU General Public License v3.0
13 stars 41 forks source link

(Fix) Physical address confirmation status is incorrect when DApp is connected to core.poa.network #92

Closed varasev closed 5 years ago

varasev commented 6 years ago

Problem: For now, Validators DApp doesn't show correct confirmation status for physical addresses - all validators display gray icon that means Unconfirmed Address. Something was broken.

Solution: Retest DApp, find the reason and fix it.

varasev commented 6 years ago

Seems the reason in this line: https://github.com/poanetwork/poa-dapps-validators/blob/3d52c78bf3d241d8db5b5916b739f9f9bd2425db/src/contracts/ProofOfPhysicalAddress.contract.js#L99

The getPastEvents web3 function returns an empty result for core.poa.network RPC but works fine with poa.infura.io.

@phahulin could this be due to recent updates of Parity version from 1.10.6 to 2.1.4 on several bootnodes in Core network? Maybe they are not fully synchronized yet?

phahulin commented 6 years ago

@varasev nodes are at the same block height and there are no obvious errors in parity logs. Could you check

  1. https://core-trace.poa.network (this one is on 1.11.8 and was not upgraded)
  2. https://core-parityv2-trace.poa.network (this one is on 2.0.6 or 2.0.8 and was not upgraded)
phahulin commented 6 years ago

I see they both work. So something iswrong either with core lb or with parity 2.1.x

varasev commented 6 years ago

Ok, I'll try to launch local Parity 2.1.4 node to see if the problem with this version or probably with the load balancer.

varasev commented 6 years ago

I encounter the same issue with local 2.1.4 node launched in warp mode. I'll try to launch with --no-warp flag, to wait until it's fully synchronized and to recheck DApp.

If I see it works fine, I'll try the same in warp mode but this time I'll wait for a few hours to let the node download ancient blocks.

phahulin commented 6 years ago

Try with --pruning archive instead of --no-warp. It also implies no warp

phahulin commented 6 years ago

pruning=archive seem to fix it

varasev commented 6 years ago

My test local node 2.1.4 now is fully synchronized with --no-warp flag and now the DApp works. So, it seems the reason is that the blocks are not fully downloaded by a node. I'll also try to run the node without --no-warp and --pruning archive and wait for a long time to let it download all blocks.

varasev commented 6 years ago

So, testing results are next: Validators DApp works fine with Parity 2.1.4 local node which is fully synchronized in any of the modes: --no-warp, --pruning archive, --warp.

For --warp mode (which is default) we need to wait for a few hours until the node is fully synchronized in the background but we can't see the progress of background sync of ancient blocks in node's console (it is only possible after manually editing of Parity's source code).

Both --warp and --no-warp modes take the same disk space (5.7 Gb at the moment for Core network) after they are fully synchronized. I suggest running bootnodes in --no-warp mode, wait until they download all blocks and add them to load balancer.

phahulin commented 6 years ago

Nodes of core lb are resynced, the problem doesn't seem to appear anymore. @varasev thanks for your help!

phahulin commented 6 years ago

Just for the sake of history, I ran ./parity --config node.toml db kill to wipe out the database and cause the resync.

varasev commented 5 years ago

The issue seems to appear again. The same situation: poa.infura.io works fine, but core.poa.network doesn't.

igorbarinov commented 5 years ago

Infura will be switched off on Saturday, Feb 2. What do we need to do with core.poa.network rpc node? resync it?

varasev commented 5 years ago

Yes, we need to resync the nodes of Core load balancer.

phahulin commented 5 years ago

Ok, I'll resync them

varasev commented 5 years ago

It seems to be OK now :+1: