Node-side smart contract
unfinished work in progress
Node should execute some types of smart contracts on the network. For example the storage contract is being executed on each node. Develop a basic environment for it. Such a contract could be distinguished by analysing its
definition.extended_type, which, if present, must contain the valid (approved by the node) smart-contract type, otherwise it must be declined.
The valid server-side smart contract implementation implements the
The node executes such smart contracts in the following way:
If extends the local check:
before the check, if the
definition.extended_typepresents and not known, fail.
perform the usual contract check as with a regular contract
call the interface
beforeRevoke()respectively, It it returns false, fail.
If the network approve the change or revoke the contract, call
onRevoke() respectively. First two return optional
Binder with extra data to return to the client as
The interface implement a query: readonly method calls to get some information from a single node. This is readonly, immutable method that must not change nothing in such smart contract state and associated data and could be called separately on each node.