The major release brings delegation support and new smart contracts.
4.1.1
- The
SendTransaction
function exposed via the gRPC interface now provides the caller with detailed error messages if the
transaction was rejected instead of justFalse
. The function still returnsTrue
if
the transaction was accepted.
The following gRPC error codes can be returned.- 'SUCCESS' The transaction was succesfully relayed to consensus.
- 'INVALID_ARGUMENT' The transaction was deemed invalid or exceeds the maximum size allowed (the raw size of the transaction).
In addition the error message contains information as to why the transaction was deemed invalid. - 'FAILED_PRECONDITION' The network was stopped due to an unrecognized protocol update.
- 'DUPLICATE_ENTRY' The transaction was a duplicate.
- 'INTERNAL' An internal error happened and as such the transaction could not be processed.
The server will return a gRPC status if the transaction was deemed invalid.
- Support for wire-protocol version 0 is dropped, meaning that the node cannot
connect to peers that do not support wire-protocol version 1, which is supported
since version 1.1.0. - The macOS installer no longer overwrites the service files when reinstalling.
- Cache smart contract modules on startup from existing state to improve smart
contract execution. - Make consensus queries more robust, by validating input more extensively.
This affects all queries whose input was a block or transaction hash.
These queries now returnInvalidArgument
error, as opposed toUnknown
which they returned previously. - Fix issue #244: Collector to keep querying. Remove the parameter for maximum allowed
times a gRPC call can fail and keepsnode-collector
querying forever. GetAccountInfo
endpoint supports querying the account via the account index.- Mac installer: Users now can leave one (but not both) of the net configurations empty
when they don't want to configure a node for it.- On the initial installation, leaving a net configuration empty means that
the start/stop app shortcuts and the application support folder for that net won't be installed.
- On the initial installation, leaving a net configuration empty means that
- Implement baker pools and stake delegation for the P4 protocol version.
- New gRPC endpoint:
GetBakerList
retrieves a JSON list of the baker IDs of the bakers
registered in a known block. (Returnsnull
for an unknown block.) - New gRPC endpoint:
GetPoolStatus
retrieves a status record for a baker pool, or for
the set of passive delegators. - The
bakerStakeThreshold
level-2 keys are renamed as thepoolParameters
keys; two
additional access structures are defined:cooldownParameters
andtimeParameters
. - The following changes are made to the chain parameters in P4:
- The mint distribution no longer includes the mint per slot rate.
- Pool parameters are added, governed by the
poolParameters
keys, that determine
commission rates and ranges, bounds and other factors affecting baker pools. - Time parameters, governed by
timeParameters
, are added that determine the
duration of a payday (in epochs) and the mint rate per payday. - Cooldown parameters, governed by
cooldownParameters
, are added that determine
the required cooldown periods when bakers and delegators reduce their stakes.
- ConfigureBaker and ConfigureDelegator transactions are added (with the old baker
transactions becoming obsolete in P4). These permit adding, modifying and removing bakers
and delegators respectively from an account. Delegators can delegate to a baker, or
delegate passively (effectively to all bakers). - The reward mechanism is overhauled, with minting and rewarding being done once per
'payday' (a number of epochs, nominally one day). Baker rewards are shared with
delegators to the baker's pool, with some commission being paid to the baker.
Block rewards (i.e. transaction fee rewards), baking rewards and finalization rewards
are accumulated over the reward period and paid out at the payday.
- New gRPC endpoint:
- Implement V1 smart contracts with the following key features
- unlimited contract state size
- synchronous contract calls
- fallback entrypoints
- increased smart contract module size limit, 512kB
- a number of cryptographic primitives
- Node can now be stopped during out of band catchup by using signals, SIGINT and SIGTERM.