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

Tapyrus DID Specification #3

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

nakajo2011
Copy link
Contributor

No description provided.

Updated DID Document to latest spec.
Copy link
Contributor

@azuchi azuchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document should be written in English, and the Japanese translation should be in the supporting documents in tip-xxx.

tip-xxxx.md Outdated

| | description | possible type | # ob Bits used | values |
|----|----------------------------------------|----|----|----|
| Network ID | Identifier of Tapyrus Network | Uint32 | 32 | 0 to 4294967296 <br/> ex)Tapyrus API Network = 1 |
Copy link
Contributor

@Yamaguchi Yamaguchi Jul 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4294967295?

tip-xxxx.md Outdated Show resolved Hide resolved
tip-xxxx.md Outdated Show resolved Hide resolved
tip-xxxx.md Outdated
tprs-identifier = TxRef encoded transaction id
```

Example) When NNetwork ID=1, Tapyrus chain上のtxid 67c0ee676221d9e0e08b98a55a8bf8add9cba854f13dda393e38ffa1b982b833
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Example) When NNetwork ID=1, Tapyrus chain上のtxid 67c0ee676221d9e0e08b98a55a8bf8add9cba854f13dda393e38ffa1b982b833
Example) When Network ID=1, Tapyrus chain上のtxid 67c0ee676221d9e0e08b98a55a8bf8add9cba854f13dda393e38ffa1b982b833

Copy link
Contributor Author

@nakajo2011 nakajo2011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed Network ID maximum value.

tip-xxxx.md Outdated Show resolved Hide resolved

## Abstract

This document describes the did numbering method for using Tapyrus as a Verifiable Data Registry.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This document describes the did numbering method for using Tapyrus as a Verifiable Data Registry.
This document describes the DID method for using Tapyrus as a Verifiable Data Registry.


### 2. Terminology

TBD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please writing up.


* Table 3-1. Parameters for TxRef

| | description | possible type | # ob Bits used | values |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| | description | possible type | # ob Bits used | values |
| | description | possible type | # of Bits used | values |


| | description | possible type | # ob Bits used | values |
|----|----------------------------------------|----|----|--------------------------------------------------|
| Network ID | Identifier of Tapyrus Network | Uint32 | 32 | 0 to 4294967295 <br/> ex)Tapyrus API Network = 1 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tapyrus API Network ID is 15215628, not 1.

| Version | future use | Uint8 | 1 | only 0 |
| Block Height | The Block Height including Tx | Uint32 | 24 | Block 0 to Block 16777215 |
| Transaction Index | Position in block of Tx containing DID | Uint16 | 15 | Tx 0 to Tx 32767 |
| Output Index | Position of Tx output as DID | Uint16 | 15 | Tx 0 to Tx 32767 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tx 0 to Tx 32767 value is Transaction Index value.


First, generate an array of 5bit numbers in the following order.

1. Cut out 35bits of Network ID + Reserved Bit by lower 5bits
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? Does it mean using the lower 5 of 35 bits? If so, information will be missing.


**Checksum**

Finally, [BIP-0350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki), Bech32m format checksum is given. The following 6 characters are obtained as Checksum.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In bech32m, you need to define human readable part (HRP).

Example) No Output Index

VALID:
gqqqqqqx6t8q2qqllpff-y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In bech32m, - does not defined.

@@ -0,0 +1,368 @@
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After all, I thought it would be better without japanese for the following reasons.

  • If the content differs between English and Japanese, there is a risk that specifications will not be accurately communicated.
  • Updating the TIP requires updating multiple language documents.
  • Reviewing both English and Japanese is a burden on the reviewer.


```
tprs-did = "did:tprs:" tprs-identifier
[ ";" did-service ] [ "/" did-path ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W3C defines DID syntax, refs: https://w3c.github.io/did-core/#did-syntax
The syntax references RFC3986 and RFC5234.
; means a comment. Can we use this for the did-service?

| Network ID | 1 | 00000000<br/>00000000<br/>00000000<br/>00000001<br/> | 32 | (ni31, ni30, ni29, ni28, ni27) = (0, 0, 0, 0, 0)<br/>(ni26, ni25, ni24, ni23, ni22) = (0, 0, 0, 0, 0)<br/>(ni21, ni20, ni19, ni18, ni17) = (0, 0, 0, 0, 0)<br/>(ni16, ni15, ni14, ni13, ni12) = (0, 0, 0, 0, 0)<br/>(ni11, ni10, ni09, ni08, ni07) = (0, 0, 0, 0, 0)<br/>(ni06, ni05, ni04, ni03, ni02) = (0, 0, 0, 0, 0)<br/>(ni01, ni00) = (0, 1) |
| Reserved Bit | 0 | 00000000 | 3 | (rb02, rb01, rb00) = (0, 0, 0) |
| Version | 0 | 00000000 | 1 | (vr00) = (0) |
| Block height | 456789 | 00000110<br/>11111000<br/>01010101<br/> | 24 | (bh23, bh22, bh21, bh20) = (0, 0, 0, 0)<br/>(bh19, bh18, bh17, bh16, bh15) = (0, 1, 1, 0, 1)<br/>(bh14, bh13, bh12, bh11, bh10) = (1, 1, 1, 1, 0)<br/>(bh09, bh08, bh07, bh06, bh05) = (0. 0. 0. 1. 0)<br/>(bh04, bh03, bh02, bh01, bh00) = (1, 0, 1, 0, 1)<br/> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Block height | 456789 | 00000110<br/>11111000<br/>01010101<br/> | 24 | (bh23, bh22, bh21, bh20) = (0, 0, 0, 0)<br/>(bh19, bh18, bh17, bh16, bh15) = (0, 1, 1, 0, 1)<br/>(bh14, bh13, bh12, bh11, bh10) = (1, 1, 1, 1, 0)<br/>(bh09, bh08, bh07, bh06, bh05) = (0. 0. 0. 1. 0)<br/>(bh04, bh03, bh02, bh01, bh00) = (1, 0, 1, 0, 1)<br/> |
| Block height | 456789 | 00000110<br/>11111000<br/>01010101<br/> | 24 | (bh23, bh22, bh21, bh20) = (0, 0, 0, 0)<br/>(bh19, bh18, bh17, bh16, bh15) = (0, 1, 1, 0, 1)<br/>(bh14, bh13, bh12, bh11, bh10) = (1, 1, 1, 1, 0)<br/>(bh09, bh08, bh07, bh06, bh05) = (0, 0, 0, 1, 0)<br/>(bh04, bh03, bh02, bh01, bh00) = (1, 0, 1, 0, 1)<br/> |

| Block height | 456789 | 00000110<br/>11111000<br/>01010101<br/> | 24 | (bh23, bh22, bh21, bh20) = (0, 0, 0, 0)<br/>(bh19, bh18, bh17, bh16, bh15) = (0, 1, 1, 0, 1)<br/>(bh14, bh13, bh12, bh11, bh10) = (1, 1, 1, 1, 0)<br/>(bh09, bh08, bh07, bh06, bh05) = (0. 0. 0. 1. 0)<br/>(bh04, bh03, bh02, bh01, bh00) = (1, 0, 1, 0, 1)<br/> |
| Transaction index | 1234 | 00000100<br/>11010010 | 15 | (ti14, ti13, ti12, ti11, ti10) = (0, 0, 0, 0, 1)<br/>(ti09, ti08, ti07, ti06, ti05) = (0, 0, 1, 1, 0)<br/>(ti04, ti03, ti02, ti01, ti00) = (1, 0, 0, 1, 0)<br/> |
| Output index | 0 | omit | omit | omit |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encoding charの項目が boldなやつとそうでないやつの違いはなにかありますか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants