-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fixed reconnection issue in the dev cluster with AWS cluster #1915
Conversation
…It also fixes the issue of not reconnecting to the reserved nodes when the reserved node is restarted and a new IP. - The change moves the reconnection handling into the `PeerReport` behavior. It removes ping-ponging reserved peers between the primary behavior and the `PeerReport` behavior and encapsulates the logic inside the `PeerReport`. Also, it eliminates the timer and replaces it with the queue of reconnections, reducing noise in logs(before, we had much more trash errors). - Added logs for cases when the dial fails. They are very helpful to debug issues with connection. - Simplified initialization of the `ConnectionTracker` and `FuelAuthenticated`. It allows the reuse of libp2p built-in connections builder. - Removed the usage of the Mplex since it doesn't have a backpressure mechanism. Now we use Yamux by default. It is breaking the change since nodes with the old codebase can't connect to new nodes. - Propagated `max_concurrent_streams` for yamux.
.with_tcp( | ||
tcp_config, | ||
transport_function, | ||
libp2p::yamux::Config::default, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change: We don't support Mplex anymore.
if instant.elapsed() > Duration::from_secs(HEALTH_CHECK_INTERVAL_IN_SECONDS) { | ||
let peer_id = *peer_id; | ||
self.reserved_nodes_to_connect.pop_front(); | ||
let multiaddrs = self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual fix for the main reconnection problem that I faced with the dev cluster. The initial DNS address was replaced with a real IP, but when the sentry crashed, the IP was another one. Using initial multiaddrs here allows you to reconnect and get a new IP again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably have a comment somewhere here explaining this.
…ssue' into feature/fixed-p2p-reconnection-issue
## Version v0.28.0 ### Changed - [#1934](#1934): Updated benchmark for the `aloc` opcode to be `DependentCost`. Updated `vm_initialization` benchmark to exclude growing of memory(It is handled by VM reuse). - [#1916](#1916): Speed up synchronisation of the blocks for the `fuel-core-sync` service. - [#1888](#1888): optimization: Reuse VM memory across executions. #### Breaking - [#1934](#1934): Changed `GasCosts` endpoint to return `DependentCost` for the `aloc` opcode via `alocDependentCost`. - [#1934](#1934): Updated default gas costs for the local testnet configuration. All opcodes became cheaper. - [#1924](#1924): `dry_run_opt` has new `gas_price: Option<u64>` argument - [#1888](#1888): Upgraded `fuel-vm` to `0.51.0`. See [release](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.51.0) for more information. ### Added - [#1939](#1939): Added API functions to open a RocksDB in different modes. - [#1929](#1929): Added support of customization of the state transition version in the `ChainConfig`. ### Removed - [#1913](#1913): Removed dead code from the project. ### Fixed - [#1921](#1921): Fixed unstable `gossipsub_broadcast_tx_with_accept` test. - [#1915](#1915): Fixed reconnection issue in the dev cluster with AWS cluster. - [#1914](#1914): Fixed halting of the node during synchronization in PoA service. ## What's Changed * Removed dead code by @xgreenx in #1913 * Added backward and forward compatibility integration tests for forkless upgrades by @xgreenx in #1895 * Fixed halting of the node in rare conditions by @xgreenx in #1914 * Weekly `cargo update` by @github-actions in #1928 * Fixed logging of the WASM executor by @xgreenx in #1930 * Added support of customization of the state transition version in the `ChainConfig` by @xgreenx in #1929 * Document wasm toolchain installation, add rust-toolchain.toml by @Dentosal in #1932 * Add optional `gas_price` argument to `dry_run_opt` by @hal3e in #1924 * Reuse VM memory across executions by @Dentosal in #1888 * Fixed reconnection issue in the dev cluster with AWS cluster by @xgreenx in #1915 * Speeds up synchronisation of the blocks for the `fuel-core-sync` service by @xgreenx in #1916 * Fixed unstable `gossipsub_broadcast_tx_with_accept` test by @xgreenx in #1921 * Added API functions to open a RocksDB in different modes by @xgreenx in #1939 * Use `DependentCost` for `aloc` opcode by @xgreenx in #1934 ## New Contributors * @hal3e made their first contribution in #1924 **Full Changelog**: v0.27.0...v0.28.0
## Version v0.28.0 ### Changed - [#1934](FuelLabs/fuel-core#1934): Updated benchmark for the `aloc` opcode to be `DependentCost`. Updated `vm_initialization` benchmark to exclude growing of memory(It is handled by VM reuse). - [#1916](FuelLabs/fuel-core#1916): Speed up synchronisation of the blocks for the `fuel-core-sync` service. - [#1888](FuelLabs/fuel-core#1888): optimization: Reuse VM memory across executions. #### Breaking - [#1934](FuelLabs/fuel-core#1934): Changed `GasCosts` endpoint to return `DependentCost` for the `aloc` opcode via `alocDependentCost`. - [#1934](FuelLabs/fuel-core#1934): Updated default gas costs for the local testnet configuration. All opcodes became cheaper. - [#1924](FuelLabs/fuel-core#1924): `dry_run_opt` has new `gas_price: Option<u64>` argument - [#1888](FuelLabs/fuel-core#1888): Upgraded `fuel-vm` to `0.51.0`. See [release](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.51.0) for more information. ### Added - [#1939](FuelLabs/fuel-core#1939): Added API functions to open a RocksDB in different modes. - [#1929](FuelLabs/fuel-core#1929): Added support of customization of the state transition version in the `ChainConfig`. ### Removed - [#1913](FuelLabs/fuel-core#1913): Removed dead code from the project. ### Fixed - [#1921](FuelLabs/fuel-core#1921): Fixed unstable `gossipsub_broadcast_tx_with_accept` test. - [#1915](FuelLabs/fuel-core#1915): Fixed reconnection issue in the dev cluster with AWS cluster. - [#1914](FuelLabs/fuel-core#1914): Fixed halting of the node during synchronization in PoA service. ## What's Changed * Removed dead code by @xgreenx in FuelLabs/fuel-core#1913 * Added backward and forward compatibility integration tests for forkless upgrades by @xgreenx in FuelLabs/fuel-core#1895 * Fixed halting of the node in rare conditions by @xgreenx in FuelLabs/fuel-core#1914 * Weekly `cargo update` by @github-actions in FuelLabs/fuel-core#1928 * Fixed logging of the WASM executor by @xgreenx in FuelLabs/fuel-core#1930 * Added support of customization of the state transition version in the `ChainConfig` by @xgreenx in FuelLabs/fuel-core#1929 * Document wasm toolchain installation, add rust-toolchain.toml by @Dentosal in FuelLabs/fuel-core#1932 * Add optional `gas_price` argument to `dry_run_opt` by @hal3e in FuelLabs/fuel-core#1924 * Reuse VM memory across executions by @Dentosal in FuelLabs/fuel-core#1888 * Fixed reconnection issue in the dev cluster with AWS cluster by @xgreenx in FuelLabs/fuel-core#1915 * Speeds up synchronisation of the blocks for the `fuel-core-sync` service by @xgreenx in FuelLabs/fuel-core#1916 * Fixed unstable `gossipsub_broadcast_tx_with_accept` test by @xgreenx in FuelLabs/fuel-core#1921 * Added API functions to open a RocksDB in different modes by @xgreenx in FuelLabs/fuel-core#1939 * Use `DependentCost` for `aloc` opcode by @xgreenx in FuelLabs/fuel-core#1934 ## New Contributors * @hal3e made their first contribution in FuelLabs/fuel-core#1924 **Full Changelog**: FuelLabs/fuel-core@v0.27.0...v0.28.0
Closes #1592
This change improves and simplifies some aspects of the P2P service. It also fixes the issue of not reconnecting to the reserved nodes when the reserved node is restarted and got new IP.
PeerReport
behavior. It removes ping-ponging reserved peers between the primary behavior and thePeerReport
behavior and encapsulates the logic inside thePeerReport
. Also, it eliminates the timer and replaces it with the queue of reconnections, reducing noise in logs(before, we had much more trash errors).ConnectionTracker
andFuelAuthenticated
. It allows the reuse of libp2p built-in connections builder.max_concurrent_streams
for request-response protocol.Checklist
Before requesting review