WebOfTrustInfo / btcr-hackathon-2019

BTCR Hackathon 2019
https://weboftrustinfo.github.io/btcr-hackathon-2019/
MIT License
2 stars 0 forks source link

Satoshi audit trail should be part of DID resolution metadata #9

Open kimdhamilton opened 5 years ago

kimdhamilton commented 5 years ago

Satoshi audit trail should be part of DID resolution metadata. How should this be represented?

ChristopherA commented 5 years ago

In https://github.com/WebOfTrustInfo/btcr-hackathon-2019/issues/4#issuecomment-519279631 I tried to work out what the audit trail for the simple transaction did:btcr:xg35-jzrx-qtyt-jqr (be5be4b2c4e530b49af139a8448ae2ae8b5882f2e7f5c7908eca0268f72494e9) should be.

This version requires a lot more work. @mattcollier suggested we use webledger context, which has some useful things, but is missing a lot as well. We would need to have someone like @dlongley or @msporny help resolve adding generic things that apply to multiple blockchains like audit, burn-fee, chain, network, etc.

I suggest we discuss audit trail and schema here in this issue.

{
    "@context": ["https://w3id.org/webledger/v1","https://w3id.org/btcr/v0.1"]
        "id": "did:btcr:xg35-jzrx-qtyt-jqr",
        "Audit": [  
        {
            "chain": "bitcoin",
            "network": "testnet3",
            "txid": "be5be4b2c4e530b49af139a8448ae2ae8b5882f2e7f5c7908eca0268f72494e9",
            "txref": "txtest1:xg35-jzrx-qtyt-jqr",
            "blockhash": "0000000000000011fd70846401c79e3b04ba2f0b75c6d160cbaae71287a9c1b7",
            "blockHeight", "1354004",
            "transaction-index": "195",
            "transaction-output-index": "0",
            "created": "2018-07-16T22:45:25Z",
            "burn-fee": -0.05
            "bond-value": 1.3,
            "bond-address": "mooh9yq5aV4u5gSR9oRZGfYS9qbydBVLjA"
        }
    ]
}
ChristopherA commented 5 years ago

@peacekeeper What do you think?

peacekeeper commented 5 years ago

@ChristopherA I know during the BTCR hackathon I said that the Satoshi audit trail should be "resolution metadata" that is separate from the DID Document, and I still feel that's correct, but after reading the thread at https://github.com/WebOfTrustInfo/btcr-hackathon-2019/issues/4 as well as @msporny 's comment at https://github.com/WebOfTrustInfo/btcr-hackathon-2019/issues/18#issue-479104442 ("take that Satoshi Audit Trail and tack it on to your DID Document proof"), I'm not 100% convinced myself.

So I'd like to make this concept of a DID Resolution Result the main topic for tomorrow's DID call, to think this through:

https://docs.google.com/document/d/1qYBaXQMUoB86Alquu7WBtWOxsS8SMhp1fioYKEGCabE/

peacekeeper commented 5 years ago

The Universal Resolver's BTCR driver currently returns method metadata as follows, e.g. for did:btcr:xkrn-xz7q-q0mx-4cl:

{
    "inputScriptPubKey": "03479e1bde881c15edc82b7c4d0d04441c5e7f6dce4b703f43c5d5c12948df32d2",
    "continuationUri": "https://raw.githubusercontent.com/peacekeeper/self/master/ddo",
    "chain": "TESTNET",
    "blockHeight": 1202316,
    "transactionPosition": 80,
    "txoIndex": 0,
    "txid": {
        "chain": "TESTNET",
        "txid": "5310788c3f8c47d2e0336a4de7ecaceb52405699b571bd1254bf4580caf66950",
        "txoIndex": 0
    },
    "initialBlockHeight": 1156667,
    "initialTransactionPosition": 30,
    "initialTxoIndex": 0,
    "initialTxid": {
        "chain": "TESTNET",
        "txid": "b01a3498ff817def5017e0c17c9171c4e19cced1a6a63d67f617ac06fe5baf96",
        "txoIndex": 0
    },
    "spentInChainAndTxids": [{
            "chain": "TESTNET",
            "txid": "3a966c8b2254a73ee594498a55e5d6746f9e66df44730217a1ffe045f83b79a7",
            "txoIndex": 0
        },
        {
            "chain": "TESTNET",
            "txid": "06dff479edb2ad0bf4dc2d970518207f80673b47832f823317719fda900acddb",
            "txoIndex": 0
        },
        {
            "chain": "TESTNET",
            "txid": "dd0c39bc488b3e154f460920e6e6f1cf1b308736348d28dc2d126907e10e4800",
            "txoIndex": 0
        },
        {
            "chain": "TESTNET",
            "txid": "a8150d3d1e7e635314ca0bd2b8976aa5d98d46f7bd64dfc850969586afb2526e",
            "txoIndex": 0
        },
        {
            "chain": "TESTNET",
            "txid": "5310788c3f8c47d2e0336a4de7ecaceb52405699b571bd1254bf4580caf66950",
            "txoIndex": 0
        }
    ]
}

This seems quite similar to your structure, except for some different field names and objects and some missing parts. It shouldn't be hard to change this to be aligned.

Note that this structure also contains a list of tips that have been followed. OTOH it seems to be missing some of the information that you have in your structure, such as burn-fee, bond-value, bond-address.

ChristopherA commented 5 years ago

In #18 in regards to a P2P-oriented DID method @msporny said:

You verify the SatoshiAuditTrail2019 using that proof verification algorithm (get the transaction described by the proof, make sure it points back to the document you have, follow the UTXO stuff to discover any updates, etc.).

If we support this type of proof strategy, this puts a higher order requirement on the data formats in the audit trail metadata.

-- Christopher Allen