Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Index and store all blocks, state, and transaction data for a Substrate-based chain in a relational SQL database.
Use a REST service to interact with blockchain nodes built using FRAME.
Generate and manage public and private key pairs for accounts.
Submit extrinsics to a Substrate node using RPC.
Rust is a modern, type-safe, and high-performance programming language that offers a comprehensive set of features for developing complex systems. Its strong emphasis on safety and concurrency makes it a popular choice among developers. The language is supported by an active and vibrant community, which contributes to a growing ecosystem of reusable libraries known as crates.
If you’re looking to dive into blockchain or smart contracts development you’ll need to become well-acquainted with Rust. Understanding the Rust programming language, its compiler, and toolchain management is essential for effectively utilising Substrate.
The Rust toolchain comprises essential components, including the rustc compiler, the cargo package and build manager, and the rustup toolchain manager. It's important to note that multiple versions of Rust can coexist in your environment, with different release channels available: stable, beta, and nightly builds. The rustup program is crucial for managing these versions and ensuring that you can easily switch between different toolchain programs based on your project’s requirements.
The rustc compiler is designed to produce binaries for various architectures, known as targets. Each target is specified by a string that informs the compiler about the desired output format. This functionality is particularly significant for Substrate, which compiles to both a native Rust binary and a WebAssembly (Wasm) target.
For beginners, a great starting point is , often referred to as "the book," which provides a thorough introduction to the language. Additionally, the Rust website offers a variety of resources under the section that can help guide your learning journey. As you set up your development environment, there are several key points to consider.
Participating in the governance process can take three forms:
Being elected as a council member on the governing committee
Putting forth a proposal for the community to vote on
Staking to receive voting rights
Votes will be weighted based on locked tokens. All tokens staked by node operators will be eligible for voting, but other users can lock up their tokens to be given voting power. Anyone will be able to stake a Flow token to vote on issues (even if they aren’t participating as a staked node).
Tokens may be staked for operation or governance rights which gives holders the right to participate in running a node and/or to participate in public votes.
Proposals can be brought forward on a public forum where they will be evaluated by the governing committee. All decisions are made publicly and any stakeholder has the opportunity to organize grassroots action to veto specific decisions or to vote in or remove council members.
To ensure the progress of the network, the elected council first assesses the proposal and selects an answer they agree to be the "default choice". Voters can freely vote how they choose, but having a well-considered default allows forward progress without being blocked by passive participants. All decisions are voted on by all participants and decisions made by the council must be ratified by a public vote on the network.
Vote outcomes and upcoming votes will be published every Friday by 7am PT. All upcoming votes are available for review and voting for at least two weeks following their publication.
The following parameters will be set on the network on day 1 and will not be candidates for a public vote when the network first launches.
The staking ratio preserved between each node type
The maximum inflation rate
The role of FLOW as the main reserve asset for collateralized secondary tokens (e.g. stablecoins)
The mechanism through which transaction inclusion, computation, and storage fees are determined and paid for
Once governance is enabled, the community can participate in the following:
Protocol upgrades, including things like: - the consensus algorithm - the low-level network communication structure - the execution environment - the number of seats available for each node type
Management of Ecosystem Development Fund, including: - issuance of grants - bug & feature bounties
Selecting council members
Committee budgets for each of the operational arms of the Foundation, including the executive, technical, operational, legal, pricing, financial, and marketing branches.
Management of legal affairs, including: - enforcing license and patent infringements - issuing takedown notices and copyright infringement - freezing accounts if illegal activity occurs - updating the community, security, contribution policies
During the Bootstrapping Phase, anyone may apply online to be set as a Validator by the Company. Approved Validators must then Stake a fixed minimum of FLOWs based on Validator type. Other FLOW holders may become “Delegators” when they dedicate or “Delegate” their FLOWs to approved Node Operators as a signal that they believe that Validator to be an effective and honest participant of the network. Staking and Delegation features are already enabled as of the Effective Date.
Each Validator makes an individual decision of which Protocol Version they choose to use. Since the value of blockchain networks is primarily due to the collectively verified execution state, there is a strong incentive for Validators to choose a Protocol Version that is compatible with the Protocol Version selected by the majority of other Validators. As a practical matter, the Protocol Version chosen by the overwhelming majority of Validators is likely to be the most recent Protocol Version produced and recommended by the Core Team, provided the proposed changes are not contentious. However, if a significant fraction of the community disagrees with any aspect of the most recent Protocol Version, they can band together to use a previous Protocol Version, or some other Protocol Version defined independently from the Core Team. This process of a “contentious forking” is rare, but does have several precedents in other networks (REF: Ethereum Classic, Bitcoin Cash).
The process by which the Core Team chooses the updates for each new Protocol Version follows the open process described above, using GitHub as an open discussion platform to gauge the priorities and needs of the entire Flow ecosystem. The proposed changes by the Core Team will be announced and discussed well before they are implemented, and any community member can propose their own changes or contribute code updates to implement any proposed changes. The details of a new Protocol Version are publicly available no less than 14 days before that version is formally recommended for use by Validators (a “Release”), with the complete implementation source code visible for no less than 7 days before a Release.
Substrate, a customizable blockchain framework, provides a robust foundation for PHRON. By leveraging its pre-built components, we can expedite development and ensure a solid technological basis for our project.
Comprehensive Feature Set: Substrate offers a wide range of features, including peer-to-peer networking, consensus mechanisms, governance, and an Ethereum Virtual Machine (EVM), eliminating the need for redundant development.
Tailored Customization: Substrate's modular architecture enables us to customize the framework to meet PHRON's specific requirements, ensuring compatibility with Ethereum.
Performance and Efficiency: Rust, the programming language underlying Substrate, delivers performance comparable to C and C++, making it ideal for computationally intensive AI algorithms.
Enhanced Security: Rust's strong memory safety guarantees help prevent common programming errors, bolstering the reliability and security of our AI systems.
Concurrency and Parallelism: Substrate's concurrency primitives facilitate efficient utilization of multicore processors, optimizing the performance of AI algorithms.
Rich Ecosystem: Substrate benefits from a thriving ecosystem of libraries and tools, including those specifically designed for machine learning and data processing, accelerating development and deployment.
Rust's combination of performance, memory safety, and concurrency features make it an exceptional choice for AI development. Its ability to handle complex algorithms efficiently, while ensuring reliability and security, is indispensable for AI applications that demand high performance and trustworthiness.
By building PHRON on Substrate and utilizing Rust, we can establish a robust foundation for our AI-driven initiatives. The framework's comprehensive features, combined with Rust's performance and security, will empower us to develop efficient, secure, and scalable AI solutions.
A quick dive to the required resources to begin building with Phron AI.
Before you can begin developing, it’s essential to prepare your development environment by installing the necessary compiler and tools. Since Substrate—and most of the tools used for Substrate development—are built using the Rust programming language, the first step is to install Rust on your computer.
The installation process for Rust varies depending on your operating system. Below are the instructions for each platform:
Linux
Here's an improved version of your Rust installation guide. I've organized the information more clearly, enhanced readability, and provided additional context where needed.
Before installing Rust, ensure your system meets the following requirements:
Check Documentation: Refer to your operating system's documentation for information about installed packages and how to download and install any necessary packages.
Required Packages: At a minimum, you need the following packages:
clang
curl
git
make
Cryptography Support: Since blockchain development requires standard cryptography for generating public/private key pairs and validating transaction signatures, you also need a package that provides cryptography:
For Debian-based systems (like Ubuntu): libssl-dev
For Red Hat-based systems (like Fedora): openssl-devel
To install the necessary packages, follow these steps:
Open a Terminal: Log on to your computer and open a terminal shell.
Check Installed Packages: Use the appropriate package management command for your Linux distribution to check installed packages.
Install Missing Dependencies: Run the following command to install the required packages. Adjust the command based on your distribution.
Debian:
Arch:
Fedora:
OpenSUSE:
Note:Different distributions may use different package managers and package names. Ensure you adjust the commands accordingly.
Download and Install rustup: Use the following command to download and install the Rust toolchain:
Follow the on-screen prompts to proceed with the default installation.
Update Your Shell: To ensure your current shell session recognizes Cargo (Rust's package manager), run:
Verify Installation: Check that Rust is installed correctly by running:
Set Default Toolchain: Configure the Rust toolchain to default to the latest stable version:
Add Nightly Release and Targets: If you need nightly features or WebAssembly support, add the nightly release and targets:
Verify Configuration: Check your development environment configuration:
You should see output similar to:
macOS
Here's an improved version of your documentation for installing Rust on macOS. You can copy this text into Google Docs to save it in .docx format.
Before setting up your development environment on macOS, ensure your computer meets the following requirements:
Operating System: macOS 10.7 Lion or later
Processor Speed: At least 2 GHz (3 GHz recommended)
Memory: Minimum of 8 GB RAM (16 GB recommended)
Storage: At least 10 GB of available storage
Internet Connection: Broadband connection
Apple Silicon Support: Ensure your setup supports Apple Silicon.
Additionally, Protobuf must be installed before the build process begins. To install it, run the following command:
Homebrew is the recommended package manager for macOS. If you don't have it installed, follow these steps:
Open Terminal: Launch the Terminal application on your Mac.
Install Homebrew: Run the following command to download and install Homebrew:
Verify Installation: Check that Homebrew is installed successfully by running:
You should see output similar to:
To set up Rust and its dependencies, follow these steps:
Open Terminal: Ensure you are in the Terminal application.
Update Homebrew: Make sure Homebrew is up to date by running:
Install OpenSSL: Install the OpenSSL package:
Install Rust: Download the rustup
installation program and use it to install Rust:
Follow Prompts: Follow the on-screen prompts to complete the default installation.
Update Shell: Include Cargo in your current shell session:
Verify Installation: Confirm that Rust is installed correctly by running:
Set Default Toolchain: Configure the Rust toolchain to use the latest stable version:
Add Nightly Release and Targets: To include nightly features and WebAssembly support, run:
Verify Configuration: Check your Rust environment configuration:
You should see output similar to:
To complete your setup, install CMake with the following command:
You have successfully installed the Rust toolchain on your Linux system! You can now start developing Rust applications. For more resources and documentation, visit .
The Phron Explorer is available through PhronScan and provides real-time information on all on-chain activities.
The Phron explorer is accessible through , a high-precision Web3 service designed for Substrate chains. PhronScan offers real-time insights into various aspects of the network, including Chain Data, Token Status, Latest Blocks, Transfers, and Validators. Its user-friendly interface makes it easy to navigate and track important network activities.
Seamless Interoperability: Developers can leverage their existing Ethereum knowledge and codebase, minimizing the learning curve and accelerating development.
Expanded Ecosystem: Phron benefits from a vast ecosystem of Ethereum tools, libraries, and developer communities, fostering innovation and collaboration.
Enhanced Compatibility: Phron's EVM implementation adheres to Ethereum's security standards, providing a secure and reliable environment for smart contract execution.
Advanced Performance: Rust's inherent efficiency provides a significant performance boost for running EVM bytecode compared to other languages.
Exceptional Security: Rust's memory safety guarantees significantly reduce vulnerabilities often associated with traditional smart contract development languages.
Consensus Mechanisms:
Phron employs a novel approach to consensus by combining Proof-of-Stake (PoS) and Directed Acyclic Graphs (DAGs) under the supervision of AI. The committee of validators, selected based on their overall performance and participation in the network chosen by SophiaAI protocol, is responsible for verifying the validity of transactions and blocks.
Finality:
PHRON and Ethereum have distinct approaches to finality mechanisms. Ethereum utilizes a checkpoint system wherein validators determine finality at designated block checkpoints, leading to an average delay of approximately 6.4 minutes for block finalization. In contrast, PHRON employs the AlephBFT finality gadget, which enables significantly faster finality, especially when enhanced by AI-driven processes.
When comparing finality mechanisms, AlephBFT offers advantages in terms of speed and efficiency. It is designed to achieve consensus quickly, making it particularly suitable for high-throughput environments. On the other hand, Ethereum’s GRANDPA (GHOST-based Recursive ANcestor Deriving Prefix Agreement) finality mechanism, while robust and secure, introduces latency due to its reliance on the checkpointing system.
Overall, the combination of AlephBFT and AI in PHRON allows for rapid and efficient block finalization, positioning it as a strong alternative to Ethereum's finality approach.
Phron's fully integrated Ethereum Virtual Machine (EVM) empowers developers to seamlessly deploy and execute smart contracts written in Solidity or other EVM-compatible languages. This compatibility leverages a robust Rust implementation of the EVM, built upon the well-established project. This choice of Rust ensures exceptional performance, memory safety, and security, making Phron a reliable platform for demanding smart contract applications.
This guide will walk you through the steps to bridge tokens between the PhronAI and Sepolia networks, converting PhronAI tokens to PHRToken (and vice versa) as well as WrappedETH on PhronAI to ETH on Sepolia (and vice versa).
Open the Bridge Interface: Access the bridge platform and connect your multi-network wallet, such as MetaMask.
Select the Network: Choose either Sepolia (for PHRToken/ETH) or PhronAI (for PhronAI/WrappedETH), depending on the direction of your transfer.
Choose Your Token:
For PhronAI to PHRToken, select the PhronAI token on the PhronAI network.
For WrappedETH to ETH, select WrappedETH on the PhronAI network.
Approve the Bridge Contract:
You must allow the bridge contract to access your tokens for transfer. This approval only needs to be done once per token type. Confirm the approval request in your wallet.
Enter the Amount: Specify the amount of the token you wish to bridge.
Initiate the Transfer:
For PhronAI to Sepolia: Select “Transfer” to move PhronAI (or WrappedETH) to the Sepolia network. This locks the original tokens on PhronAI and mints PHRToken (or ETH) on Sepolia.
For Sepolia to PhronAI: Select “Transfer” to move PHRToken (or ETH) to the PhronAI network. The bridge contract locks the tokens on Sepolia and releases the equivalent amount on PhronAI as PhronAI or WrappedETH.
Transaction History: Check the “Transaction History” section on the bridge interface for updates on your transfer status.
Claim Tokens:
For some transfers, you may need to click “Claim” once the transaction is confirmed on the destination network to complete the bridge process.
Tokens will appear in your wallet once finality is achieved.
You can reverse the process if you wish to return PHRToken to PhronAI or WrappedETH to ETH. Follow the same steps, choosing the correct token and network for the direction of transfer.
Conversion Rates: All bridge conversions are 1:1, meaning that PhronAI always converts to an equivalent amount of PHRToken, and WrappedETH always converts to an equivalent amount of ETH.
Fees: Gas fees and potential bridge fees apply depending on network congestion and platform requirements. Confirm fees in the bridge interface before transferring.
This guide covers all steps for securely converting tokens between PhronAI and Sepolia networks. For further assistance, refer to the bridge’s support documentation or explore transaction history via the Sepolia and PhronAI blockchain explorers.