Lição 4

Lisk Core

This module provides an in-depth look into Lisk Core, the backbone of the Lisk network. It covers the functionalities, development, and performance improvements of Lisk Core, highlighting its importance in maintaining the integrity and security of the Lisk blockchain.

Overview of Lisk Core

Lisk Core manages all blockchain operations, including transaction processing, block creation, and network synchronization. It ensures the integrity and security of the blockchain by implementing several functionalities.

Lisk Core validates and processes transactions before including them in blocks. This involves checking the validity of transactions, ensuring they meet all protocol rules, and managing the transaction pool where pending transactions are stored. It also handles the creation of new blocks. Delegates elected by LSK token holders are responsible for forging new blocks, which are then broadcast to the network for validation.

Lisk Core ensures that all nodes in the network are synchronized with the latest state of the blockchain. This includes propagating new blocks and transactions across the network to maintain consistency. It also provides API endpoints for interacting with the blockchain. They allow developers to query blockchain data, submit transactions, and manage accounts.

Development of Lisk Core

Lisk Core has gone through several significant updates to enhance its performance, security, and scalability. These updates are part of a comprehensive development roadmap aimed at continuously improving the Lisk ecosystem.

One significant change in Lisk Core is the migration from JavaScript to TypeScript, which offers additional functionalities like type checking, which improves code reliability and maintainability. This helps in reducing bugs and making the development process more efficient.

Another change in Core is that it now uses an embedded database system instead of PostgreSQL. This reduces the complexity of setting up a development environment, optimizes storage size, and improves read/write performance. The embedded database system provides a more streamlined approach to data management within Lisk Core.

Lisk Core has also adopted a modular architecture, allowing for greater flexibility and scalability. This architecture enables developers to extend or replace specific components without affecting the entire system. Modules can be developed independently and integrated into the core, facilitating a more efficient development process.

Consensus Mechanism

Lisk uses a Delegated Proof of Stake (DPoS) consensus mechanism to secure its network. In DPoS, LSK token holders vote for delegates who are responsible for validating transactions and creating new blocks. This mechanism ensures a decentralized and efficient block production process.

To enhance the security and reliability of the DPoS mechanism, Lisk incorporates Byzantine Fault Tolerance (BFT). BFT ensures that the network can achieve consensus even in the presence of faulty or malicious nodes. It involves multiple stages of validation, including pre-voting and pre-commitment, to finalize blocks and maintain network consistency.

Performance Improvements

Lisk Core has seen several performance improvements aimed at enhancing its scalability and efficiency.

  1. Smaller Blockchain Size: The migration to an embedded database has significantly reduced the blockchain’s storage requirements. The new key-value store approach minimizes the size of the blockchain data.
  2. Faster Query Response Times: Improvements in the API layer have led to faster response times for blockchain queries, enhancing the overall user experience.
  3. Faster Block Processing: The time required to process blocks has been reduced, allowing for quicker transaction validation and inclusion in the blockchain.
  4. Increased Transactions per Second (TPS): Lisk Core now supports a higher TPS, allowing for a greater number of transactions to be included in each block. This improvement helps to support high-transaction applications on the Lisk network.

Running a Lisk Node

Running a Lisk node involves setting up the necessary hardware and software to participate in the Lisk network. Nodes are responsible for validating transactions, maintaining network security, and propagating blocks.

System Requirements

  • Memory: Modern multi-core CPU with good single-core performance. Machines with a minimum of 16 GB RAM (32 GB recommended).
  • Storage: Machines with a high-performance SSD drive with at least 750GB (full node) or 4.5TB (archive node) free.

Setting Up a Node

  1. Clone the Repository: Download the Lisk node software from the official GitHub repository.
  2. Docker Setup: Use Docker to manage the node environment. Set the appropriate environment variables and configurations.
  3. Syncing the Node: Synchronize the node with the network. The sync speed depends on the L1 node as most of the chain data is derived from it.

Lisk Service

Lisk Service acts as a middleware between the blockchain and user interfaces like Lisk Desktop and Lisk Mobile. It aggregates blockchain data and provides APIs for accessing this information, making it easier for developers to integrate blockchain data into their applications.

Main Features

  • Data Aggregation: Collects and processes data from the blockchain, providing a comprehensive view of the network.
  • API Endpoints: Offers endpoints for querying blockchain data, including transaction histories, account balances, and network statistics.
  • Enhanced Data Access: Supports advanced features such as geolocation data and detailed network analytics.

