Can Tokenizied wrap its low level bitcoinsv Envelope interface to be configured to hit fullnode APIs of mattercloud.net or matterpool.io?

This would allow clients like myself to leverage a paid BSV fullnode service rather than maintain my own BSV fullnode. But those services do not apparently directly expose their node IP addresses. Instead,
they exposure proprietary APIs that we have to pay a monthly fee to access their BSV full nodes.

So how much work is it to modify Tokenized to have a configurable user conf to make it hit a vendor bitcoinsv full node API instead of using the native Envelope API?

I think you mean the spynode. Envelope is a data wrapping protocol. Spynode is the part of smart contract that talks to the full node. Smart contract also depends on an RPC interface for requesting transaction data. We have discussed doing something like this in the future. I haven’t had a chance to check out those APIs. If they provide all of the data necessary it can be done. One main feature of spynode is its double spend detection and approval after 2 seconds. We would have to ensure those APIs were capable of similar functionality.

1 Like

Very cool. Thanks for the explanation and possible solutions.

On May 15, 2020 BSV publish new dev guidelines.
https://bitcoinsv.io/2020/05/15/bitcoin-svs-transaction-fee-economy-guidance-for-miners-and-application-developers

In point 5. they explained what we should do if we need to run a bitcoind node:

  1. Run in minimal modes
    If you need to run bitcoind, consider running in blocksonly mode and not maintaining a mempool.

This can lighten the load on the software significantly and reduce memory and bandwidth requirements
but you will not see transactions before they are confirmed in a block.

Be aware that the tradeoff is that your connection may be deprioritised by other Bitcoin daemons
it creates unnecessary load for other participants of the network without offering anything useful in return.

If you need to listen for unconfirmed transactions,
consider using the ZeroMQ interface to get a stream of transactions
and handling them in your own database or software.

If you do this, you can use a much smaller mempool limit
as you don’t need the Bitcoin SV Node software to hold onto the transactions
once you’ve read them from ZeroMQ.

So is it possible for Tokenized to follow this new approach (at least for the medium term) to use blocksonly mode & ZeroMQ?
That way we can keep running our own (cheap) bitcoind nodes and not have to pay for the service.

I am not sure how ZeroMQ can work from a node that is in blocks only mode. I haven’t researched it much, but it seems like the node would need to maintain full mempool or you would receive transactions more than once. We might be able to offer a cheaper solution that does not monitor for double spends and only responds to confirmed transactions, but our priority is 2 second acceptance of requests.

Spynode (embedded in smart-contract) is designed to watch for double spends so it needs to maintain connections with many nodes across the network and be instantly fed any new transactions from those nodes. This has a major benefit, but also a cost as you know.

Similar to anything in Bitcoin there needs to be a balance. You don’t host a smart-contract because you want to, unless you have money to burn, you host it because there is economic incentive to do so. If there is not enough revenue from hosting the smart-contract to at least offset the costs, then you probably shouldn’t. Keep in mind that the smart-contract agent has a built in fee collection system that requires a predefined fee be paid for each request to be accepted. This should be able to offset the costs of any successful contract.

So from my point of view the solution could be to make those features OPTIONAL which are standing in the way of going the “minimal blocks only node” or “SPV node” or “pruned node” approach, so they can be turned off. I don’t think my application which only uses pure tokens, no money, needs to check for double spending right now. What I do need is to follow the guidelines published by NChain for having a low cost platform which can grow with the upcoming BSV platform changes for TeraNode etc…
Alternatively, any Tokenized node that does not follow those guidelines and so is more or less a full BSV node, will then have to be a miner node or a specialized in-pool Extension node wired tightly into Mempool or TAAL.

I applied today for putting my python Tokenized Evaluation POC app in the bsvhackathon.