How 0xmoncif213/rollupthecrowd works
Project type and purpose
• RollupTheCrowd is a blockchain-based, privacy-preserving crowdsourcing platform built on zkRollups (zkSync) and Chainlink oracles. It spans on-chain smart contracts (L1 & L2), off-chain deployment and interaction scripts, benchmarking, monitoring, and result analysis.
File structure
• Top-level directories:
• setup/: docker-based bootstrap for Chainlink nodes, PostgreSQL, zkSync local node
• contracts/: Solidity code (LINK token, Oracle contracts, core system contracts & libraries)
• interactions/: Hardhat/TypeScript scripts for L1 and L2 contract deployment & method calls
• benchmark/: Hyperledger Caliper configs and workloads for BusinessLogic, PreEvaluation, ReputationModel, AccessManagement
• monitor/: Docker-Compose + Prometheus + Grafana setup for collecting geth & node metrics
• results/: Raw data, Python plotting scripts, visualizations of gas, latency, effectiveness
• Notice the clear separation of concerns: on-chain artifacts, off-chain orchestration, performance testing, observability, and data analysis.
README for additional insights
• The README confirms:
• “BC-Client/Chainlink/ZkSync nodes” must be orchestrated
• Each sub-directory includes its own README guiding installation and usage
• The aim is to reproduce experiments from the associated paper
a. Main components
– Ethereum L1 network (Geth node)
– zkSync L2 rollup node
– Chainlink oracle node(s) (dockerized)
– Smart contracts deployed on L1 & L2:
· LINK token (L1)
· Oracle-interface contracts (L1)
· System-contracts (L2) implementing tasks, bids, solutions, reputation
– Off-chain orchestration:
· Hardhat scripts (interactions/L1 & L2) for deployment & calls
· Hyperledger Caliper (benchmark) workload runners
– Monitoring stack: Prometheus scraping node metrics, Grafana dashboards
– Results & plotting environment (Python scripts)
b. Relationships & interactions
– Hardhat→ deploys contracts to L1 & L2
– Front-end or CLI (not present but implied) invokes scripts under interactions/ to call contract methods
– Contracts on L2 reference oracles on L1 via Chainlink nodes
– Caliper clients send transactions to L1/L2 as workloads, collect throughput/latency
– Prometheus crawls geth/zkSync/Chainlink metrics → Grafana visualizes
– Results folder ingests Caliper JSON output → Python scripts generate graphs
c. Architectural patterns & principles
– On-chain/off-chain separation
– Layer-2 rollup pattern for scalability
– Modular smart contract design (token, oracle adapter, business logic)
– Micro-benchmarking suite decoupled from main code
– Infrastructure as code via Docker-Compose
d. Key technologies/frameworks
– Solidity (contracts)
– Hardhat + TypeScript (deployment & interaction)
– Hyperledger Caliper (benchmarks)
– Docker & Docker-Compose (setup, monitor)
– Prometheus & Grafana (observability)
– zkSync local node (L2 rollup)
– Chainlink node (oracles)
Essential architectural elements
• You include every sub-system: setup scripts, smart contract groups, interaction scripts, benchmark workloads, monitoring/observability, result analysis
• Avoid overcrowding: group similar workloads or contracts as a single “Business Logic Contracts” block but annotate its internal modules