aelf 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 41쪽 중 3쪽

nvolves two types of participants: sequencers and aggregators . Sequencer: Proposes transaction batches to the network, grouping and adding transaction requests to ZkEVM.cs. Aggregator: Reviews the validity of transaction batches and provides necessary validity proofs. Permissionless aggregators can submit these proofs to attest to the accuracy of state transition computations. Data Availability ​ aelf ZK-rollup's validium mode incorporates a secure data availability layer managed by the DAC, which: Verifies the availability of data associated with specific blockchain blocks; and Ensures data robustness and computational efficiency for aelf ZK-rollup. Advantages of DAC include: reduce transaction fees; less computation equals lower costs. state privacy; maintaining secure records of state changes for data integrity. zkEVM / ZKProver ​ One of the core functionalities of aelf ZK-rollup's nodes is its zkEVM and ZKProver. The general operation flow is as follows: zkEVM / ZKProver receives a large batch of transactions from Layer 2, executes the transactions, and utilises ZK (Zero-Knowledge) technology to generate zero-knowledge proofs. The proof generation process is outlined below: The node sends the contents of the Merkle tree to the database for storage. Subsequently, the node sends a batch of transactions to the ZKProver component. ZKProver accesses the database and retrieves necessary information to generate verifiable proofs for the transactions sent by the node. This information includes the Merkle root, keys, and hash values of relevant sibling nodes. Finally, ZKProver generates proofs for the transactions and sends them back to the node. Sequencer ​ The Sequencer is responsible for ordering transactions and constantly updating the global state: Transaction Ordering : Retrieves transactions from the pool and adds them to the state. State Transition : Collaborates with the Executor to process transactions and update the state. Trustworthy Finality : Once the Sequencer adds a transaction to the state, it shares this information with other nodes, making the transaction final. Other nodes need to trust that the transaction has been added to the state until they receive data availability (DA) and validity (ZKP) confirmations, as detailed below in Transaction Journey on aelf ZK-Rollup . Aggregator ​ The Aggregator is responsible for submitting proofs of the validity of the Layer 2 state to Layer 1. To achieve this, it takes batches ordered by the Sequencer and interacts with Provers to generate Zero-Knowledge Proofs (ZKPs). To efficiently accomplish this, the Aggregator will: Coordinate with one or more Provers Aggregate proofs for multiple batches, where a single proof can validate multiple batches Bridge ​ Token asset access and contract invocations (message passing) between aelf's Layer 2 and Layer 1 are facilitated through the zkEVM Bridge smart contract. It achieves network interoperability by utilising two distinct Global Exit Tree Root managers on Layer 1 and Layer 2, along with the bridging smart contract (ZkEVMBridge.cs). Gas Fees ​ aelf ZK-rollup involves two primary participants who both earn and pay ELF tokens as gas fee. Sequencer: - Pays gas fees for creating and proposing batches. - Receives fees paid by transaction requesters or network users as rewards when successfully proposing valid batches containing valid transactions. Aggregator: - Validates transactions proposed and batched by the Sequencer. - Runs on the aelf ZK-rollup's ZKNode software and utilises ZKProver to create zero-knowledge validity proofs. - Provides validity proofs to verify transactions, earning ELF fees paid by the Sequencer for each successful verification. Transaction Journey on aelf ZK-rollup ​ Before conducting Layer 2 transactions, users need to transfer some ELF from L1 to L2 through the aelf ZK-rollup bridge for gas fees. The subsequent steps are as follows: Users initiate a transaction from their wallet (e.g. Portkey ) and send it to the Sequencer. Once the Sequencer commits to adding the transaction, it is finalised on L2. At this point, the transaction is settled on L2, but its state has not yet propagated to L1. This state is known as the Pre-validated State . The Sequencer transfers batch data to a smart contract on L1, allowing any node to safely and trustlessly synchronise its state from L1. This state is called the Committed State . The Aggregator collects pending transactions for validation and constructs proofs to achieve finality on L1. Once the proofs are verified, the user's transaction achieves finality on L1, a crucial step for withdrawals and other operations. This state is referred to as the Verified State . The present status of aelf The aelf solution Verification Process Consensus Contract Data Availability Transaction Journey on aelf ZK-rollup ## /resources/whitepaper-2/roadmap On this page aelf 2025 Roadmap: Introduction This roadmap outlines aelf's strategic advancements in core blockchain technology, focusing on modularity, distributed computing, and AI integration. Q1 2025 ​ Core Modules: Consensus and Data Availability ​ aelf will abstract the consensus and data availability functionalities into modular components. This allows flexibility for developers to either use default implementations or leverage standardised interfaces to build tailored solutions. Exploring and Integrating Cutting-Edge Blockchain Architectures ​ aelf will actively incorporate advanced blockchain architectures, such as BlockDAG (this is a potential layer of technology to be explored) into its modular framework. These architectures offer innovative solutions to scalability and concurrency challenges often faced by traditional blockchain structures. Q2 2025 ​ Modular Execution and Consensus ​ Extend modularity to the execution and consensus layers , enabling developers to leverage default implementations or build custom solutions via standardised interfaces. This enhances flexibility and future-proofs the blockchain for next-phase advancements in Web3 AI technology. Customisable Blockchain Assembly ​ Proof-of-Concept (PoC) validation for dynamically loading custom module components at runtime, specified through configuration files. This empowers developers to tailor the blockchain to specific use cases and experiment with novel configurations. AI Intent Recognition and Automated Execution ​ Introduce an AI-powered layer that automates complex Web3 and crypto interactions. By recognising user intents, the Web3 AI system can execute tasks like signing, contract calls, and fee settlements without manual intervention, improving user experience and efficiency. Q3 2025 ​ Fully Operational Modular Blockchain ​ Finalise core functionalities of execution, consensus, data availability, and settlement modules, including extensions, to achieve a comprehensive and operational blockchain. Pluggable Module Integration ​ Enable the development and seamless integration of custom and extended modules into the modular blockchain architecture, further enhancing flexibility and customisation. Cloud-Native Deployment ​ Deploy the modular blockchain on a cloud-native architecture, leveraging scalable and distributed computing resources to optimise performance and resource allocation. AI Privacy and Security ​ Integrate privacy-enhancing technologies like zero-knowledge proofs (ZKP) and homomorphic encryption to ensure user data security and privacy, even with automated AI operations. Q4 2025 ​ Complete Modular Blockchain ​ Finalise development of all remaining modules, including governance, economic models, permissions, and security, to establish a fully functional and modular blockchain system. Cloud-Native AI Integration ​ Enhance DevOps interoperability through AI integration. AI-powered monitoring and automated scaling within the cloud-native environment will also optimise efficiency and ensure high availability. Pluggable AI Engine ​ Empower developers to integrate diverse AI models , such as LLMs and graph neural networks, for specialised scenarios like complex cross-chain interactions and smart contract logic suggestions. Q1 2025 Core Modules: Consensus and Data Availability Exploring and Integrating Cutting-Edge Blockchain Architectures Q2 2025 Modular Execution and Consensus Customisable Blockchain Assembly AI Intent Recognition and Automated Execution Q3 2025 Fully Operational Modular Blockchain Pluggable Module Integration Cloud-Native Deployment AI Privacy and Security Q4 2025 Complete Modular Blockchain Cloud-Native AI Integration Pluggable AI Engine ## /resources/whitepaper-2/references-and-further-readings aelf. Whitepaper V 1.7.0. October 25th, 2022. [ Link ] Blockchain Council. "How Blockchain and AI Can Work Together." Blockchain Council, January 22, 2024. Retrieved from [ Link ] Buterin, V. (2024, January 30). Crypto AI. Retrieved from [ Link ] Chen, Y., & Bellavitis, C. (2020). Blockchain disruption and decentralized finance: The rise of decentralized business models. Journal of Business Venturing Insights, 13, e00151. [ Link ] Christos Smiliotopoulos, Ryan Benton, Georgios Kambourakis, Dimitrios Damopoulos. "Blockchain and Artificial Intelligence: Synergies and Conflicts." *arXiv*, 2024. [ Link ] Christos Smiliotopoulos, Ryan Benton, Georgios Kambourakis, Dimitrios Damopoulos. "The Convergence of Artificial Intelligence and Blockchain: The State of Play and the Road Ahead." *MDPI Information*, vol. 15, no. 5, 2024. [ Link ] Cointelegraph. "EU Commission Urged to Prepare for Blockchain and AI Integration." Cointelegraph, May 24, 2024. Retrieved from [ Link ] Dinh, T. N., & Thai, M. T. (2018). AI and blockchain: A disruptive integration. Computer, 51(9), 48-53. [ Link ] ETH Research. (2024). How AI Revolutionizes Ethereum: Another View on AI & Blockchain. Retrieved from [ Link ] Pandl, K. D., Thiebes, S., Schmidt-Kraepelin, M., & Sunyaev, A. (2020). On the convergence of artificial intelligence and distributed ledger technology: A scoping review and future research agenda. IEEE Access, 8, 57075-57095. [ Link ] Polygon Technology. (2024). Polygon CDK Documentation. Retrieved from [ Link ] Salah, K., Rehman, M. H. U., Nizamuddin, N., & Al-Fuqaha, A. (2019). Blockchain for AI: Review and open research challenges. IEEE Access, 7, 10127-10149. [ Link ] Techopedia. (2024). Why Is the Future of Blockchain Modular? Retrieved from [ Link ] World Economic Forum. "How Immersive Technology, Blockchain and AI Are Converging." World Economic Forum, June 2024. Retrieved from [ Link ] Xiong, Z., Zhang, Y., Niyato, D., Wang, P., & Han, Z. (2018). When mobile blockchain meets edge computing. IEEE Communications Magazine, 56(8), 33-39. [ Link ] Zheng, Z., Xie, S., Dai, H. N., Chen, W., Chen, X., Weng, J., & Imran, M. (2020). An overview on smart contracts: Challenges, advances and platforms. Future Generation Computer Systems, 105, 475-491. [ Link ] ## /resources/whitepaper Please refer to the Whitepaper 1.0 (Original) . ## /resources/tokenomics Please refer to the Economic and Governance Whitepaper (Original) . ## /resources/integration-guide On this page Description : aelf-web-login: A modular React wallet collection and components library for aelf applications. Purpose : To provide installation and configuration instructions for integrating various aelf wallets into a React application using the aelf-web-login library. Introduction ​ aelf-web-login : Modular React wallet collection and components for aelf applications. website : https://aelf-web-login.vercel.app/ Install ​ yarn add @aelf-web-login/wallet-adapter-night-elf @aelf-web-login/wallet-adapter-portkey-aa @aelf-web-login/wallet-adapter-portkey-discover @aelf-web-login/wallet-adapter-react @aelf-web-login/wallet-adapter-base @aelf-web-login/wallet-adapter-bridge Then the package.json will be like this "dependencies" : { "@aelf-web-login/wallet-adapter-night-elf" : "^0.0.2-alpha.7" , "@aelf-web-login/wallet-adapter-portkey-aa" : "^0.0.2-alpha.7" , "@aelf-web-login/wallet-adapter-portkey-discover" : "^0.0.2-alpha.7" , "@aelf-web-login/wallet-adapter-react" : "^0.0.2-alpha.7" , "@aelf-web-login/wallet-adapter-base" : "^0.0.2-alpha.7" , "@aelf-web-login/wallet-adapter-bridge" : "^0.0.2-alpha.7" , } Config ​ Import PortkeyDiscoverWallet , PortkeyAAWallet and NightElfWallet and generate instance Create didConfig (internal invoke: ConfigProvider.setGlobalConfig(didConfig) ) Create baseConfig for SignIn component Create wallets by wallet instance Combine them into a whole as config import { PortkeyDiscoverWallet } from '@aelf-web-login/wallet-adapter-portkey-discover' ; import { PortkeyAAWallet } from '@aelf-web-login/wallet-adapter-portkey-aa' ; import { NightElfWallet } from '@aelf-web-login/wallet-adapter-night-elf' ; import { IConfigProps } from '@aelf-web-login/wallet-adapter-bridge' ; import { TChainId , SignInDesignEnum , NetworkEnum } from '@aelf-web-login/wallet-adapter-base' ; const APP_NAME = 'explorer.aelf.io' ; const WEBSITE_ICON = 'https://explorer.aelf.io/favicon.main.ico' ; const CHAIN_ID = 'AELF' as TChainId ; const NETWORK_TYPE = NetworkEnum . TESTNET ; const RPC_SERVER_AELF = 'https://aelf-test-node.aelf.io' ; const RPC_SERVER_TDVV = 'https://tdvv-public-node.aelf.io' ; const RPC_SERVER_TDVW = 'https://tdvw-test-node.aelf.io' ; const GRAPHQL_SERVER = 'https://dapp-aa-portkey-test.portkey.finance/Portkey_DID/PortKeyIndexerCASchema/graphql' ; const CONNECT_SERVER = 'https://auth-aa-portkey-test.portkey.finance' ; const didConfig = { graphQLUrl : GRAPHQL_SERVER , connectUrl : CONNECT_SERVER , requestDefaults : { baseURL : 'https://aa-portkey-test.portkey.finance' , timeout : 30000 , } , socialLogin : { Portkey : { websiteName : APP_NAME , websiteIcon : WEBSITE_ICON , } , } , } ; const baseConfig = { networkType : NETWORK_TYPE , chainId : CHAIN_ID , keyboard : true , noCommonBaseModal : false , design : SignInDesignEnum . CryptoDesign , // "SocialDesign" | "CryptoDesign" | "Web2Design" titleForSocialDesign : 'Crypto wallet' , iconSrcForSocialDesign : 'url or base64' , } ; const wallets = [ new PortkeyAAWallet ( { appName : APP_NAME , chainId : CHAIN_ID , autoShowUnlock : true , } ) , new PortkeyDiscoverWallet ( { networkType : NETWORK_TYPE , chainId : CHAIN_ID , autoRequestAccount : true , autoLogoutOnDisconnected : true , autoLogoutOnNetworkMismatch : true , autoLogoutOnAccountMismatch : true , autoLogoutOnChainMismatch : true , } ) , new NightElfWallet ( { chainId : CHAIN_ID , appName : APP_NAME , connectEagerly : true , defaultRpcUrl : RPC_SERVER_AELF , nodes : { AELF : { chainId : 'AELF' , rpcUrl : RPC_SERVER_AELF , } , tDVW : { chainId : 'tDVW' , rpcUrl : RPC_SERVER_TDVW , } , tDVV : { chainId : 'tDVV' , rpcUrl : RPC_SERVER_TDVV , } , } , } ) , ] const config : IConfigProps = { didConfig , baseConfig , wallets } ; Usage ​ Import WebLoginProvider , init and useConnectWallet invoke init with upper config as params pass the return value bridgeAPI to WebLoginProvider use useConnectWallet to consume bridgeAPI import { WebLoginProvider , init , useConnectWallet } from '@aelf-web-login/wallet-adapter-react' ; const App = ( ) => { const bridgeAPI = init ( config ) ; // upper config return ( < WebLoginProvider bridgeAPI = { bridgeAPI } > < Demo /> </ WebLoginProvider > ) ; } ; const Demo = ( ) => { const { connectWallet , disConnectWallet , walletInfo , lock , isLocking , isConnected , loginError , walletType , getAccountByChainId , getWalletSyncIsCompleted , getSignature , callSendMethod , callViewMethod } = useConnectWallet ( ) ; } API ​ connectWallet ​ connectWallet : ( ) => Promise < TWalletInfo > Connect wallet and return walletInfo import { Button } from 'aelf-design' ; const Demo = ( ) => { const { connectWallet } = useConnectWallet ( ) ; const onConnectBtnClickHandler = async ( ) => { try { const rs = await connectWallet ( ) ; } catch ( e : any ) { console . log ( e . message ) } } return ( < Button onClick = { onConnectBtnClickHandler } > connect </ Button > ) } disConnectWallet ​ disConnectWallet : ( ) => Promise < void > Disconnect wallet import { Button } from 'aelf-design' ; const Demo = ( ) => { const { disConnectWallet } = useConnectWallet ( ) ; const onDisConnectBtnClickHandler = ( ) => { disConnectWallet ( ) } return ( < Button onClick = { onDisConnectBtnClickHandler } > disConnect </ Button > ) } lock ​ lock : ( ) => void Lock wallet, only portkeyAA wallet take effect import { Button } from 'aelf-design' ; const Demo = ( ) => { const { lock } = useConnectWallet ( ) ; return ( < Button onClick = { lock } > lock </ Button > ) } getAccountByChainId ​ getAccountByChainId : ( chainId : TChainId ) => Promise < string > Get account address of designative chainId import { Button } from 'aelf-design' ; const Demo = ( ) => { const { getAccountByChainId } = useConnectWallet ( ) ; const getAelfAccountHandler = async ( ) => { const address = await getAccountByChainId ( 'AELF' ) console . log ( address ) } const getTdvwAccountHandler = async ( ) => { const address = await getAccountByChainId ( 'tDVW' ) console . log ( address ) } return ( < Button onClick = { getAelfAccountHandler } > account-AELF </ Button > < Button onClick = { getTdvwAccountHandler } > account-tDVW </ Button > ) } getWalletSyncIsCompleted ​ getWalletSyncIsCompleted : ( chainId : TChainId ) => Promise < string | boolean > Return account address of designative chainId if sync is competed, otherwise return false import { Button } from 'aelf-design' ; const Demo = ( ) => { const { getWalletSyncIsCompleted } = useConnectWallet ( ) ; const getAelfSyncIsCompletedHandler = async ( ) => { const address = await getWalletSyncIsCompleted ( 'AELF' ) console . log ( address ) } const getTdvwSyncIsCompletedHandler = async ( ) => { const address = await getWalletSyncIsCompleted ( 'tDVW' ) console . log ( address ) } return ( < Button onClick = { getAelfSyncIsCompletedHandler } > sync-AELF </ Button > < Button onClick = { getTdvwSyncIsCompletedHandler } > sync-tDVW </ Button > ) } getSignature ​ const getSignature : ( params : TSignatureParams ) => Promise < { ` ` error : number ; ` ` errorMessage : string ; ` ` signature : string ; ` ` from : string ; ` ` } | null > Get signature message import { Button , Input } from 'aelf-design' ; type TSignatureParams = { appName : string ; address : string ; signInfo : string ; hexToBeSign ? : string ; } ; const Demo = ( ) => { const { getSignature } = useConnectWallet ( ) ; const [ signInfo , setSignInfo ] = useState ( '' ) ; const [ signedMessage , setSignedMessage ] = useState ( '' ) ; const signHandler = async ( ) => { const sign = await getSignature ( { signInfo , appName : '' , address : '' , } ) ; setSignedMessage ( sign . signature ) ; } ; return ( div > < div > < Button onClick = { signHandler } > Sign </ Button > < Input value = { signInfo } onChange = { ( e ) => setSignInfo ( e . target . value ) } /> < div > { signedMessage } </ div > </ div > </ div > ) } callSendMethod ​ callSendMethod : < T , R > ( props : ICallContractParams < T > ) => Promise < R > Call contract's send method import { Button } from 'aelf-design' ; interface ICallContractParams < T > { contractAddress : string ; methodName : string ; args : T ; chainId ? : TChainId ; sen
프로젝트로 돌아가기