Electron-Cash / Electron-Cash

Electron Cash; Bitcoin Cash thin client
MIT License
365 stars 193 forks source link

Synchronizer and Verfier extant bugs. #1160

Open cculianu opened 5 years ago

cculianu commented 5 years ago

Note: This is more of a "note to self" than anything so that I don't forget to fix these issues.

Verifier

  1. On testnet, use this tpub to create a wallet: tpubD6NzVbkrYhZ4YRDtddy5nLmvdH7Qn6oR7euDpjqnZdniaJDTbaL17Gq86bsVNhKMkYwGvSvhamz5QkouzGJ4e2rkyHWbF5mHGX5Up377zBM

  2. See how after synch it still has stuck 'Not verified' tx's. This may be due to my recent commit (20b90510f8b92ef4726b4efbe4e9c9172813d2ca) that made the verifier operate in a more asynchronous fashion. With the above tpub, there is no way to unstick these in the UI after they fail to verify other than to specifically request headers for these tx's from the console! So some logic error exists somewhere. Investigate and FIXME.

  3. See (2) in the next section. Verifier needs a way to communicate out that it failed to verify a tx (perhaps there is a bad server) and trigger an auto-reconnect.

Synchronizer

  1. See this discussion with @ghost43 regarding Electrum's recent issue https://github.com/spesmilo/electrum/issues/5122

  2. TODO: Come up with some mechanism to propagate out bad/garbage server replies to calling code (perhaps define a new exception type?) which will trigger a server reconnect.

  3. (2) above also applies to situations where the verifier fails to verify a tx.

cculianu commented 5 years ago

Screenshot of tx's that never verify... (related to "Verifier" section, (1) above)

screen shot 2019-02-15 at 5 17 53 pm
cculianu commented 5 years ago

Ok, so the 'Verifier' bug above was fixed in commit https://github.com/simpleledger/Electron-Cash-SLP/commit/1ab5fe3a1da907d97ee2f62b751925c03185b6e1

The synchronizer issue (which is more minor) still remains and I will address it hopefully soon.