The bundling process is used to group child chain transactions from a child chain into a transaction on the Ardor chain. Bundlers accept the fees from those child chain transactions, in the corresponding child chain coin, and pay fees in ARDR to the parent chain forgers.
Bundlers can be started from the cogwheel/bundlers menu. The bundler will operate on the currently selected child chain. One or more bundling rules must be added to each bundler, and also a limit specifying the total fees in ARDR, which the bundler will pay.
The bundling rule has following properties
1.1 Minimum Rate
The coin to ARDR exchange rate of this rule. Transactions are accepted by this rule if the fee included by the transaction sender, in child chain coins, when converted to ARDR using this rate is at least equal to the minimum Ardor fee required for this transaction.
1.2 Fee Calculator
Function used to determine the fee in ARDR, which the bundler will finally pay for each transaction, having the fee in child chain coins received from the transaction.
- MIN_FEE (default value, bundlers in Ardor v2.0 use this function): the Bundler will always pay the minimum protocol fee, no matter how much child chain coins are received from the child transaction.
- PROPORTIONAL_FEE: the Bundler pays fee in ARDR proportionally to the received child chain coins, according to the Minimum Rate. This would give advantage to the bundler versus bundlers using MIN_FEE function in case the transaction creators start competing for block space by specifying higher fee in child chain coins.
- Custom calculators can be developed as add-ons by implementing the Bundler.FeeCalculator interface. Their classes must be listed in the nxt.customBundlingFeeCalculators configuration property.
An additional factor of the Ardor fee to pay for each transaction. Used to give advantage to this bundler when competing with other bundlers. This is a multiplier of what you will pay in terms of ARDR fee (the result of the Fee Calculator function). So if the fee is 100 ARDR and overpay is set to 0.1 you will pay 100 + 100 * 0.1 = 110 as bundling fee. Custom Fee Calculators may use this value for different purpose, or disregard it.
Zero or more additional filters applied on the bundled transactions. The transaction must satisfy the minimum fee rate and all filters in order to be processed. Filters can check various properties of the transaction like the sender, the recipient the transaction type, or even the presence of other transaction(s). A parameter can be specified for every added filter. The parameter is a filter-specific arbitrary string. Default filters provided "out-of-the-box":
|PersonalBundler||Only bundle the transactions of the bundler account|
|PropertyBundler||Only bundle transactions sent by accounts which have the "bundling" property set on them by the bundler account|
|AssetBundler||Bundles only transactions for asset with ID provided as parameter||Asset ID (numeric)|
|CurrencyBundler||Bundles only transactions for MS currency with ID provided as parameter||Currency ID (numeric). This is not the currency code|
|PurchaseBundler||Bundles only purchases of digital goods sold by an account provided as parameter||Account ID (numeric or RS format)|
|QuotaBundler||Bundles transaction until the quota per account and transaction type is reached. The quota is provided as parameter.||Max number of transactions per account and transaction type that will be accepted by the rule|
Additional filters can be developed as add-ons by implementing the Bundler.Filter interface. Their classes must be added to the nxt.availableBundlingFilters property.
When a bundler is running, it checks the unconfirmed transactions pool every time a new transaction from the child chain being bundled arrives. If the transaction satisfies any of the bundler rules (the Minimum Rate and all filters of the rule), the bundler will generate a ChildBlock transaction, including in it this and all other currently unconfirmed child chain transactions satisfying any of the rules. The ARDR fee the bundler will include for the ChildBlock transaction is equal to the sum of the calculated ARDR fee for all child transactions (calculated by applying the Fee Calculator function and the Overpay to each child transaction). The Bundler Rules are an ordered list, the Fee Calculator and Overpay are taken from the first rule which accepts the transaction.
The new ChildBlock transaction will displace from the unconfirmed pool any ChildBlock transactions of the same child chain that include only a subset of the same child transactions. When propagating through the network, ChildBlock transactions will only be accepted by peers if they either include child transactions not already included in other ChildBlock transactions the peer already has in its pool, or offer to pay a higher fee for the same transactions. This ensures the network is not flooded with ChildBlock transactions even if every node is running a bundler, and allows bundlers to compete for propagating their transactions through the network by offering to pay higher fees.
It is now possible for child transactions to be submitted with zero fees, in child chain coins. If a bundler is willing to pay the Ardor fees for those, they will be included in the blockchain in the ChildBlock created by such bundler.
To prevent the unconfirmed pool from being overfilled with such zero-fees child chain transactions, once the maxUnconfirmedTransactions limit (configured in nxt.properties, default 2000) has been exceeded, child chain transactions will be dropped unless a bundler has already submitted a ChildBlock transaction which includes them.
Bundlers with at least one non-filtered rule advertise to other peers the minimum rate among their non-filtered rules. This is the minimum rate at which the bundler will accept child transactions without checking any other property except the fee. The bundler signs such rates announcements with the private key of the bundler's account. To prevent fake rates announcements, they can be filtered based on this account effective balance (default set in nxt.minBundlerBalanceFXT is 1000 ARDR). Bundlers that have at least one filter added to all of their rules are considered private and their rates are not announced.
When running a subsidizing bundler, it is more efficient to add a not-filtered rule with some acceptable rate at last position in the list, so that the bundler bundles both zero-fee and regular (public) transactions. This will increase the total amount of ARDR in the ChildBlock transaction and will give it priority over ChildBlock transactions created by other bundlers. The transactions are prioritized first by the index of the rule accepting them, and then by the fee in child chain coins they pay. So a subsidizing bundler will include the subsidized transactions before the public transactions even if it receives 0 fee from them.
The GetBundlerRates API can be used to retrieve known bundlers rates, again with optional filtering by minimum bundler effective balance.
2 Bundler Setup
Bundling like Forging requires sending the passphrase to the remote node. Therefore only run a bundler on a node under your control. To view the running bundler on a node, the wallet has to include the remote node admin password in its account settings.
Existing bundlers known to the remote node for the currently selected child chain (switch to ARDR chain to see the bundlers for all chains).
Start a new bundler
Initially the bundler is started with only one rule. More rules can be added with the Add Rule button: