You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Defining and applying the module system for the on-chain block processing. It combines current block processing, transaction processing and schema definition and split them into 4 modules, token, sequence, DPoS and keys.
Token module is responsible for managing the balance including the transfer asset.
Sequence module is responsible for managing the nonce.
DPoS module is responsible for managing the DPoS properties and selection of the validators including register, vote, unlock and punishment assets.
Key module is responsible for multi-signature and signature validation including the register asset.
Each module will have possibility to add hooks as below:
// BaseModule to be extended per moduleclassBaseModule{publicname: string;publictype: number;// List of transaction assets for this modulepublicassets: BaseAsset[];// Schema of account asset to be used in this modulepublicaccountSchema?: Schema;// Set of actions which can be called from frameworkpublicactions?: Map<string,ActionHandler>;// Set of events name that will be emitted from this modulepublicevents?: string[];// Set of actions which can be called from other modules during the block processingpublicreducers?: Map<string,ReduceHandler>;// A function which will be called for all transactions regardless of modules.publicbeforeTransactionApply?: ({tx: Transaction,stateStore: StateStore, moduleAccess})=>void;// A function which will be called for all transactions regardless of modules.publicafterTransactionApply?: ({tx: Transaction,stateStore: StateStore, moduleAccess})=>void;// A function which will be called while applying genesis blockpublicafterGenesisBlockApply?: ({block: GenesisBlock,stateStore: StateStore,consensus: Consensus, moduleAccess})=>void;// A function which will be called in sequence at beforeBlockApply steppublicbeforeBlockApply?: ({block: Block,stateStore: StateStore, moduleAccess})=>void;// A function which will be called in sequence at afterBlockApply steppublicafterBlockApply?: ({block: Block,stateStore: StateStore,consensus: Consensus, moduleAccess})=>void;}
Also asset will have the hooks as below, which will be exactly the same as current custom transaction hooks.
classBaseAsset<K>{// Name of the module which will be used in the path resolutionpublicname: string;publictype: number;// Base fee to be included in the minFeepublicbaseFee?: bigint;// Schema of the content of this assetpublicassetSchema: Schema;// Validation function that can be implemented if additional publicapplyAsset: ({senderID:Buffer,asset: K,stateStore: StateStore, moduleAccess })=>void;// Validation function that can be implemented if additional publicvalidateAsset?: (asset: K)=>void;}
Motivation
The main motivations for introducing an on-chain architecture to the Lisk SDK are as follows:
Enable developers to make block level state changes
Enable developers to define per module account schemas
Description
Defining and applying the module system for the on-chain block processing. It combines current block processing, transaction processing and schema definition and split them into 4 modules, token, sequence, DPoS and keys.
Each module will have possibility to add hooks as below:
Also asset will have the hooks as below, which will be exactly the same as current custom transaction hooks.
Motivation
The main motivations for introducing an on-chain architecture to the Lisk SDK are as follows:
Tasks
Sprint 25
Sprint 26
The text was updated successfully, but these errors were encountered: