-
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
Added backward and forward compatibility integration tests for forkless upgrades #1895
Conversation
const TIMEOUT: u64 = 20; | ||
let result = | ||
tokio::time::timeout(tokio::time::Duration::from_secs(TIMEOUT), channel) | ||
.await; | ||
|
||
if result.is_err() { | ||
tracing::error!( | ||
"The previous block processing \ | ||
was not finished for {TIMEOUT} seconds." | ||
); | ||
return Err(Error::PreviousBlockProcessingNotFinished) | ||
} |
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.
Just added this to catch this problem in tests without debugging
crates/services/p2p/src/service.rs
Outdated
@@ -89,8 +89,6 @@ pub type Service<V> = ServiceRunner<UninitializedTask<V, SharedState>>; | |||
enum TaskRequest { | |||
// Broadcast requests to p2p network | |||
BroadcastTransaction(Arc<Transaction>), | |||
// Request to get one-off data from p2p network | |||
GetPeerIds(oneshot::Sender<Vec<PeerId>>), |
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.
It is not used, so I removed it=)
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.
it would be cleaner to make this kind of change in a separate PR, as it's totally unrelated to backwards compatibility testing right?
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.
…uel-core 0.26.0`
…ration-tests-forkless-upgrades
…ration-tests-forkless-upgrades
- command: test | ||
args: --manifest-path version-compatibility/Cargo.toml --workspace | ||
- command: check | ||
args: --manifest-path version-compatibility/Cargo.toml --workspace && cargo test --manifest-path version-compatibility/Cargo.toml --workspace |
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.
Curious why you stuck this into a single command? Feels weird calling cargo
in part of the args
.
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.
Added a comment
|
||
## Adding new test | ||
|
||
We need to add a new backward compatibility test for each new release. To add tests, we need to duplicate tests that are using the latest `fuel-core` and replace usage of the latest crate with a new release. |
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.
Is there anything enforcing that we do this?
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.
Nope, and I don't know who to enforce it=) It is just instruction if someone find this file
version-compatibility/forkless-upgrade/src/backward_compatibility.rs
Outdated
Show resolved
Hide resolved
version-compatibility/forkless-upgrade/src/backward_compatibility.rs
Outdated
Show resolved
Hide resolved
…ration-tests-forkless-upgrades
…ration-tests-forkless-upgrades
…ration-tests-forkless-upgrades
…ess-upgrades # Conflicts: # version-compatibility/forkless-upgrade/chain-configurations/ignition/chain_config.json # version-compatibility/forkless-upgrade/chain-configurations/ignition/metadata.json # version-compatibility/forkless-upgrade/chain-configurations/ignition/state_transition_bytecode.wasm
## 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
Closes #1622
The change adds integration tests for the forkless upgrade feature. The tests verify that it is backward compatible and, where possible, forward compatible.
The main idea is to use published
fuel-core
crates to produce blocks with different state transition functions.Tests are using Ignition testnet chain config as a main source to be compatible with.
Before requesting review