Skip to content
CCPEDIAby Unity Nodes
App Development

External party confirmation resilience

10 posts213 views3 likesLast activity 21d ago

  1. MichaelOP 1

    If a node hosting an external party with confirmation threshold 1 is compromised, can the attacker transact as that party without its keys? Is threshold ≥ 2 across independent nodes the only mitigation?

  2. Colin

    I’ll think about it more but yes, that’s the only mitigation I can think of.

  3. Michael

    Thanks. Just to make sure I get the trust model right: multiple signing keys and a decentralized namespace don’t help against a compromised confirming node. External signatures are checked only by the confirming participants. So with threshold 1, a compromised node can approve a transaction for the party that nobody signed.

  4. Colin

    Hmm. Maybe some way to implement using a lock-unlock mechanism but it would probably be expensive today?

    Possibly helpful/related:

    Canton Network Docs

    ​Confirming participant node - Local and External Parties - Canton Network Docs

    Local and external parties, hosting relationships, and the distinction between native and externally signed parties.

  5. Michael
    Colin:

    lock-unlock mechanism

    What do you mean by lock-unlock mechanism?

  6. Colin

    Lock the external party’s holdings with a co-signatory on an independent node, no expiry. Every spend then needs that second node to confirm, so one hacked node can’t move them. Cost? A co-sign per spend.

  7. Michael 1

    Right, but this is feasible only if the token implementation supports such functionality, right? You cannot lock arbitrary holdings using, for example, DA Utilities token standard implementation

    Also, locking holdings isn’t enough on its own. A compromised node can still exercise any choice the party controls and create new contracts on its behalf (accept offers, allocations, etc.)

  8. orumedominic 1

    Michael is right that locking holdings is not enough. A compromised node can exercise any choice the party controls.

    Which is why the second signature belongs on the contract, not on the holding. Put the co-signatory on the signatory line, and they create their authority, so a node holding the party’s key cannot bring the contract into existence at all. No token standard involvement, because it is contract authorization rather than holdings.

    Tested: testASecondJournalIsPrevented in step-0-refusal.

    The limit is stated because it is real: if one submitter holds both authorities, it is defeated. testSubmittingAsTheGuardianDefeatsIt.

    Colin’s co-sign-per-spend cost applies here too.

    File dominicrume/cantor8_kya_rails

    step-0-refusal/test/daml/JournalTest.daml

    -- The point of this suite is the detection, not the template.
    --
    -- Every test here is written so that it goes red if the journal stops being
    -- able to catch a specific lie. A suite that only proves the counter counts
    -- would stay green through the removal of the thing the module is for.
    module JournalTest where
    
    import DA.Action (foldlA)
    import DA.Assert ((===))
    import Daml.Script
    import Journal
    import Refusal
    
    data Setup = Setup
      with
        owner : Party
        actor : Party
        guardian : Party
        auditor : Party
        journal : ContractId AttemptJournal
    
    This file has been truncated. show original
  9. Michael

    Agreed for contracts you author

    But if your party holds token holdings (CC, USDCx or cETH, it doesn’t matter), you can’t simply add a second signatory to them, at least not with the current token implementations. The same applies to any contract whose template you don’t control

    So the only mitigation, as far as I can see, is multi-hosting with a confirmation threshold greater than one. Even with several signing keys on the party, a compromised node can ignore them if the threshold is 1

  10. orumedominic

    Agreed, and that is a boundary I should state more plainly.

    The guardian never goes on a holding. It goes on the journal and the attempt record, which are contracts I author, and the asset is wrapped so it moves only through a choice that writes a journal entry first.

    The wrapping is the weak point, not the signatory line. testAnOwnerControlledChoiceStillBypassesTheJournal shows why: a consuming choice archives on the controller’s authority alone, so one ordinary owner-controlled choice moves the asset and the journal stays at zero.

    That is a specification hole, not a code bug, so the fix belongs in the CIP as a requirement on implementers.