w3c-ccg / lds-merkle-proof-2019

A signature suite created in 2019 for doing Merkle Proofs
https://w3c-ccg.github.io/lds-merkle-proof-2019/
Other
4 stars 0 forks source link

Defining Blink Structure / Example Blinks #5

Open ghost opened 4 years ago

ghost commented 4 years ago

Separating this out into it's own ticket, regarding @msporny's comment here: https://github.com/w3c-dvcg/lds-merkle-proof-2019/issues/1#issuecomment-546074966

I've went ahead and drew up some Blink options across some of the more popular blockchains, with several options of doing them. I'm not sure if there's any other specific ones we'd like to see, let me know if there are. Most of what I've found were that they either follow a block/transaction model, only work with transactions, or had additional ways to reference the transaction (such as EPOCH:SLOT:ID for ADA). Indy did seem to be a bit of an exception with how they handle multiple "ledgers" (domain, pool, config) and reference a transaction (id, root hash, height).

Efficiency is another thing to care about too, some blockchain node API's might have better ways to pull in a transaction. For instance, maybe some node API's don't have a way to pull in a block by height.

My personal opinion, I do lean towards blink:<BLOCKCHAIN>:<SUBNETWORK><:OPTIONAL_BLOCK>:<TRANSACTION> for the typical blockchain setup since we don't necessarily need a block to pull in a transaction via hash. It also allows for consistency for the DLT's that don't have the concept of a block anyways.


Following these models for each one:

blink:<BLOCKCHAIN>:<SUBNETWORK>:<BLOCK>:<TRANSACTION> blink:<BLOCKCHAIN>:<SUBNETWORK>:<TRANSACTION>:<BLOCK> blink:<BLOCKCHAIN>:<SUBNETWORK><:OPTIONAL_BLOCK>:<TRANSACTION> blink:<BLOCKCHAIN>:<SUBNETWORK>:<BLOCK_HEIGHT>:<TRANSACTION>

Bitcoin:

Litecoin:

Ethereum:

EOS:

Stellar:

Cardano: Note: Has a concept of epoch's and slots that can be used to reference a block of transactions.

IOTA: Note: Not a blockchain. DAG where transactions build upon each other.

XRP:

Indy: NOTE: TransactionId could have multiple :'s of it's own based on transaction type (ex. EFMHM7uFSY1NwieV9bLMAa:1:b6bf7bc8d96f3ea9d132c83b3da8e7760e420138485657372db4d6a981d3fd9e) NOTE: Not all 'transactions' have a TransactionId, but they all appear to have a roothash/height.

Fabric: NOTE: couldn't find good examples online but it does appear that fabric follows the block:transaction model like most. Main thing that would different between this and a blink example like bitcoin would be the blockchain:network since it's a private blockchain. More than likely up to organizations to define the blink for themselves.

msporny commented 4 years ago

I've went ahead and drew up some Blink options across some of the more popular blockchains, with several options of doing them.

Really impressive work, @AnthonyRonning! I haven't had a chance to read through all the way yet, but this is going to be super helpful to ensure that blinks can support common blockchains. Are you interested in being a co-editor on the Blink spec? You've clearly done the legwork to ensure that the reasoning for the spec is solid.

ghost commented 4 years ago

@msporny Yeah! Haven't been one before but I'm definitely willing to spend more time on this (ensure best practices for referencing a block/transaction, pull in more examples, etc. ). Is there a spec for blink currently out there?

msporny commented 4 years ago

No, but I can put one together quickly, will let you know when that's done. I expect by the end of next week for a first draft.

ghost commented 4 years ago

Hey @msporny, just wondering if there's been an update on this? Didn't see anything on it yet. If not, I'm willing to draft something up over the next day or two.

ghost commented 4 years ago

@msporny, I spent a little bit getting something drafted up since Blockcerts plans on using it. https://www.blockcerts.org/blockchain-links/

I'm a bit unsure of how to proceed from here and getting it in the right location if there's W3C interest in it. I may end up emailing the CCG for guidance, even if the CCG isn't the best place for Blockchain Links as a specification. It's the only W3C group I'm apart of.

Let me know if there's interest in using this as a draft moving forward. I put you as an author on it, I'm not sure who else is behind this concept, but let me know if I should edit/remove that. Thanks!

msporny commented 4 years ago

Hey @msporny, just wondering if there's been an update on this?

Hey, total fail on my part on getting this done. Thankfully you got it done! Hooray! :)

I took a look at it, looks good to me. Yes, the W3C CCG is probably the best place to introduce the work item since it probably has the largest population of blockchain folks at W3C.

There is also an argument for doing this at IETF... so we might transition it there in time. For the time being, we don't have to worry about that. Thanks a ton for putting the document together @AnthonyRonning -- you rock! :)

ghost commented 4 years ago

Sounds good @msporny! Yeah no worries about the timing, it's slipped on my priority as well. Thank you for the guidance! I'll get that emailed to the CCG today.