--- reference: https://spec.polkadot.network/chap-overview --- # 1. Overview Polkadot Protocol 將不同 class 的 Host 做區分,不同 class 的不同之處在於 trust roots 或是與網路互動的方式 (主動或是被動)。 ## 1.1 Light Client 輕客戶端 Protocol 中的被動參與者 - 被設計來運行在資源受限的環境中 (行動裝置, 瀏覽器, 甚至鏈上) - 主要的目的是: - follow the chain - 向 full node 查詢最近 state 的特定信息,然後加上 extrinsics (txs) > extrinsics: type of transactions(txs) > client(使用者) 也會提交各種類型的交易(extrinsics) > [source](https://wiki.polkadot.network/docs/learn-transactions) - 不會維護 full state ,只有 - 向 full node 查詢鏈上最新的 state - 以 trustless(去信任化) 的方式驗證 responses 的正確性 人話: 輕量化的設計可以讓使用者透過手機,網頁追蹤鏈上的活動,也可以提交交易(swap, bridge, etc.) > PBA [More info about Light Client](https://spec.polkadot.network/sect-lightclient) ## 1.2 Full Node 全節點 大部分時間也是 Protocol 中的被動參與者 - 藉由接收與驗證所有區塊來 follow the chain(追蹤鏈) - 藉由執行區塊中的 extrincs 來維護區塊鏈上的 full state > extrinsic: type of txs 在 Consensus Mechanism(共識機制) 的限制: - 只 follow chain 不 produce 區塊 (所以是被動的角色) ### Functional requirements 1. 需要用官方的 genesis(創世) state 去自動增加 state storage ([detail](https://spec.polkadot.network/id-cryptography-encoding#section-genesis)) 2. 需要隨時維護一組約50個 avtive peers (想成節點?)。新的 peers 可以用 discover protocol 找到 > [peer ~ nodeID](https://spec.polkadot.network/chap-networking#id-node-identities) > [divocer protocol](https://spec.polkadot.network/chap-networking#sect-network-bootstrap) 3. 對於每個 active peers 都開放並維護各種所需的 stream > [stream](https://spec.polkadot.network/chap-networking#sect-protocols-substreams) 4. 對每個 peers 發送區塊請求以接收鏈中的所有區塊並執行每個區塊。 > [block request](https://spec.polkadot.network/chap-networking#sect-msg-block-request) 5. 交換 neighbor packets > [neighbor packets](https://spec.polkadot.network/chap-networking#sect-grandpa-neighbor-msg) ## 1.3 Authoring Node 編寫節點 涵蓋所有 Full Node 的功能。但不像 Full Node 那樣被動,而是主動參與者: 製造區塊以及在 GRANDPA 中投票 ### Functional requirements 1. 驗證 Host's session key 是否包含在目前 Epoch's authority set ([Section 3.3.1.](https://spec.polkadot.network/chap-sync#sect-authority-set)) 2. 執行 [BABE](/MFpaNUbKToml2p-c3bRpsw#5-Block-Production) 抽籤並等待下一個分配的 slot 以產生一個區塊。 3. 將產生的區塊傳播給所有連接的 peers 4. 執行 catch-up protocol ([Session 6.6.1.](https://spec.polkadot.network/sect-finality#sect-grandpa-catchup)) 確認 node 正在參與的是當前的 round 而不是之前的 round 5. 執行 GRANDPA rounds protocol ([Chapter 6](https://spec.polkadot.network/sect-finality)) ## 1.4 Relaying Node 中繼節點 涵蓋所有 Authoring Node 的功能,參與 availability(可用性) 跟 validity(有效性) 的過程以處理新的 Parachain(平行鏈)區塊 詳細在 [info](https://spec.polkadot.network/chapter-anv) ## 小結 - 功能: Relaying node $\ge$ Authoring node $\ge$ Full node - 被動: Light Client, Full node - 主動: Relaying node, Authoring node --- [Source Link](https://spec.polkadot.network/chap-overview)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up