テクニカルリファレンス - NEM 和訳ダイジェスト

Takanobu ()
[h=1]NEM Technical Referenceの和訳はこちらにまとめられています[/h] http://nemmanual.net/NEM_Technical_reference_JA/



以下、古い内容です。



とりあえず、トピ立てました。やり切るかどうかはわかりませんよ。
今ストリーミングサーバ開発してるようなマルチプログラマですのであしからず。

原本はこちら
https://www.nem.io/NEM_techRef.pdf

1 イントロダクション

2 アカウントとアドレス
2.1 アカウントの状態
2.2 NEM アドレス
2.3 公開鍵をアドレスに変換する
2.4 意図的なアドレスの衝突

3 暗号法
3.1 暗号鍵と秘密鍵
3.2 署名と検証
3.3 メッセージの暗号化と復号化

4 トランザクション
4.1 送金トランザクション
4.2 Importance transfer transactions
4.2.1 有効化
4.2.2 無効化
4.3 Multisig related transaction types
4.3.1 Aggregate modification transactions (multisig modification)
4.3.2 マルチシグ署名トランザクション
4.3.3 マルチシグトランザクション
4.4 確定されていないトランザクション (スパムフィルター)

5 ブロックとブロックチェーン
5.1 ブロックの難易度
5.2 ブロックの得点
5.3 ブロックの生成
5.4 ブロックチェーンの同期

6 ノードにおける評価システム
6.1 Node interactions
6.2 Local trust value
6.3 Aggregating local trust values
6.4 Enhancing the algorithm
6.5 Benefits of the reputation system

7 プルーフ・オブ・インポータンス(Proof-of-Importance)
7.1 Eligibility for Entering the Importance Calculation
7.2 The outlink matrix
7.3 NCDawareRank
7.4 Clustering the transaction graph
7.5 Calculating Importance Scores
7.6 Resistance to Manipulation
7.6.1 Sybil Attack
7.6.2 Loop Attack
7.7 Nothing-at-Stake Problem
7.8 Comparing importance to stake

8 時刻同期
8.1 Gathering samples
8.2 Applying filters to remove bad data
8.3 Calculation of the effective offset
8.4 Coupling and threshold

9 ネットワーク
9.1 ノードプロトコル
9.2 ノード設定
9.3 Node Discovery
9.3.1 Announcement
9.3.2 Refresh
9.4 Node Selection

Takanobu ()
1.イントロダクション


He’d say hello and introduce himself, but most of the cats turned a deaf ear,
pretending they couldn’t hear him, or stare right through him.
- 村上春樹

NEM、基本的にはブロックチェーン技術を利用した暗号通貨です。
NEMのブロックチェーンは既存のブロックチェーン技術に改良が加えられています。
それは他のブロックチェーン(例えばビットコイン)やネットワーク理論での学術的な研究成果を統合したもの です。
暗号通貨の発展においてNEMがまず貢献できることは、プルーフ・オブ・インポータンス(PoI)と呼ばれ る新しい合意形成の仕組みです。
プルーフ・オブ・ワーク(PoW)と異なり、それは環境的に持続可能であり、将来にわたっても大きな計算機のリソー スを必要としません。
PoIは、プルーフ・オブ・ステーク(PoS)のアカウントの残高のみに依存するという点を除けば、PoS に似ています。
PoIは、経済全体に肯定的と見られるその他の要素も取込みます。
そうすることで、活動的な参加者に非活動的な参加者の費用で報酬を与え、
PoSの特徴である豊かな人がより豊かになってしまうことを防ぎます。
NEMの目標はセキュリティと信用の必要ない計算機構として注目されている暗号通貨のエコシステムの基盤となることです。
NEMはマルチシグトランザクションと暗号化メッセージを標準機能としてサポートする形で始まりました。
加えて、ピア・ツー・ピア(P2P)NEMネットワークは、悪意あるノードの影響を特定し最小化するEigentrust++に修正を加えたものを実装しています。
NEMは進化途中で始まったばかりです。これから起こる出来事にご期待ください。

NEM, in its most basic form, is a crypto currency that is built on block chain
technology. The NEM block chain is an improvement on existing block
chain technologies. It integrates concepts from other cryptocurrencies (e.g.
Bitcoin) and academic research in network theory.
NEM’s primary contribution to the crypto currency landscape is a new consensus mechanism
called Proof of Importance (PoI). Unlike Proof of Work (PoW), it is environmentally
sustainable and does not require large scale computing resources in perpetuity. PoI
is similar to Proof of Stake (PoS) except that it is not solely derived from the size of an
account’s balance. It incorporates other behaviors that are believed to be positive for the
holistic economy. In this way, it attempts to reward active economy participants at the
expense of inactive ones and dampens the rich getting richer effect that is inherent to
PoS.
NEM’s vision is to be the foundation of a vibrant crypto currency ecosystem that
emphasizes security and trustless computing. NEM was launched with built-in support
for multisig transactions and encrypted messages. Additionally, the peer-to-peer (P2P)
NEM network implements a modified version of Eigentrust++ to identify and minimize
the impact of malicious nodes.
NEM is evolving and this is just the beginning. Stay tuned for more things to come.

