Add mechanism to increase efficiency of reconnection process after upgrade
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- rust
調査の方向性
まず、参照されている再接続テストを permanent_error_backoff を 1 秒に設定して再実行し、その後、シナリオで説明されている do-not-call リスト、known_addresses、接続ランクの挙動を追跡します。この issue には複数のアプローチ候補が挙げられていますが、いずれも選択されておらず、ファイルも特定されていません。そのため、完了条件では、設計について maintainer の合意を得ることと、ノードの再起動後の再接続を確実に改善することが必要です。
索引モデルが issue の本文から書いたものです。
説明
In 1.6 and onward there is a case resulting in a higher-than-optimal time or number of attempts to reestablish a connection. This was found in testing:
The minor potential issue is timing in general - tests use fast block times and node-kill-timers, if I am not mistaken? If so, the backoff timers might be too long to allow the system to work reliably. What you may be running into is what I call the “upgrade problem”, since I expect the same scenario to potentially occur on an upgrade: When a node is killed/restarted, its node ID changes randomly as well as connections timing out. Here’s the scenario from Alice’s perspective where we go from Alice > Cecil to Cecil > Alice:
- Alice loses connection to Cecil.
- Alice fails to reconnect immediately while Cecil boots.
- Eventually, within the reconnect delay, Cecil boots up.
- Alice is in Cecil’s known_addresses, so Cecil connects to Alice.
- An incoming connection is set up, all is good.
- Alice connects to Cecil, notices the low connection rank, blocks Cecil’s socket address (for outgoing) for 10 minutes.
This is the “good” case, since the connection rank inverted, we were able to establish a connection quickly. However, what if Cecil goes down again after 1 minute and we flip the connection rank again, so that Alice > Cecil again?
- Alice loses the incoming connection from Cecil. It does not care, since it is an inbound connection.
- Cecil reboots, establishes a connection to Alice due to known_addresses.
- Both notice the low rank of the connection, but Alice learns of Cecil’s address.
- However, this time around, when learning Cecil’s address it is still on the do-not-call list.
- For another 9 minutes, we cannot establish a connection between these two nodes.
You can verify this by running the test again with permanent_error_backoff set to 1 or 5 seconds, I recommend doing that. Potential fixes:
- Remove entries from the do-not-call list if the addresses are given to us by Magic Mike. This is a potential security issue though, as we can never verify the connection between a NodeId and a SocketAddr. A clever attacker could cause a node to get itself firewalled from every good validator this way.
- Lower the permanent_error_backoff -- not great, since it increases reconnection spam.
- Persist the NodeId of a node across restarts. This is likely the best approach and what we had 3 years ago, but more work.
- Implement the gossip-less address syncing that I have in mind, to avoid having to have such long backoff timers.
- Ignore it, since it will only present itself in arbitrary testing situations (unless a node is in a crash loop).
The achilles heel of the system is the fact that we need to connect to unverified socket addresses. The original system used to sign SocketAddr, NodeId pairs for that reason.However, I encourage you to test with permanent_error_backoff set to 1 second to test this hypothesis at least.
- 主要言語
- Rust
- スター
- 397
- フォーク
- 224
- 平均マージ
- 15日 11時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
casper-network/casper-node のほかの issue
-
consensus networking
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
casper-network/casper-node#1922 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
casper-network/casper-node#5449 ·
-
Proposal for a New Build Numbering Scheme再び着手できるかも @sacherjj が 443 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
casper-network/casper-node#5296 · コメント 2 件 · 担当者 1 名 ·
-
Support host-side `keccak256` hashing再び着手できるかも @igor-casper が 461 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
casper-network/casper-node#5273 · コメント 2 件 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
casper-network/casper-node#5259 · コメント 5 件 ·
casper-network/casper-node の issue をすべて見る
似ている issue
-
area:desktop priority:p2 type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
fritzprix/libr-agent#2165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:ecosystem bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Chelis-Lang/chelis#3942 ·
メンテナーはふだん 1 日以内に返信