Lisk Service enhances the functionality provided by Lisk Core by offering more powerful and flexible data access options. It allows developers to retrieve a broader range of blockchain data and integrate it into their applications seamlessly.

Developer Tools and Lisk Commander

Lisk Commander is a command-line interface (CLI) tool that simplifies the management and development of blockchain applications. It provides a range of commands for interacting with the Lisk network and managing nodes.

Commands

  • Node Management: Commands for setting up, starting, stopping, and monitoring blockchain nodes.
  • Blockchain Interaction: Tools for querying the blockchain state, submitting transactions, and retrieving block data.
  • Application Deployment: Commands for deploying blockchain applications, updating configurations, and managing application settings.
    Lisk Commander helps streamline the development process by providing essential tools for managing blockchain applications.

Module Conclusion

Lisk Core is a critical component of the Lisk ecosystem, responsible for managing blockchain operations, ensuring security, and providing essential API services. Its development includes significant updates like the migration to TypeScript, adoption of a modular architecture, and performance improvements. The integration of Lisk Service further enhances its functionality, offering powerful data access options for developers. The ongoing development and future enhancements ensure that Lisk Core remains a robust and scalable platform for blockchain innovation.

Highlights

  • Lisk Core Functions: Manages transaction processing, block creation, network synchronization, and provides API services.
  • Development Updates: Includes migration to TypeScript, an extensible database layer, and a modular architecture.
  • Consensus Mechanism: Uses Delegated Proof of Stake (DPoS) with Byzantine Fault Tolerance (BFT) for security and reliability.
  • Performance Improvements: Smaller blockchain size, faster query response times, faster block processing, and increased transactions per second (TPS).
  • Lisk Service: Enhances data access and integration for blockchain applications, providing comprehensive API endpoints and advanced data features.
Isenção de responsabilidade
* O investimento em criptomoedas envolve grandes riscos. Prossiga com cautela. O curso não se destina a servir de orientação para investimentos.
* O curso foi criado pelo autor que entrou para o Gate Learn. As opiniões compartilhadas pelo autor não representam o Gate Learn.
Catálogo
Lição 4

Lisk Core

This module provides an in-depth look into Lisk Core, the backbone of the Lisk network. It covers the functionalities, development, and performance improvements of Lisk Core, highlighting its importance in maintaining the integrity and security of the Lisk blockchain.

Overview of Lisk Core

Lisk Core manages all blockchain operations, including transaction processing, block creation, and network synchronization. It ensures the integrity and security of the blockchain by implementing several functionalities.

Lisk Core validates and processes transactions before including them in blocks. This involves checking the validity of transactions, ensuring they meet all protocol rules, and managing the transaction pool where pending transactions are stored. It also handles the creation of new blocks. Delegates elected by LSK token holders are responsible for forging new blocks, which are then broadcast to the network for validation.

Lisk Core ensures that all nodes in the network are synchronized with the latest state of the blockchain. This includes propagating new blocks and transactions across the network to maintain consistency. It also provides API endpoints for interacting with the blockchain. They allow developers to query blockchain data, submit transactions, and manage accounts.

Development of Lisk Core

Lisk Core has gone through several significant updates to enhance its performance, security, and scalability. These updates are part of a comprehensive development roadmap aimed at continuously improving the Lisk ecosystem.

One significant change in Lisk Core is the migration from JavaScript to TypeScript, which offers additional functionalities like type checking, which improves code reliability and maintainability. This helps in reducing bugs and making the development process more efficient.

Another change in Core is that it now uses an embedded database system instead of PostgreSQL. This reduces the complexity of setting up a development environment, optimizes storage size, and improves read/write performance. The embedded database system provides a more streamlined approach to data management within Lisk Core.

Lisk Core has also adopted a modular architecture, allowing for greater flexibility and scalability. This architecture enables developers to extend or replace specific components without affecting the entire system. Modules can be developed independently and integrated into the core, facilitating a more efficient development process.

Consensus Mechanism

Lisk uses a Delegated Proof of Stake (DPoS) consensus mechanism to secure its network. In DPoS, LSK token holders vote for delegates who are responsible for validating transactions and creating new blocks. This mechanism ensures a decentralized and efficient block production process.

