Closed cnlangzi closed 2 years ago
We need get next round from different sharder to confirm current transaction. see detail on
but there are corner cases like in the case of 1 or 2 sharders.
Saswata Basu 5 minutes ago I think there was an issue with random/different sharder because if sharder1 is down, it would take a long time to get a response. So the idea was to query more sharders at the same time
Saswata Basu 4 minutes ago So change the UML flow to query multiple random sharders, and then repeat with multiple ones for next block (edited)
Saswata Basu 3 minutes ago Because its random, the chances are with min_confirmation, different sharders will be selected and it covers the case for 1/2 sharders. this is simpler algorithm (edited)
https://github.com/0chain/gosdk/blob/520f39c0fe70bd33a21c7eff1d269386ac653f86/zcncore/transaction.go#L909
A transaction is verified twice. But 2nd is same as 1st. It should be removed
https://github.com/0chain/gosdk/blob/520f39c0fe70bd33a21c7eff1d269386ac653f86/zcncore/transaction.go#L503
numSharders is overwritten by len(_config.chain.Sharders) .
They should be improved with min_confirmation and parallel requests like https://github.com/0chain/gosdk/issues/195