Technical reference
Smart Contracts
Explore the architecture of the JudgeNod Anchor program and the state management of hackathon submissions on Solana.

Program Structure
JudgeNod is built using the **Anchor Framework**, providing a secure and type-safe environment for defining judging logic. The program is designed for modularity, allowing for custom scoring plugins.
Account Hierarchy
The program manages state through a hierarchical set of accounts:
- GlobalConfig: Singleton account containing global administrative settings and supported SVM versions.
- RubricAccount: Created per hackathon. Stores the criteria, judge whitelist, and finalization status.
- SubmissionAccount: Created per judge-project pair. Contains the raw scores and the repository hash.
Key Instructions
The core logic is exposed through these primary instructions:
pub fn initialize_rubric(ctx: Context<InitializeRubric>, criteria: Vec<Criterion>) -> Result<()> { // Defines the scoring rules for the hackathon } pub fn submit_score(ctx: Context<SubmitScore>, project_hash: [u8; 32], scores: Vec<u8>) -> Result<()> { // Validates signature and records the evaluation } pub fn finalize_results(ctx: Context<FinalizeResults>) -> Result<()> { // Closes submissions and computes the final leaderboard }Security Measures
Security is the cornerstone of JudgeNod. Our contracts undergo rigorous internal auditing and include several safety mechanisms:
Access Control
Requires specific judge-signature verification for every submission action.
Reentrancy Protection
Utilizes Solana's parallel execution model and account locks to prevent state manipulation.
PDA Isolation
Scores are stored in Program Derived Addresses tied to the judge and project to prevent collisions.
Audit Logs
Every instruction emits a detailed event log for indexing and external verification.