Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Practical docs for using Validation #468

Open
mattyg opened this issue Oct 14, 2024 · 0 comments · May be fixed by #486
Open

Practical docs for using Validation #468

mattyg opened this issue Oct 14, 2024 · 0 comments · May be fixed by #486

Comments

@mattyg
Copy link
Member

mattyg commented Oct 14, 2024

Must include:

  • code examples
  • practical, terse explanation

Topics to include (consider splitting into sub-pages):

  • Validation

    • Determinism
      • dependencies
        • must_get_* functions
          • must_get_valid_record is the only one that checks for validation receipts/warrants because an entry is only valid/invalid in the context of an action
          • this also means it trusts the word of others (1-of-n validation)
        • short-circuiting with ?
    • Operate on ops
      • flat ops convenience thingy
    • Considerations re: what should be validated on each op (IOW, what authorities should be responsible for what things)
    • Things that can be validated
      • membrane proof
      • entry structure (entry_def macro gives you deserialisation and error short-circuiting for free with ? operator)
      • permission
      • rate limiting with weight field
      • dependencies, incl source chain history
        • Inductive validation for costly dep trees (pattern?)
    • Limitations
      • Cannot must_get links or actions on a base
      • Cannot currently co-validate multiple actions (can only validate an action based on prior valid actions)
      • Cannot validate the non-existence of something, because that can always change
    • (future) source chain restructured to atomic bundle of actions, co-validated
    • sys validation
    • Lifecycle of a validation
      • At author time
      • At publish time
      • At gossip time
    • Membrane proof
      • Genesis self-check -- not a 'true' validation function, just a way to guard yourself against copy/paste mistakes and other things that can permanently hose your chance of joining a network
      • (future) Handled specially -- restricts/grants access to a network; validated at handshake time (turns out this is not currently implemented, and there are questions about how to implement it in a way that doesn't carry a performance hit with each new peer connection -- and there may be lots of them in a big heavily sharded DHT)
        • AgentValidationPkg is the only action for which an honest person can get warranted, because they try to join the network and publish it before they're able to fetch deps
  • Sys validation

    • What does it validate?
      • Source chain continuity
      • Timestamp monotonicity
      • Contiguity of authorship
        • (future) if DPKI enabled, sys validation checks that changes of agent ID are reflected in DPKI DNA as-at action timestamp
      • What else?
@mattyg mattyg added this to Holochain Oct 14, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Holochain Oct 14, 2024
@mattyg mattyg changed the title Practical docs for using validation Practical docs for using Validation Oct 14, 2024
@mattyg mattyg linked a pull request Oct 25, 2024 that will close this issue
@jost-s jost-s moved this from Backlog to Ready for refinement in Holochain Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for refinement
Development

Successfully merging a pull request may close this issue.

1 participant