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

Guard against non-expected parties during init observation. #295

Merged
merged 10 commits into from
Apr 6, 2022

Commits on Apr 5, 2022

  1. Configuration menu
    Copy the full SHA
    f13d00b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d19f707 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    265767f View commit details
    Browse the repository at this point in the history
  4. Revert "Verify PTs match their respective pubkey hashes in head param…

    …eters."
    
      & Revert "Add pub key hashes to list of parties in on-chain head parameters.".
    
      After discussing the next steps, we realized that passing the pub key
      hashes on-chain and checking the PTs does not actually provide any
      extra security guarantees and only makes the on-chain code more
      complicated.
    
      In the end, this is something we can only truly handle off-chain,
      durign the observation of an init transaction. It is the observer who
      knows the configuration it is expecting, and that can decide whether
      some observation is valid or not.
    
      On-chain, there isn't much we can do since, anyone crafting the init
      transaction may also change the redeemer, parameters or anything
      really. The participants of a head are BY DEFINITION the keys
      identified by the PT. Now, those participants may or may not reflect a
      known configuration of a node, but this is decided off-chain
      exclusively.
    KtorZ committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    1fa86d6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f7a5b9a View commit details
    Browse the repository at this point in the history
  6. Define new mutation properties for testing off-chain code observation.

      Use it for catching errors on an illed-formed init tx.
    KtorZ committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    f65726e View commit details
    Browse the repository at this point in the history
  7. Fix output selection for init mutation: make tests fail for the right…

    … reason.
    
      Whoopsie...
    KtorZ committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    f95de75 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a4bc8ad View commit details
    Browse the repository at this point in the history
  9. Tweak observe-init mutation to mutate minted values instead of outputs.

      Indeed... mutating outputs isn't caught by our guard because we only
      check minted values. Which is this however sufficient?
    
      (a) The ledger rules ensure that any minted value is actually properly
      distributed in outputs (transaction ins and outs must balance each
      other)
    
      (b) Our on-chain validator does ensure that the right number of assets
      are minted, in the right quantity, and that assets are distributed
      across the right number of outputs.
    KtorZ committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    7df5d2c View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2022

  1. Configuration menu
    Copy the full SHA
    7814721 View commit details
    Browse the repository at this point in the history