LHJ ()
Takanobu さん、GoodJob !
LHJさんも協力しますね。私は英語苦手ですが、頑張ります。数式のところは何卒、ご協力を!

Takanobu ()
2 アカウントとアドレス


No wind serves him who addresses his voyage to no certain port.
- ミシェル・ド・モンテーニュ

NEMはすべてのトランザクションの機密性、真正性、否認不可性を保証するために、楕円曲線暗号を用います。
アカウントはそれぞれプライベートとパブリックのEd25519キーペアを持ち(3章:暗号法)、
トランザクションが確定されるたびに更新されていく情報と紐づけられています。
アカウントはEd25519 公開鍵の不可逆変換より生成されるNEMアドレスによって識別されます。

NEM uses elliptic curve cryptography to ensure confidentiality, authenticity
and non-repudiability of all transactions. Each account is a private+public
Ed25519 keypair (section 3: Cryptography) and is associated with a mutable
state that is updated when transactions are accepted by the network. Accounts
are identified by NEM addresses, which are derived in part from one way mutations
of Ed25519 public keys.

LHJ ()
9 ネットワーク

NEM のネットワークは、NIS ノードで構成されます。各ノードは、1つのプライマリーアカウントで構成され、そのノードで認証されます。
もし、アタッカーがノードのIPアドレスを偽装できても秘密鍵を持ってなければ、ノードを偽装したアタッカ ーから防止されることを意味する。

各 NIS ノードは以下のコンフィグレーション・セッティングを備えている。

・nis,nodeLimit:ローカルノードや複数のノードが nem ネットワークにブロードキャストする。
・nis.timeSyncNodeLimit:ローカルノードを含め複数のノードは、nem のP2P時計サービスと時刻同期を使う(詳しくはセクション8の時刻同期を参照)

一般には、より時刻同期をスムーズに行うために、nis.timeSyncNodeLimit の方が nis,nodeLimit よりも重要(larger)となるべきでである。
ただ、これはあまり重要(価値)は高くない。なぜなら、時刻同期の部分は相対的に小さな転送データだからで ある。

The NEM network is comprised of NIS nodes. Each node is associated with a single primary account, which is used to authenticate responses by that node.
This prevents an attacker from impersonating a node without having its private key even if he can spoof the node’s IP address.

Each NIS node has the following configuration settings:

•nis.nodeLimit - the number of other nodes to which the local node should broad-cast information
•nis.timeSyncNodeLimit - the number of other nodes the local node uses to syn-chronize its clock section 8: Time synchronization

Typically,nis.timeSyncNodeLimit should be larger than nis.nodeLimit in order to allow better time smoothing.This isn't too expensive because the data transferred as part of time synchronization is relatively small.

LHJ ()
9.1 ノードプロトコル

NIS ノードは、デフォルトでは、NIS 所有者のバイナリ・フォーマットを使いながら、NIS ノードとコミュニケーションをする。
このフォーマット(低通信のネットワーク帯域において)は、コンパクトなリクエストであり、シリアリゼーション( 調整)とデシリアリゼーション(非調整)に係るコストを減らすことができるプロセスである。
事実、すべての NIS API は、NEM の専用バイナリフォーマットだけでなく JSON によるリクエスト(エンコード)もサポートしている。

1. ローカルノードはリモートノードに対して、リクエストデータとランダムな 64バイトのペイロード(データ本体)を送る。
2. リモードノードは受け取ったランダムなペイロードを、ローカルノードに対して、リクエストされたデータと一 緒に署名(シグネチャ)を送る。
3. ランダムなペイロードを受け取ったリモートノードが確認できた場合、ローカルノードはその署名を確認し、レ スポンスデータのみを保持する。

NIS nodes communicate amongst themselves using a proprietary binary format by default.
This format minimizes network bandwidth by compacting requests and processing by reducing the cost of serialization and deserialization.
In fact, all NIS APIs support requests encoded in either the NEM proprietary binary format or JSON.

In order to prevent impersonation-based attacks, NIS nodes engage in a two part hand-shake when communicating:

1.The local node sends the request data and a random 64-byte payload to the remote node.
2.The remote node signs the random payload and sends the signature along with the requested response data back to the local node.
3.The local node checks the signature and only processes the response data if it can verify that the remote node signed the random payload.

Takanobu ()
2.1 アカウントの情報

アカウントに紐づけられた情報は以下の項目を持ちます。
・アカウント残高
・収穫したブロック数(5.3:ブロックの生成 参照)
・そのアカウントが参照された最初のトランザクション行(訳注:height -> 仮に行としました。)
・マルチシグアカウントリストと署名者リスト(4.3: Multisig related transaction types 参照)
• 委任されたアカウント情報 (4.2: Importance transfer transactions 参照)
・重要度と NCD 対応順位 (7: Proof-of-Importance 参照)
・利権残高 (PoI や NEM にとっても重要) (訳注:vested -> 利益を得る権利ということで仮に利権としました)

