v0.22.0: Block rewards, improved Flash API & private channels
Major improvements since v0.21.0:
Flash nodes now use separate registry endpoints
Flash nodes should now register themselves via the POST /flash_node
endpoint,
and can be accessed via the GET /flash_node
endpoint of the registry,
instead of using the /validators
endpoint as before,
which is now only used for enrolled validators.
Registering a validator in the registry now uses POST
Before, the registry was expecting a PUT /validators
request to register an address,
however that was at odds with the method definition.
Validators now need to use a POST
request.
Removed recv_pk
parameter from FlashNode.openChannel
API
This parameter was redundant with the content of the chan_conf
parameter
and shouldn't be provided anymore.
Flash: openChannel
now properly validates funding TXs
The openChannel
call of the Flash API was previously missing some validation
on the funding transaction: invalid funding transactions will now be properly rejected.
Flash: ThinFlashNode
& AgoraFlashNode
have been removed
The flash nodes have been unified under a single type, FlashNode
,
providing more flexibility by better defining its relationship to Agora.
As part of this, a new parameter, funder_address
, is now required for openChannel
,
and peer_address
is required for FlashControlAPI.openNewChannel
.
FlashControlAPI
is now a BlockExternalizedHandler
FlashControlAPI
now implements the BlockExternalizedHandler
API as well,
which allows one to put a Flash node in the event_handler.BlockExternalized
section.
The fee check now properly checks the combination of data and transaction fee
Previously, the fee checker mistakenly checked both fee individually,
instead of the combination of both.
The accumulated_fee
table has been replaced by block_fees
The old table has been dropped, and the new table is used to store block fees
to be paid in the next block reward between payout period.
FlashControlAPI.openNewChannel
: Removed redundant reg_pk
This parameter has been removed, as it is already provided by funding_utxo.address
,
and should not be provided anymore.
Block rewards are now included in Coinbase transactions
From this release, block rewards are now properly distributed every payout period.
A payout period is currently set to 144 blocks (1 day).
When the payout block is reached (height % 144 == 0 and not genesis),
a coinbase transaction is added to the block, that contains the data fees,
transaction fees, and confirmation rewards for the period before last.
This means that payout for the range [0; 143] will happen at block 288,
payout for range [144; 287] happens at block 432, etc...
Block rewards are distributed according to the amount set in the whitepaper,
and proportional to the number of blocks a validator has signed during the period.
Registry: TCP queries are now supported
The network registry now also listens to the TCP port (53 by default) in addition of the UDP one,
meaning that it might need to run privileged under some systems.
This will allow zone transfer and large payload to be exchanged.
Note that systemd users might need to bind to the public interface only,
as systemd-resolvd
binds to the loopback interface's port 53.
Enrollment
s no longer include cycle_length
Cycle length was originally included in Enrollment
to allow nodes to configure
the duration of their enrollments. However, it had turned into a consensus-controlled
parameters since the inception of Agora, and hence wasn't used anymore.
Registry: Reworked zone configuration
Registry configuration has been simplified:
- The
registry.dns
section has been folded directly intoregistry
; - The
registry.[dns.]authoritative
section has been replaced byregistry.validators
andregistry.flash
, and anauthoritative
boolean value has been added to them; registry.validators
controls the zone for validators (nodes that are enrolled);registry.flash
controls the zone for Flash nodes (nodes with a channel open);
Node configuration now includes a realm
field
In order to support the new function of the registry, the configuration has a new option: node.realm
.
This field controls the root domain under which the validators
and flash
zones can be found.
Available realms at the moment are: testnet.bosagora.io
and coinnet.bosagora.io
.
Flash: Channels can now be private
The FlashControlAPI.openNewChannel
endpoint now accepts a is_private
boolean as a parameter.
If set to true
, the channel will not be gossipped, and requests to use it for routing will be denied.
This allows users to keep their channels unknown to the rest of the world, further privacy.