0chain / 0chain/0chain

DKG.Pi is changed unexpectedly when VC:false

Ouverte
#737 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
bug post-mainnet
Langage dominant
Go
Étoiles
121
Forks
63
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

The chain on hero server is stopped due to some of the miners are sending invalid VRF shares. From the logs it could be found that they could not even verify the shares they generated by themselves.
```
2021-12-03T02:37:40.419Z INFO miner/protocol_round.go:82 add_my_vrf_share {"round": 14146, "round_timeout": 1, "dkg_starting_round": 0, "dkg_mb_number": 1, "pr_seed": 966436487264123162, "pr_vrf_seed": "d6978dd615ab91a", "share": "1 195c443e3e5bf448382e3bbd6d2204866baacc846369251d46d331c46cc5ea2b 910f3d69659e527dbd6b05582c7fd1298296a60e36d253af263c7c9a4d983f3"}
2021-12-03T02:37:40.419Z INFO miner/protocol_bls.go:272 DKG AddVRFShare {"round": 14146, "round_vrf_num": 0, "threshold": 18, "sender": 1, "round_timeout_count": 1, "vrf_timeout_count": 1, "vrf_share": "1 195c443e3e5bf448382e3bbd6d2204866baacc846369251d46d331c46cc5ea2b 910f3d69659e527dbd6b05582c7fd1298296a60e36d253af263c7c9a4d983f3"}
2021-12-03T02:37:40.419Z INFO miner/protocol_bls.go:174 BLS sign VRF share calculated for {"round": 14146, "round_timeout": 1, "prev_rseed": 966436487264123162, "prev round vrf random seed": "d6978dd615ab91a", "bls_msg": "141461d6978dd615ab91a"}
2021-12-03T02:37:40.421Z ERROR miner/protocol_bls.go:320 failed to verify share {"share": "1 195c443e3e5bf448382e3bbd6d2204866baacc846369251d46d331c46cc5ea2b 910f3d69659e527dbd6b05582c7fd1298296a60e36d253af263c7c9a4d983f3", "message": "141461d6978dd615ab91a", "from": "11759c82c5810fddefc3bd7a8cbac326", "pi": "1 d67b0c668b4feea875ebb8f844b5a46b15444c4644144c8ce00959c028f0d5 8df2473287bccd68f0e418dded850423abc7177c17d9fbfa5aa78cc66e868c2 3c1ec86110ccd99d128e8498f689253fa5fa2b8f2955d6ffdb8c2161eb2d929 6d4545e7a05b3ff52a1faca7c4ab38064477d91a9e57e5b6c7e7cb290035d88", "node_id": "1759c82c5810fddefc3bd7a8cbac326b6ef5dc9a50da8fa34a19e418d38f9e00", "round": 14146, "dkg_starting_round": 0, "dkg_mb_number": 1, "chain_tc": 1, "round_tc": 1}
```

Checking the `DKG.Pi` value in the logs, for working well miners, they all have the same value, while for miners who are sending invalid VRF shares, such as http://216.218.228.197:7081/_diagnostics, its `DKG.Pi` value changed from `d67b0c668b4feea875ebb8f844b5a46b15444c4644144c8ce00959c028f0d5 ...` to `f5d96e665d373902fa82de19580ef29888cf1db1f0d5e9972bdc98b4c154d25 ...` in round `14146`, which is weird and need to investigate how could this happen.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Look at the miner/protocol_bls.go file, specifically around line 320 where the share verification fails. Examine how DKG.Pi is computed and updated, especially when VC is false. The logs show the Pi value changing unexpectedly in round 14146; trace the code path that modifies DKG.Pi and check for any race conditions or incorrect state updates. Running the miner diagnostics or tests related to VRF share generation may help reproduce the issue.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
go
Domaine
blockchain
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.