NEMネットワークの通貨をXEMと呼びます。すべてのアカウントのXEM残高はvestedとunvestedに分割されます。
アカウントがXEMを受け取った時、それはunvestedの残高に加えられます。
アカウントがXEMを送金する場合、XEMはvestedとunvestedの比率を維持するために、両方の残高が減額します。
加えて、1440ブロックごとにごとにunvested残高の10分の1がvested残高に移動します。
NEMの一番最初からあった全てのアカウントは全てvested残高です。

The state associated with each account includes the following items:
• account balance
• number of harvested blocks (see subsection 5.3: Block creation)
• height of the first transaction that referenced the account
• list of multisig accounts and list of cosignatories (see subsection 4.3: Multisig related transaction types)
• information about delegated account status (see subsection 4.2: Importance transfer transactions)
• importance and NCD aware rank (see section 7: Proof-of-Importance)
• vested balance (crucial for PoI and NEM itself)
The underlying crypto currency of the NEM network is called XEM. Each account’s
XEM balance is split into two parts: vested and unvested.
Whenever an account receives XEM, the new XEM are added to the account’s unvested
balance. When an account sends XEM, XEMs are taken from both the vested and the
unvested balance, to retain the vested to unvested ratio1
. Additionally, every 1440 blocks,
1/10 of the unvested balance is moved to the vested part
All accounts in the nemesis block2 are fully vested.

Takanobu ()
2.2 NEM アドレス

NEMアドレスは以下の3要素を含む32進数の文字列です。
・ネットワークID
・アカウント公開鍵のハッシュ値(160ビット)
・チェックサム(4バイト)

チェックサムによりアドレスの打ち間違いを早期に発見できます。
これにより、トランザクションを実行していないアドレスに対してもXEMを送信することが可能です。
もし、誰も秘密鍵を知らないアカウントにXEMを送信した場合、そのXEMは永久に失われます。

A NEM address is a base-323 encoded triplet consisting of:
• network byte
• 160-bit hash of the account’s public key • 4 byte checksum
The checksum allows for quick recognition of mistyped addresses. It is possible to send XEM to any valid address even if the address has not previously participated in any
transaction. If nobody owns the private key of the account to which the XEM is sent, the XEM is most likely lost forever.

Takanobu ()
2.3 公開鍵からアドレスへの変換

公開鍵からアドレスへ変換するために、以下のような処理が行われます。

以下URL参照

【NEM/XEM】公開鍵からNEMのアドレスを作成する
https://tadajam.katari.be/DybkrUq3

In order to convert a public key to an address, the following steps are performed:
1. Perform 256-bit Sha3 on the public key
2. Perform 160-bit Ripemd of hash resulting from step 1.
3. Prepend version byte to Ripemd hash (either 0x68 or 0x98)
4. Perform 256-bit Sha3 on the result, take the first four bytes as a checksum 5. Concatenate output of step 3 and the checksum from step 4
6. Encode result using base32
Example:
public key
X: deb73ed7d0334e983701feba4599a37fb62e862e45368525b8d9fb9ab80aa57e Y: 169318abc3e5b002059a396d4cf1c3d35ba022c675b15fb1c4943f7662eef268 Z: a90573bd221a3ae33fec5d4efc4fa137897a40347eeafe87bee5d67ae5b4f725
compressed public key:
c5247738c3a510fb6c11413331d8a47764f6e78ffcdb02b6878d5dd3b77f38ed
sha3-256:
70c9dcf696b2ad92dbb9b52ceb33ec0eda5bfdb7052df4914c0919caddb9dfcf
ripemd: 1f142c5ea4853063ed6dc3c13aaa8257cd7daf11
prepend version: 681f142c5ea4853063ed6dc3c13aaa8257cd7daf11
sha3-256 of above:
09132a5ea90ab7fa077847a699b4199691b4130f66876254eadd70ae459dbb53
4-byte checksum: 09132a5e (first 4 bytes of the above)
binary address: 681f142c5ea4853063ed6dc3c13aaa8257cd7daf1109132a5e
base-32 encoding: NAPRILC6USCTAY7NNXB4COVKQJL427NPCEERGKS6
pretty-print: NAPRIL-C6USCT-AY7NNX-B4COVK-QJL427-NPCEER-GKS6

Takanobu ()
ありがとうございます。
よろしくお願いしますー。

LHJ ()
9 ネットワークから翻訳しますね。逆からやった方が2度手間になりませんし、後で確認やマージもしやすいでしょう。

Takanobu ()
三日坊主ですみません。
お手伝いさせていただきます。

Tanugami ()
翻訳作業ありがとうございます。
NANO Walletの和訳対応していますけど、固有名詞に関してはこちらのリファレンス翻訳後の名詞を採用していく方針にしたほうが良さそうですね。
Ex: )重要度移譲トランザクション 等

今は一応 インポータンストランスファートランザクション と思いっきりセンスのない名前にしております。
(とりあえず先日him0氏がプルリクエスト出してくれていますが後々修正していこうと思います)