polyglot icon indicating copy to clipboard operation
polyglot copied to clipboard

added functions towards D:// downloading

Open xloem opened this issue 5 years ago • 4 comments

none of the api servers return all the transactions for an address, so this kinda works but it would make sense to build a cache of keys to transactions from the blocks

xloem avatar Dec 09 '20 16:12 xloem

Legend. I will need to catch up with this later though. But looks good. Thanks 😀

But the apis not returning all txd for an address sounds surprising... can it be explained by low fee and not relaying properly or something?

AustEcon avatar Dec 10 '20 11:12 AustEcon

To reply here, bchsvexplorer only returns about a thousand txs for me. I emailed guarda.co and they said it is no longer maintained. The newer one using blockbook, also by guarda.co, returns all of them. Whatsonchain has a bug where if you have over a thousand txs, it doesn't return any at all. The planaria API returns bitcom transactions very quickly.

xloem avatar Dec 10 '20 18:12 xloem

Interesting... good to know.

I have looked at your other 3 PRs on bitsv but need to give it a rest for this weekend and chip away at this one maybe next week sorry.

I might be misunderstanding you but as per comments here: https://github.com/AustEcon/bitsv/pull/79 I don't think requesting all txids in a block is a good fit for what should really be lightweight client software - not sure if that's what you mean by "build a cache of keys to transactions from the blocks"?

But if those bitsv PRs get merged and fix the bugs you mention with retrieving all txids for an address will that then be enough to make this PR reliable?

AustEcon avatar Dec 12 '20 08:12 AustEcon

Interesting... good to know.

I have looked at your other 3 PRs on bitsv but need to give it a rest for this weekend and chip away at this one maybe next week sorry.

I might be misunderstanding you but as per comments here: AustEcon/bitsv#79 I don't think requesting all txids in a block is a good fit for what should really be lightweight client software - not sure if that's what you mean by "build a cache of keys to transactions from the blocks"?

I was thinking of making a backend for server-like systems that would facilitate building indices of bitcom records in the blockchain. This is also done in a lightweight client manner by filtering for only transactions of interest. The only public software I am aware of that does that is written in nodejs: the planaria software, although I haven't reviewed all the software out there,

But if those bitsv PRs get merged and fix the bugs you mention with retrieving all txids for an address will that then be enough to make this PR reliable?

The best backend for this is the bitcom planaria https://github.com/AustEcon/bitsv/pull/77 which is very fast but uses a different interface. The other PR fixes one backend but not the other. This functions only for accounts with less than a thousand transactions on whatsonchain. If more flexible API changes like in #77 are merged, it paves the way for making specific workarounds for different backends, by not requiring them to all have the same featureset.

It might be simplest here to add a warning about the limitations to the code.

xloem avatar Dec 17 '20 00:12 xloem