What is new?
Mar 29, 2021
The Flowee project has made available for immediate release the version 2021.03.1 of their tier-1 applications and services. We advice anyone to upgrade to this version for best performance and compatibility.
In this 3rd major release this year Flowee adds a list of new networking APIs, more features are added in the REST service and we added a per-block index in the Hub.
Additionally we made it possible for the Hub to be used as a fully functional backend for Fulcrum.
APIs (Hub)
The Flowee network layer is the main way to use Flowee products from C++ or JavaScript with FloweeJS. Several new APIs were added that are aimed at giving a broader set of information for observers of the Bitcoin Cash network. These additions are expected to enable builders.
All Double Spends in one service
Double spend proofs are fully supported in Flowee across the board, there was already support in the Address Monitor Service and the Transaction Monitor Service. We now add the option to have an unfiltered access to the double spend proofs, all that the Hub notices.
This new service (documentation) simply forwards (push message) all double spend notifications to subscribers.
Chain-Reorg notification
This rare occurrence where a block is removed in favor of a longer chain did not get notified to API users yet, until the introduction of this push message which can be used by clients to find out how the removal affects them. The name of the message is Blocks Removed and is part of the block-notification subscription service.
Filter On Script-Type on Blockchain/GetBlock
The GetBLock call is already very powerful and it has just received a new way of filtering which transactions to return in the selection.
Now it is possible to select transactions by what kind of locking-script they use. Only P2SH, or multisig ones, or OP_RETURN using transactions. Or a combination of all. Details
Please notice that this depends on the new block-index part of the Hub and only new blocks will have this filtering feature until the node operator does a reindex to create these per-block indexes for historical blocks too.
Mining / SubmitBlock
Adding this to the fast binary APIs is a logical step and allows mining software to stop using the slow and bulky JSON serialized block submission call. The function of this call is to add a block to the tip of the chain. (Documentation).
User-limits
This is a bit meta, we introduced several options for the Hub to limit the amount of connections and server-side storage of data for API clients. By default no limits are applied, but the option is available for setups to protect themselves from abuse from the network.
As described in the configuration we added api_max_addresses
, api_connection_per_ip
and api_disallow_v6
.
Hub Stability with invalid requests
API calls to request transaction data with incorrect offset-in-block arguments now no longer cause errors and corruptions for the Hub.
Hub/RPC update for get raw transaction
The getrawtransaction
RPC method now takes an extra argument of block-hash to find a transaction in. This brings this RPC method in line with other clients like BCHN.
Fees in GetTransaction
See the new options Include_TxFee
and TxFees
in Blockchain/GetTransaction and its reply.
Hub, per block-index
To make Flowee Fulcrum with with The Hub as a backend server there now is a txid lookup in fulcrum, but only to remember which block it appeared in.
To have a fast way to find a transaction in a block we added a new index inside the Hub. This is a per-block index addressed as ‘metadata’ and it is stored in the blk files next to the actual blocks.
The main goal of this metadata is to preprocess information about the block and make subsequent lookups much faster. As such the first data that is added is the txid and that makes finding a transaction in a block by txid 100 times as fast for non-trivial blocks.
Additionally we store the txfees for each transaction as well, which is super useful for some middleware.
This block metadata is written for each new block processed by the Hub, but not for older blocks. You would have to do a reindex
to generate those.
We added a config option feesmetadata
to the collection of fees in the block metadata optional as this will cause significantly more disk-io during historical validation when enabled. Notice that fees are always calculated for recent blocks as we need to do so for proper validation.
See the new options Include_TxFee
and TxFees
in Blockchain/GetTransaction and its reply.
REST-service
We added support for the POST address/details
endpoint. This allows users to fetch many addresses in one call.
Additionally this release fetches fees and when the hub is indexed with feesmetadata
the fees will show up in the REST output.
FloweeJS additions.
The Flowee JavaScript client has added much support for simply using the Flowee APIs directly, creating and receiving messages.
At the same time various additions have been made to the APIs to fetch more information, like fees, from the Hub.
The docs online explain this in more details.