How immunefi-team/attackathon-movement works
Main Components
– Protocol Units: (found under protocol-units): These are the core building blocks that implement protocol logic (bridge, da, cryptography, execution, settlement, etc.).
– Network Runners: (found under networks): These provide entry points for launching nodes (both full nodes and indexers).
– Utility Crates: (under util, such as godfig, collections, signing, etc.) that offer common functionality across the system.
– Protocol Buffers: (under proto) for external communication and code generation.
• Node Implementations:
– Movement Full Node: (from networks/movement-full-node, docs, and related just targets) represents the operational server that runs a full blockchain node.
– Celestia Data Availability Light Node: (movement-celestia-da-light-node in benches and docker) handles the DA services on Celestia network.
– Demo and Bench Components: (demo, benches folders) used for testing, benchmarking, or illustrating example usage.
• Infrastructure & Deployment:
– Docker & Process Compose: (docker, process-compose folders) contain Dockerfiles, docker-compose files, orchestration recipes that deploy the services.
– Scripts: (scripts folder) holds automation for building, testing, and running containers and native builds.
– Nix Environment: (nix shell via nix develop, rust-toolchain.toml) ensures that development occurs under the right environment with all dependencies available.
• External Interfaces & APIs:
– REST APIs: The full node exposes external endpoints such as the Aptos REST API and the Aptos Faucet API (as mentioned in the README under “Services”).
– External Blockchain Services: Integration components for Ethereum (e.g., eth-local, eth-holesky) and potentially other networks.
Relationships and Data Flow
• The “Movement SDK” core crates (protocol-units, util, proto) form the internal logic that is used by the network runners.
• The network runners (directories under networks) integrate with the core libraries to provide node operation, indexer functionalities, or client interactions.
• Scripts and build configurations (in scripts, justfile, and util/buildtime) support CI/CD and deployment; they “trigger” builds, run tests, and deploy containers.
Architectural Patterns / Design Principles
• Modularity: The SDK is structured into separate “protocol-units”, “networks”, “util”, and “proto”, which promote code reuse and plug-and-play development.
• Containerization: Use of Dockerfiles and orchestration recipes (docker-compose, process-compose) clearly segments deployment and environment management.
• Environment Isolation: The integration of Nix environments ensures consistent tooling during development and production.
• Separation of Concerns: There is a clear separation between core libraries, node implementations, service orchestration, and deployment scripts.
Final Touches
• Patterns (e.g., “Microservices approach” if individual nodes run distinct services, “Modular SDK” for the protocol building blocks).
Happy diagramming!