-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fulcrum protocol #145
Fulcrum protocol #145
Conversation
Feel free to add my instance here as well: fulcrum.jettscythe.xyz You can find a full list of instances here: https://1209k.com/bitcoin-eye/ele.php?chain=bch |
|
||
|
||
context = ssl.create_default_context() | ||
FULCRUM_PROTOCOL = "1.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the latest version is 1.10.0. Any particular reason for using 1.5.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, it looks like the protocol and the software have different versions. The latest protocol version seems to be 1.5.3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the latest version is 1.5.3; But for our usecases 1.5.0 is enough! That definitely adds cashtoken data to the txs, I didn't delve deeper into the changes in versions myself.
Thank you for yet again another quality pull request @yashasvi-ranawat. I have known about Fulcrum for a while but never actually used it. The Fulcrum website does not really give it a good image 😅. However I believe this is what powers Electron Cash, so I assume it is very reliable. Do you think it is much more reliable than any of our current providers? If so, maybe the end goal would be to use Fulcrum as a default provider for every API call? Currently I don't see any code cash token related - it looks like CashToken is supported. Maybe at some point that could be integrated and Fulcrum could be the default provider once it has proven it is extremely reliable. |
Yes indeed. It is reliable. But I don't know if the servers are instantly synced with the blockchain.
Cashtoken is supported! The protocol version 1.5.0 has token related fields in the API, and hence I chose that to as the base protocol.
That would be ideal! We can remove the default APIs from other implementations while still keeping them. I like Chaingraph approach as it is very versatile, and pyBitcash can still support it. The full adaption of Fulcrum will come with further design debates! Bitcash is built on the idea of a static library that only queries on demand, but other BCH tools like DSproof and address subscription, and fulcrum tools like peer discovery, might need a deviation from that idea (and better implementation of Fulcrum to not allow problems like: https://t.me/electroncashserver/4899). Where the implementation stands right now: with some default endpoints, Fulcrum protocol is 100% usable for pybitcash! |
FYI @yashasvi-ranawat it looks like these changes are not compatible with Python 3.8: https://github.com/pybitcash/bitcash/actions/runs/9184862197/job/25257867718. It's almost at its end of life so maybe we can drop support and replace it with 3.12 at some point. I think I'll do that unless it's a super easy fix to make it compatible with 3.8. |
Added fulcrum protocol for additional APIs with tests and docs.
The additional APIs lead to slowing of get_sanitised_endpoints_for function. I parallelised that with threading; that puts the first hit still at 2s.