helinwang / dex

Decentralized Exchange

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

save items received for bigger round, or sync with peer when stuck

helinwang opened this issue · comments

DBUG[Jun 4 21:48:49.154] start round round=56868 addr=ea77
INFO[Jun 4 21:48:49.155] serving BlockItem id="{T:BlockItem ItemRound:56867 Ref:6378 Hash:08fb}" item=08fb
DBUG[Jun 4 21:48:49.155] proposing block addr=ea77 round=56868 hash=0b85
INFO[Jun 4 21:48:49.157] addBP called hash=0b85 weight=1
INFO[Jun 4 21:48:49.159] AddRandBeaconSigShare groupID=1 hash=a8db
INFO[Jun 4 21:48:49.165] recv inventory inventory="[{T:BlockItem ItemRound:56867 Ref:6378 Hash:08fb}]"
INFO[Jun 4 21:48:49.165] serving BlockProposalItem id="{T:BlockProposalItem ItemRound:56868 Ref:08fb Hash:0b85}" item=0b85
INFO[Jun 4 21:48:49.165] serving RandBeaconShareItem id="{T:RandBeaconShareItem ItemRound:56868 Ref:0000 Hash:a8db}" item=a8db
INFO[Jun 4 21:48:49.165] recv inventory inventory="[{T:BlockProposalItem ItemRound:56868 Ref:08fb Hash:0d6f}]"
INFO[Jun 4 21:48:49.165] request BlockProposalItem item="{T:BlockProposalItem ItemRound:56868 Ref:08fb Hash:0d6f}"
INFO[Jun 4 21:48:49.165] recv inventory inventory="[{T:RandBeaconShareItem ItemRound:56868 Ref:0000 Hash:d592}]"
INFO[Jun 4 21:48:49.165] request RandBeaconShareItem item="{T:RandBeaconShareItem ItemRound:56868 Ref:0000 Hash:d592}"
INFO[Jun 4 21:48:49.166] recv inventory inventory="[{T:BlockProposalItem ItemRound:56868 Ref:08fb Hash:0b85}]"
INFO[Jun 4 21:48:49.171] recv inventory inventory="[{T:RandBeaconItem ItemRound:56868 Ref:0000 Hash:cf86}]"
INFO[Jun 4 21:48:49.171] request RandBeaconItem item="{T:RandBeaconItem ItemRound:56868 Ref:0000 Hash:cf86}"
INFO[Jun 4 21:48:49.173] addBP called hash=0d6f weight=0.25
INFO[Jun 4 21:48:49.174] AddRandBeaconSig round=56868 hash=cf86
INFO[Jun 4 21:48:49.355] recv trades root=0000
INFO[Jun 4 21:48:49.355] recv nt share hash=45f5
INFO[Jun 4 21:48:49.356] addNtShare called hash=45f5 group=0
INFO[Jun 4 21:48:49.356] serving NtShareItem id="{T:NtShareItem ItemRound:56868 Ref:0b85 Hash:45f5}" item=45f5
INFO[Jun 4 21:48:49.359] recv inventory inventory="[{T:NtShareItem ItemRound:56868 Ref:0b85 Hash:45f5}]"
INFO[Jun 4 21:48:49.369] recv inventory inventory="[{T:BlockProposalItem ItemRound:56869 Ref:f9f1 Hash:fb2b}]"
INFO[Jun 4 21:48:49.369] request BlockProposalItem item="{T:BlockProposalItem ItemRound:56869 Ref:f9f1 Hash:fb2b}"
*** --> WARN[Jun 4 21:48:49.369] received block proposal of higher round round=56869 my round=56868
INFO[Jun 4 21:48:49.370] recv inventory inventory="[{T:BlockItem ItemRound:56868 Ref:08fb Hash:f9f1}]"
INFO[Jun 4 21:48:49.370] request BlockItem item="{T:BlockItem ItemRound:56868 Ref:08fb Hash:f9f1}"
INFO[Jun 4 21:48:49.371] addBP called hash=0b85 weight=0
INFO[Jun 4 21:48:49.371] addBlock called hash=f9f1 weight=0
DBUG[Jun 4 21:48:49.371] start round round=56869 addr=ea77
INFO[Jun 4 21:48:49.371] recv inventory inventory="[{T:RandBeaconShareItem ItemRound:56869 Ref:0000 Hash:e3e2}]"
INFO[Jun 4 21:48:49.371] request RandBeaconShareItem item="{T:RandBeaconShareItem ItemRound:56869 Ref:0000 Hash:e3e2}"
DBUG[Jun 4 21:48:49.372] proposing block addr=ea77 round=56869 hash=8a3a
INFO[Jun 4 21:48:49.373] addBP called hash=8a3a weight=0.25
INFO[Jun 4 21:48:49.374] AddRandBeaconSigShare groupID=5 hash=e3e2
INFO[Jun 4 21:48:49.374] serving BlockProposalItem id="{T:BlockProposalItem ItemRound:56869 Ref:f9f1 Hash:8a3a}" item=8a3a
INFO[Jun 4 21:48:49.375] AddRandBeaconSigShare groupID=5 hash=785c
INFO[Jun 4 21:48:49.376] recv inventory inventory="[{T:BlockProposalItem ItemRound:56869 Ref:f9f1 Hash:8a3a}]"
INFO[Jun 4 21:48:49.377] AddRandBeaconSig round=56869 hash=ad8d
INFO[Jun 4 21:48:49.377] serving RandBeaconItem id="{T:RandBeaconItem ItemRound:56869 Ref:0000 Hash:ad8d}" item=ad8d
INFO[Jun 4 21:48:49.377] recv inventory inventory="[{T:RandBeaconItem ItemRound:56869 Ref:0000 Hash:ad8d}]"
INFO[Jun 4 21:48:49.567] recv inventory inventory="[{T:NtShareItem ItemRound:56869 Ref:fb2b Hash:884b}]"
INFO[Jun 4 21:48:49.567] request NtShareItem item="{T:NtShareItem ItemRound:56869 Ref:fb2b Hash:884b}"
INFO[Jun 4 21:48:49.568] recv nt share hash=884b
*** --> WARN[Jun 4 21:48:49.568] ValidateNtShare: prev block not found
INFO[Jun 4 21:48:49.573] recv trades root=0000
INFO[Jun 4 21:48:49.573] recv nt share hash=56ab
INFO[Jun 4 21:48:49.575] addNtShare called hash=56ab group=1
INFO[Jun 4 21:48:49.576] serving NtShareItem id="{T:NtShareItem ItemRound:56869 Ref:8a3a Hash:56ab}" item=56ab
INFO[Jun 4 21:48:49.579] recv inventory inventory="[{T:NtShareItem ItemRound:56869 Ref:8a3a Hash:56ab}]"

The above test run got stuck because the random beacon share for the next round was received.

Another log:

WARN[Jun 6 10:38:43.911] block already received
WARN[Jun 6 10:40:44.125] received random beacon share for bigger round round=218791 expecting=218790
WARN[Jun 6 10:58:45.794] received block proposal of higher round round=224012 my round=224011
WARN[Jun 6 10:58:45.983] ValidateNtShare: prev block not found

Fixed.