To enhance the security and reliability of the DPoS mechanism, Lisk incorporates Byzantine Fault Tolerance (BFT). BFT ensures that the network can achieve consensus even in the presence of faulty or malicious nodes. It involves multiple stages of validation, including pre-voting and pre-commitment, to finalize blocks and maintain network consistency.

Performance Improvements

Lisk Core has seen several performance improvements aimed at enhancing its scalability and efficiency.

  1. Smaller Blockchain Size: The migration to an embedded database has significantly reduced the blockchain’s storage requirements. The new key-value store approach minimizes the size of the blockchain data.
  2. Faster Query Response Times: Improvements in the API layer have led to faster response times for blockchain queries, enhancing the overall user experience.
  3. Faster Block Processing: The time required to process blocks has been reduced, allowing for quicker transaction validation and inclusion in the blockchain.
  4. Increased Transactions per Second (TPS): Lisk Core now supports a higher TPS, allowing for a greater number of transactions to be included in each block. This improvement helps to support high-transaction applications on the Lisk network.

Running a Lisk Node

Running a Lisk node involves setting up the necessary hardware and software to participate in the Lisk network. Nodes are responsible for validating transactions, maintaining network security, and propagating blocks.

System Requirements

  • Memory: Modern multi-core CPU with good single-core performance. Machines with a minimum of 16 GB RAM (32 GB recommended).
  • Storage: Machines with a high-performance SSD drive with at least 750GB (full node) or 4.5TB (archive node) free.

Setting Up a Node

  1. Clone the Repository: Download the Lisk node software from the official GitHub repository.
  2. Docker Setup: Use Docker to manage the node environment. Set the appropriate environment variables and configurations.
  3. Syncing the Node: Synchronize the node with the network. The sync speed depends on the L1 node as most of the chain data is derived from it.

Lisk Service

Lisk Service acts as a middleware between the blockchain and user interfaces like Lisk Desktop and Lisk Mobile. It aggregates blockchain data and provides APIs for accessing this information, making it easier for developers to integrate blockchain data into their applications.

Main Features

  • Data Aggregation: Collects and processes data from the blockchain, providing a comprehensive view of the network.
  • API Endpoints: Offers endpoints for querying blockchain data, including transaction histories, account balances, and network statistics.
  • Enhanced Data Access: Supports advanced features such as geolocation data and detailed network analytics.

Lisk Service enhances the functionality provided by Lisk Core by offering more powerful and flexible data access options. It allows developers to retrieve a broader range of blockchain data and integrate it into their applications seamlessly.

Developer Tools and Lisk Commander

Lisk Commander is a command-line interface (CLI) tool that simplifies the management and development of blockchain applications. It provides a range of commands for interacting with the Lisk network and managing nodes.

Commands

  • Node Management: Commands for setting up, starting, stopping, and monitoring blockchain nodes.
  • Blockchain Interaction: Tools for querying the blockchain state, submitting transactions, and retrieving block data.
  • Application Deployment: Commands for deploying blockchain applications, updating configurations, and managing application settings.
    Lisk Commander helps streamline the development process by providing essential tools for managing blockchain applications.

Module Conclusion

Lisk Core is a critical component of the Lisk ecosystem, responsible for managing blockchain operations, ensuring security, and providing essential API services. Its development includes significant updates like the migration to TypeScript, adoption of a modular architecture, and performance improvements. The integration of Lisk Service further enhances its functionality, offering powerful data access options for developers. The ongoing development and future enhancements ensure that Lisk Core remains a robust and scalable platform for blockchain innovation.

Highlights

  • Lisk Core Functions: Manages transaction processing, block creation, network synchronization, and provides API services.
  • Development Updates: Includes migration to TypeScript, an extensible database layer, and a modular architecture.
  • Consensus Mechanism: Uses Delegated Proof of Stake (DPoS) with Byzantine Fault Tolerance (BFT) for security and reliability.
  • Performance Improvements: Smaller blockchain size, faster query response times, faster block processing, and increased transactions per second (TPS).
  • Lisk Service: Enhances data access and integration for blockchain applications, providing comprehensive API endpoints and advanced data features.
Isenção de responsabilidade
* O investimento em criptomoedas envolve grandes riscos. Prossiga com cautela. O curso não se destina a servir de orientação para investimentos.
* O curso foi criado pelo autor que entrou para o Gate Learn. As opiniões compartilhadas pelo autor não representam o Gate Learn.