Movement 백서

Movement

원문

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

er Recommendations** (Coming Soon) - AWS, GCP, and Azure instance recommendations * **Storage Requirements** (Coming Soon) - Storage types, capacity planning, and performance considerations * **Network Requirements** (Coming Soon) - Bandwidth, latency, and port configuration ### Validation & Staking (Coming Soon) Comprehensive guides for validation, staking, and governance will be available when Movement validators launch. ### Node Operations (Coming Soon) Step-by-step deployment and operational guides will be available when nodes launch. ### Development Tools (Coming Soon) Developer tools and local development environments will be available soon. ## Getting Started All Movement node types are currently in development and will be available soon. Detailed deployment guides and operational procedures will be published when the nodes are ready for mainnet launch. Stay tuned for updates on node availability and deployment instructions. ## Additional Resources * For community resources, support channels, and ways to get involved, see [Community and Support](/general/usingmovement/community-support). # Public Fullnode (PFN) URL: /general/l1/nodes/public-fullnode Public fullnodes (PFNs) will allow you to synchronize the state of the Movement blockchain and stay up-to-date. PFNs will replicate the entire state of the blockchain by syncing from VFNs and other PFNs. PFNs will be available for anyone to run and will serve as crucial infrastructure for the Movement ecosystem. PFNs will enable various use cases including: * **RPC Services**: Provide JSON-RPC endpoints for dApps and wallets * **Indexing**: Index blockchain data for analytics and APIs * **Development**: Local testing and development environments * **Backup**: Maintain redundant copies of blockchain state * **Analytics**: Historical data analysis and research ## Network Connection **Default connection to mainnet**: If you follow the default setup in this document, then your PFN will be connected to the Movement mainnet. To connect to a different Movement network, such as testnet, make sure you have the correct configuration files and genesis data. You can find the genesis and waypoint files for all Movement networks in the **[Movement Networks repository](https://github.com/movement-network/movement-networks)**. ## Overview When PFNs become available, running a PFN will involve: 1. **Requirements Check** - Ensure your system meets hardware and software specifications 2. **Deployment Method Selection** - Choose Docker, source build, or cloud deployment 3. **Node Configuration** - Set up configuration files and network parameters 4. **Deploy and Sync** - Start the node and sync with the network 5. **Service Configuration** - Set up optional services like APIs and indexing Detailed deployment guides will be published when PFNs are ready for launch. ## PFN Types and Use Cases #### Standard PFN * **Purpose**: Basic blockchain synchronization and data access * **Resources**: Moderate hardware requirements * **Services**: Basic RPC endpoints #### API PFN * **Purpose**: High-performance API services for dApps * **Resources**: Higher compute and memory for request handling * **Services**: Full REST API, WebSocket, custom endpoints #### Indexer PFN * **Purpose**: Specialized indexing and analytics * **Resources**: High storage and compute for data processing * **Services**: Custom indexing, analytics APIs, database integration #### Archive PFN * **Purpose**: Long-term historical data preservation * **Resources**: Very high storage requirements * **Services**: Complete historical access, research APIs ## System Requirements Detailed requirements will be provided when PFNs launch. ## Deployment Guides When PFNs become available, comprehensive guides will be provided for various deployment methods. # Validator Fullnode (VFN) URL: /general/l1/nodes/validator-fullnode Running a validator fullnode is not supported on the Movement Network at this time. ## System Requirements When validator fullnodes become available, they will serve as secure data access layers for validators. For detailed specifications and planning information, see System Requirements (Coming Soon). ## What VFNs Will Provide When available, validator fullnodes will offer: * **Security Layer**: Acts as a buffer between validators and public networks * **API Services**: Provides REST API and WebSocket endpoints * **Load Balancing**: Reduces load on validator nodes * **Data Distribution**: Serves blockchain data to ecosystem applications # Validator Node (VN) URL: /general/l1/nodes/validator-node Running a validator node is not supported on the Movement Network at this time. ## System Requirements When validator nodes become available, they will have specific hardware and software requirements. For detailed specifications and planning information, see System Requirements (Coming Soon). ## Get Notified To be notified when validator functionality becomes available: * **[Follow on Discord](https://discord.com/invite/moveindustries)** - Join the community * **[Monitor GitHub](https://github.com/movement-network/movement)** - Track development progress # Overview URL: /general/nodes/archival-node An **archival fullnode** maintains complete blockchain history from genesis by disabling ledger pruning. Unlike standard public fullnodes (PFNs) that sync from a recent state and prune old data, archival nodes preserve the full transaction history. ## When to Use an Archival Node An archival node is required if you need to: * Query historical blockchain state from any point in time * Access complete transaction history from genesis * Run indexers that require full historical data * Provide historical data services to other applications <Callout type="info"> **Standard vs Archival Nodes** | Feature | Standard PFN | Archival Node | | ------------------------ | ------------ | --------------------- | | Recent state queries | Yes | Yes | | Historical state queries | Limited | Full history | | Storage requirements | \~50-100GB | 700GB+ (mainnet) | | Initial sync time | Faster | Requires data restore | | Ledger pruning | Enabled | Disabled | </Callout> ## Key Configuration Difference The only configuration difference between a standard PFN and an archival node is the `storage_pruner_config` setting: ```yaml storage: storage_pruner_config: ledger_pruner_config: enable: false # Disable pruning for archival nodes ``` This setting prevents the node from pruning old ledger data, ensuring complete history is maintained. ## Bootstrapping with Existing Data Because archival nodes maintain complete history, syncing from genesis would take an extremely long time. Move Industries provides public backups that you can use to bootstrap your archival node with existing data. The backups are: * Updated hourly * Maintained for 14 days of snapshots * Available for both mainnet and testnet See the [deployment guides](/general/nodes/archival-node/run/deploy) for instructions on restoring from backups. ## Hardware Requirements | Resource | Minimum | Recommended | | -------- | -------- | ------------- | | Storage | 1TB SSD | 2TB+ NVMe SSD | | Memory | 16GB RAM | 32GB RAM | | CPU | 8 cores | 16 cores | | Network | 100 Mbps | 1 Gbps | <Callout type="warning"> **Storage Growth** Archival nodes continuously grow as they store all blockchain data. Plan for storage expansion over time. As of January 2026: * Mainnet: \~700GB * Testnet: \~260GB </Callout> ## Next Steps * [Run an Archival Node](/general/nodes/archival-node/run) - Overview of running archival nodes * [Deploy with Docker](/general/nodes/archival-node/run/deploy/docker) - Deploy using Docker containers * [Deploy from Source](/general/nodes/archival-node/run/deploy/source) - Build and deploy from source code # Overview URL: /general/nodes/full-node You can run your own public fullnode (PFN) to synchronize the state of the Movement blockchain and stay up-to-date. PFNs replicate the entire state of the blockchain by syncing from other Movement VFNs and PFNs. PFNs can be run by anyone. This section explains how to deploy a PFN and connect to a Movement network. You can learn more about the different types of nodes in the [M1](/general/l1/nodes) section. **Default connection to testnet** If you follow the default setup in this document, then your PFN will be connected to the Movement testnet. To connect to a different Movement network, such as testnet or mainnet, make sure you have the correct docker image tag, or source code branch if you build the binary directly. You can find the genesis and waypoint files for all the networks, here ➜ [https://github.com/movement-network/movement-networks](https://github.com/movement-network/movement-networks). # Wallet Connection URL: /devs/interactonchain/wallet-adapter/useWallet/ConnectWallet <Callout> Want to skip this and go straight to the code? [Click here](https://github.com/Rahat-ch/Movement-Network-ConnectWallet-Template) </Callout> ## Building a Movement Network Wallet Connection Template This tutorial will guide you through building a wallet connection interface for Movement Network using Next.js, TypeScript, and the Aptos Wallet Adapter. ## Prerequisites * Node.js 18+ and npm/yarn installed * Basic knowledge of React and TypeScript * A Movement-compatible wallet (we recommend [Nightly](https://nightly.app/)) ## Project Setup ### 1. Create a Next.js Application with shadcn/ui This template was built using the shadcn init command, which automatically creates a Next.js application with TypeScript, Tailwind CSS, and the shadcn/ui component system pre-configured: ```bash npx shadcn@latest init ``` Follow the Prompts for a Next JS application. ### 2. Install Required UI Components After initializing the project, install the specific shadcn/ui components used in this template: ```bash npx shadcn@latest add button card dialog input sonner ``` ### 3. Install Core Dependencies Install the Movement SDK and wallet adapter packages: ```bash npm install @moveindustries/ts-sdk @aptos-labs/wallet-adapter-react ``` ### 4. Install Wallet Standard and Peer Dependencies **Important**: You'll need to install peer dependencies with the legacy peer deps flag to avoid version conflicts: ```bash npm install @aptos-labs/wallet-standard --legacy-peer-deps npm install @telegram-apps/bridge uuid aptos got --legacy-peer-deps ``` ## Core Implementation ### 1. Wallet Provider Setup Create a wallet provider component at `components/wallet-provider.tsx`: ```typescript "use client"; import { ReactNode } from "react"; import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react"; import { MovementConfig, Network } from "@moveindustries/ts-sdk"; interface WalletProviderProps { children: ReactNode; } export function WalletProvider({ children }: WalletProviderProps) { // Movement Mainnet configuration const movementConfig = new MovementConfig({ network: Network.MAINNET, fullnode: "https://mainnet.movementnetwork.xyz/v1", }); return ( <AptosWalletAdapterProvider autoConnect={true} dappConfig={movementConfig} onError={(error) => { console.error("Wallet error:", JSON.stringify(error, null, 2)); }} > {children} </AptosWalletAdapterProvider> ); } ``` ### 2. Root Layout Configuration Update your `app/layout.tsx` to include the wallet provider: ```typescript import { WalletProvider } from "@/components/wallet-provider"; import { Toaster } from "@/components/ui/sonner"; export default function RootLayout({ children, }: { children: React.ReactNode; }) { return ( <html lang="en"> <body> <WalletProvider> {children} <Toaster /> </WalletProvider> </body> </html> ); } ``` ### 3. Wallet Selection Modal with Movement Network Connection There is some filtered logic for the wallets here in order to remove wallets that are not fully compatible with Movement Network. Create `components/wallet-selection-modal.tsx`: ```typescript "use client"; import { useState } from "react"; import { useWallet } from "@aptos-labs/wallet-adapter-react"; import { getAptosWallets } from "@aptos-labs/wallet-standard"; // ... UI imports export function WalletSelectionModal({ children }: { children: React.ReactNode }) { const [open, setOpen] = useState(false); const { wallets, connect } = useWallet(); // Filter and prioritize wallets const filteredWallets = wallets .filter((wallet) => { const name = wallet.name.toLowerCase(); // Filter out incompatible wallets return !name.includes("petra") && !name.includes("google") && !name.includes("apple"); }) .filter((wallet, index, self) => { // Remove duplicates return index === self.findIndex((w) => w.name === wallet.name); }) .sort((a, b) => { // Nightly wallet first (best Movement support) if (a.name.toLowerCase().includes("nightly")) return -1; if (b.name.toLowerCase().includes("nightly")) return 1; return 0; }); const handleWalletSelect = async (walletName: string) => { try { // IMPORTANT: Connect with Movement network info if (typeof window !== "undefined") { const allWallets = getAptosWallets(); const selectedWallet = allWallets.aptosWallets.find(w => w.name === walletName); if (selectedWallet?.features?.['aptos:connect']) { // Connect directly to Movement Network const networkInfo = { chainId: 126, // Movement Mainnet name: "custom" as const, url: "https://mainnet.movementnetwork.xyz/v1" }; const result = await selectedWallet.features['aptos:connect'].connect(false, networkInfo); if (result.status === "Approved") { await connect(walletName); setOpen(false); return; } } } // Fallback await connect(walletName); setOpen(false); } catch (error) { // Handle error } }; // Render modal with wallet options... } ``` ### 4. Network Switching Component Since Aptos wallet adapter doesn't support using the built in switch component for custom networks like Movement, we need a special approach. This code is compatible with Nightly Wallet, you will need to determine if other wallets are able to use the switch network functionality. Otherwise the fallback will be to ask the user to manually switch the network in their wallet. Create `components/switch-network.tsx`: ```typescript export function SwitchNetwork() { const { network, wallet } = useWallet(); // Detect current network by chain ID const isMovementMainnet = network?.chainId === 126; const isMovementTestnet = network?.chainId === 250; const isNightly = wallet?.name?.toLowerCase().includes("nightly"); const handleSwitchNetwork = async (targetNetwork: "mainnet" | "testnet") => { const chainId = targetNetwork === "mainnet" ? 126 : 250; // Only Nightly supports Movement network switching if (isNightly && typeof window !== "undefined") { if ((window as any).nightly?.aptos?.changeNetwork) { await (window as any).nightly.aptos.changeNetwork({ chainId, name: "custom" }); return; } } toast.error("Network switching only supported with Nightly wallet"); }; // Render network status and switch buttons... } ``` ## Key Features Implementation ### 1. Send Transaction The send transaction component (`components/send-transaction.tsx`) handles Movement network configurations: ```typescript const MOVEMENT_CONFIGS = { mainnet: { chainId: 126, fullnode: "https://mainnet.movementnetwork.xyz/v1", }, testnet: { chainId: 250, fullnode: "https://testnet.movementnetwork.xyz/v1", } }; // Dynamically use the correct network based on chain ID const getCurrentNetworkConfig = () => { if (network?.chainId === 126) return MOVEMENT_CONFIGS.mainnet; if (network?.chainId === 250) return MOVEMENT_CONFIGS.testnet; return MOVEMENT_CONFIGS.testnet; // Default }; ``` ### 2. Sign Message The sign message component (`components/sign-message.tsx`) handles signature formatting: ```typescript // Handle different signature formats from wallets if (response.signature?.data?.data) { // Convert byte array to hex string const byteArray = Object.values(response.signature.data.data) as number[]; signature = '0x' + byteArray.map(byte => byte.toString(16).padStart(2, '0')).join(''); } ``` ## Movement Network Configuration ### Chain IDs * **Mainnet**: 126 * **Testnet**: 250 (Bardock) ### RPC Endpoints * **Mainnet**: `https://mainnet.movementnetwork.xyz/v1` * **Testnet**: `https://testnet.movementnetwork.xyz/v1` ### Explorer * **Format**: `https://explorer.movementnetwork.xyz/txn/{txHash}?network={mainnet|testnet}` ## Important Considerations ### 1. Wallet Compatibility Not all Aptos wallets support Movement Network properly. We recommend: * **Nightly Wallet** (Full support including network switching) * Other wallets may work but without network switching ### 2. Network Connection on Wallet Selection **Critical**: When users click "Connect Wallet", the implementation attempts to connect directly to Movement Network (not Aptos mainnet). This is achieved through the wallet-standard `aptos:connect` feature with network info. ### 3. Network Switching Limitations * Standard Aptos wallet adapter doesn't support Movement network switching * Only Nightly wallet currently supports programmatic network switching * Other wallets require manual network configuration ### 4. Error Handling The template includes proper error handling for: * Network mismatches * Failed transactions * Wallet connection issues * Signature formatting differences ## Project Structure ``` movement-wallet-app/ ├── app/ │ ├── layout.tsx # Root layout with providers │ └── page.tsx # Main page with wallet UI ├── components/ │ ├── wallet-provider.tsx # Wallet adapter setup │ ├── wallet-selection-modal.tsx # Connection with Movement network │ ├── wallet-demo-content.tsx # Connected wallet UI │ ├── switch-network.tsx # Network switching (Nightly only) │ ├── send-transaction.tsx # Send MOVE tokens │ ├── sign-message.tsx # Message signing │ └── ui/ # shadcn/ui components └── lib/ └── utils.ts # Utility functions ``` ## Testing Your Implementation 1. **Install Nightly Wallet** from [nightly.app](https://nightly.app/) 2. **Run your development server**: `npm run dev` 3. **Connect Wallet**: Click connect and select Nightly 4. **Verify Network**: Check that you're connected to Movement Network (Chain ID 126 or 250) 5. **Test Features**: * Switch between Movement mainnet and testnet * Send a test transaction (ensure you have MOVE tokens) * Sign a message ## Troubleshooting Errors ### Peer Dependency Issues Always use `--legacy-peer-deps` when installing wallet-related packages: ```bash npm install [package] --legacy-peer-deps ``` ### Wallet Not Connecting to Movement Ensure the wallet selection modal is using the correct network info: * Chain ID: 126 (mainnet) or 250 (testnet) * Network name: "custom" ### Network Switching Not Working Only Nightly wallet supports Movement network switching. Other wallets need manual configuration. ### Transaction Failures Verify: * Correct network configuration in send-transaction component * Wallet is on Movement Network * Sufficient MOVE balance # Sign & Submit URL: /devs/interactonchain/wallet-adapter/useWallet/signAndSubmitTx ## Overview This React component implements a transaction signing and submission functionality for the Aptos blockchain. It provides a simple button interface that allows users to sign and submit transactions using their connected Aptos wallet. ## Dependencies ```typescript import React from 'react'; import { useWallet } from '@aptos-labs/wallet-adapter-react'; import { Movement, MovementConfig, Network } from '@moveindustries/ts-sdk'; ``` * `@aptos-labs/wallet-adapter-react`: Provides wallet connection functionality * `@moveindustries/ts-sdk`: Movement blockchain SDK for interaction with the network ## Configuration ```typescript const config = new MovementConfig({ network: Network.TESTNET, fullnode: 'https://testnet.movementnetwork.xyz/v1', faucet: 'https://faucet.
프로젝트로 돌아가기