Skip to content

Document mathematical proofs #2

Description

@secsovereign

Description

Add inline documentation explaining mathematical invariants for functions with Kani proofs.

Context

We have 176+ Kani proofs in the codebase, but the mathematical reasoning behind them isn't always documented. Adding clear documentation will help contributors understand the formal verification approach.

Acceptance Criteria

  • Identify functions with Kani proofs that lack documentation
  • Add inline documentation explaining mathematical invariants
  • Document the relationship between proofs and consensus rules
  • Ensure documentation is clear and accessible

Technical Details

  • Files to modify: src/**/*.rs (functions with Kani proofs)
  • Dependencies: None
  • References: See docs/FORMAL_VERIFICATION_PLAN.md for context

Skills Required

  • Technical writing
  • Bitcoin protocol knowledge
  • Mathematical notation understanding

Difficulty

  • Good First Issue
  • Intermediate
  • Advanced

Priority

  • P0 (Critical - Blocks production)
  • P1 (High - Important feature)
  • P2 (Medium - Nice to have)
  • P3 (Low - Future enhancement)

Getting Started

  1. Search for #[cfg(kani)] or kani::proof in the codebase
  2. Identify functions with proofs but minimal documentation
  3. Add doc comments explaining the mathematical invariants
  4. Reference related Orange Paper sections where applicable
  5. Submit PR with documentation improvements

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions