This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from AstarNetwork/v2-v3-content-migration
last of v2 -> v3 content migration
- Loading branch information
Showing
370 changed files
with
5,398 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"label": "Architecture", | ||
"position": 7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Astar Parachain | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Overview | ||
If you are already building on Polkadot you will not need to go over the sections covering Substrate and how to create a Runtime, but it will be helpful for you to understand the environment, terminology and how to leverage Polkadot's highly interoperable environment. | ||
|
||
Polkadot is a multi-chain environment which enables specialized blockchains (called Parachains) to communicate with each other in a secure, trustless environment. | ||
|
||
Astar is a parachain connected to the Polkadot Relay chain, specialized for: | ||
* Executing all types of smart contracts. | ||
* Providing a hybrid EVM + Wasm environment supporting Cross-VM (XVM) smart contract calls. | ||
* Incentivizing ecosystem innovation and providing basic income for dApp developers. | ||
* Seamlessly aggregating features or assets from parachains in the ecosystem. | ||
|
||
## What is Polkadot | ||
To get started, let's kick it off with two short videos that do a very good job at explaining some core concepts around Polkadot. First, watch Bill Laboon, Director of Education and Support at the Web3 Foundation, explain the basics of Polkadot. | ||
|
||
<iframe width="100%" height="500" src="https://www.youtube.com/embed/29Ty-VTDnh4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> | ||
|
||
Ok, you can’t learn it all in one minute. But how about in 5 minutes? Have a look at this excellent video from DeFi Teller, explaining how Polkadot works. | ||
|
||
<iframe width="100%" height="500" src="https://www.youtube.com/embed/BQ60bTU1bPg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> | ||
|
||
## How the Relay Chain works | ||
The Polkadot network uses a sharded model where shards - called "parachains", allow transactions to be processed in parallel instead of sequentially. Each parachain in the network has a unique state transition function. Polkadot is a Relay Chain acting as the main chain of the system. | ||
|
||
Parachains construct and propose blocks to validators on the Relay Chain, where the blocks undergo rigorous availability and validity checks before being added to the finalized chain. As the Relay Chain provides the security guarantees, collators - full nodes of these parachains - don't have any security responsibilities, and thus do not require a robust incentive system. This is how the entire network stays up to date with the many transactions that take place. | ||
|
||
## Substrate | ||
Based on Polkadot's design, as long as a chain's logic can compile to Wasm and adheres to the Relay Chain API, then it can connect to the Polkadot network as a parachain. | ||
However, the majority of parachains today are built using [Substrate](https://substrate.io/) because Substrate-based chains are easy to integrate into Polkadot or Kusama to become a parachain. Essentially, Substrate is the SDK which can be used to build parachains and Polkadot is the means of securing the chains and allowing them to communicate with each other. | ||
|
||
Astar Network is built with Substrate and inherints many Substrate features, such as Accounts. | ||
|
||
At a high level, a Substrate node provides a layered environment with two main elements: | ||
1. An outer node that handles network activity such as peer discovery, managing transaction requests, reaching consensus with peers, and responding to RPC calls. | ||
2. A runtime that contains all of the business logic for executing the state transition function of the blockchain. | ||
Read more about [Architecture](https://docs.substrate.io/fundamentals/architecture/). | ||
|
||
### FRAME | ||
FRAME is an acronym for Framework for Runtime Aggregation of Modularized Entities which encompasses a significant number of modules and support libraries that simplify runtime development. In Substrate, these modules (called pallets) offer customizable business logic for different use cases and features that you might want to include in your runtime. For example, there are pallets that provide a framework of business logic for staking, consensus, governance, and other common activities. | ||
Read more about [Runtime development](https://docs.substrate.io/fundamentals/runtime-development/) | ||
|
||
|
||
## Where Do Smart Contracts Execute? | ||
The Polkadot runtime does not support smart contracts. Smart contracts require a Virtual Machine (VM) environment where contracts can be executed, and the most well-known and widely supported platform being the Ethereum Virtual Machine (EVM). Substrate FRAME contains modules that support Wasm smart contract execution, as well as EVM. | ||
|
||
### Ethereum Virtual Machine (EVM) | ||
The Ethereum Virtual Machine (EVM) is a virtual computer with components that enable Ethereum network participants to store data and agree on the state of that data. On a Substrate-based blockchain, the core responsibilities of the EVM are implemented in the EVM pallet, that's responsible for executing Ethereum contract bytecode written in a high level language like Solidity. Astar EVM provides a fully Ethereum Virtual Machine compatible platform, which you can learn more about in the [EVM chapter](/docs/build/build-on-layer-1/smart-contracts/EVM/index.md) | ||
|
||
### Substrate Virtual Machine for Wasm Contracts | ||
Substrate also ships with a module for smart contracts, called `pallet-contracts`. If a parachain is developed on Substrate it can easily add smart contract functionality by including this pallet. Astar supports this Polkadot Native approach to smart contracts, and you can learn more in the [Wasm chapter](/docs/build/build-on-layer-1/smart-contracts/wasm/index.md). | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Architecture | ||
--- | ||
|
||
import Figure from '/src/components/figure' | ||
|
||
# Overview | ||
Before you get started on your journey towards becoming an Astar network hacker, it will be beneficial to know about what Polkadot and Ethereum are, because Astar Network connects to both, and each have their own set of benefits benefits and limitations. | ||
|
||
<Figure src={require('/docs/about/architecture/img/fig4.jpg').default} /> | ||
|
||
Some highlights on the Polkadot parachain side are dApp Staking, ink! smart contracts, cross-chain messaging (XCM), and forkless upgradability, and on the Ethereum layer 2 side are the highest levels of EVM equivalence, shared liquidity across layer 2 networks, and access to the largest pool of developers in the blockchain industry that we can tailor our products for, on-demand. | ||
|
||
For now, let's go over some basics that apply to all blockchains whether they are sovereign layer 1 networks, or rely on another blockchain such as the Polkadot Relay Chain for shared security and interoperability. | ||
|
||
## Blockchain Basics | ||
A blockchain is a decentralized ledger that records information in a sequence of blocks. The information contained in a block is an ordered set of instructions that may or may not result in a change in state. | ||
|
||
In a blockchain network, individual computers—called nodes—communicate with each other to form a decentralized peer-to-peer (P2P) network. There is no central authority that controls the network and, typically, each node that participates in block production stores a copy of the blocks that make up the canonical chain. | ||
|
||
In most cases, users interact with a blockchain by submitting a request that might result in a change in state, for example, a request to change the owner of a file or to transfer funds from one account to another. These transactions requests are gossiped to other nodes on the network and assembled into a block by a block author. To ensure the security of the data on the chain and the ongoing progress of the chain, the nodes use some form of consensus to agree on the state of the data in each block and on the order of transactions executed. [Read more...](https://docs.substrate.io/fundamentals/blockchain-basics/) | ||
|
||
## Applications Running on a Blockchain | ||
Applications that run on a blockchain, often referred to as decentralized applications or dApps, are typically web applications written using front-end frameworks, but powered by smart contracts on the backend, to affect the blockchain state. | ||
|
||
A **smart contract** is a program that runs on a blockchain and executes transactions on behalf of users under specific conditions. Developers can write smart contracts to ensure that the outcomes of programmatically-executed transactions are recorded, and can't be tampered with. Yet, smart contracts operate in a sandboxed environment, where developers don't have access to underlying blockchain functionality, such as consensus, storage, or transaction layers, and instead, abide by a chain's fixed rules and restrictions. Smart contract developers often accept these limitations as a tradeoff that shortens the development lifecycle, by avoiding having to make core design decisions. | ||
|
||
## Ethereum Virtual Machine (EVM) | ||
The Ethereum Virtual Machine (EVM) is a virtual computer with components that enables network participants (not necessarily on Ethereum) to store data and agree on the state of that data. Smart contracts run on the EVM, and most Layer 1 blockchains support an EVM-compatible virtual machine environment. Astar Parachain and Astar zkEVM both support EVM-compatible environments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# About Astar Network | ||
|
||
[Astar Network]: https://astar.network/ | ||
|
||
Astar Network is Japan's most popular smart contract platform, supporting both EVM and WebAssembly (Wasm) environments, and interoperability between them using a Cross-Virtual Machine. Astar Network is friendly to all kinds of developers, and the tools and languages they already know. Backed by the shared security of Polkadot, Astar shines brilliantly on its own within a vibrant and healthy ecosystem, and in the blockchain industry overall driving international corporate adoption, and consumer interest in Web3 technologies. | ||
|
||
## Lack of developer incentives | ||
|
||
Astar's Build2Earn system is designed to grow the network in an innovative way, while simultaneously rewarding participants and builders. It allows developers to earn incentives for building and maintaining their decentralized applications, and users to earn incentives for supporting their favorite projects, all while encouraging growth of the ecosystem overall. | ||
|
||
## Scalability | ||
|
||
Blockchains do not scale by design, mostly due to the security assurances inherent in their decentralized consensus mechanisms. If blockchains were faster, they would be less secure. There is an upper limit to the amount of data that can be stored in individual blocks, and at times of network saturation, users of typical blockchains may notice their transactions sitting unconfirmed or in a pending state for long periods of time, resulting in a poor user experience. | ||
|
||
The solution to the issue, up until now, has been a patchwork of independent blockchains loosely connected by bridges - often subject to attack due to their reliance on custodial elements, with no common security standards or methods of interoperability between all. The idea of 'cross-chain', therefore, has mostly been to copy and paste a smart contract from one blockchain, to another. Projects that create real value are quickly copied and deployed elsewhere for better, or for worse, with almost no real innovation taking place overall. | ||
|
||
Astar Network is changing that, and ushering in the next generation of multichain smart contracts uniquely able to utilize the best features from both EVM and WebAssembly Virtual Machines, and any number of application-specific blockchains across the broader Polkadot ecosystem. All while being future-proof. | ||
|
||
## Interoperability | ||
|
||
This interoperability framework, empowered by the shared security of Polkadot coupled with Astar XVM, allows developers to use and build smart contracts in ways they never have before. By fostering cooperation and integrations across multiple blockchains and applications, complex synergies can be developed, leading to the realization of truly innovative solutions that can't be replicated in any other environment. | ||
|
||
Many different blockchains exist, but few have interoperability as their defining feature. Welcome to Astar Network. |
Oops, something went wrong.