Skip to content

Commit

Permalink
chore: bump versions 1.7.4 -> 1.7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dandanlen committed Dec 11, 2024
1 parent 4d1f4af commit 2752fc6
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 28 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/bin/chainflip-broker-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Chainflip team <https://github.com/chainflip-io>"]
name = "chainflip-broker-api"
version = "1.7.4"
version = "1.7.5"
edition = "2021"

[package.metadata.deb]
Expand Down
2 changes: 1 addition & 1 deletion api/bin/chainflip-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Chainflip team <https://github.com/chainflip-io>"]
edition = "2021"
build = "build.rs"
name = "chainflip-cli"
version = "1.7.4"
version = "1.7.5"

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion api/bin/chainflip-lp-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Chainflip team <https://github.com/chainflip-io>"]
name = "chainflip-lp-api"
version = "1.7.4"
version = "1.7.5"
edition = "2021"

[package.metadata.deb]
Expand Down
2 changes: 1 addition & 1 deletion api/lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chainflip-api"
version = "1.7.4"
version = "1.7.5"
edition = "2021"

[lints]
Expand Down
4 changes: 2 additions & 2 deletions engine-dylib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ authors = ["Chainflip team <https://github.com/chainflip-io>"]
build = "build.rs"
edition = "2021"
name = "cf-engine-dylib"
version = "1.7.4"
version = "1.7.5"

[lib]
crate-type = ["cdylib"]
name = "chainflip_engine_v1_7_4"
name = "chainflip_engine_v1_7_5"
path = "src/lib.rs"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion engine-proc-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
name = "engine-proc-macros"
# The version here is the version that will be used for the generated code, and therefore will be the
# suffix of the generated engine entrypoint. TODO: Fix this.
version = "1.7.4"
version = "1.7.5"

[lib]
proc-macro = true
Expand Down
6 changes: 3 additions & 3 deletions engine-runner-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "engine-runner"
description = "The central runner for the chainflip engine, it requires two shared library versions to run."
# NB: When updating this version, you must update the debian assets appropriately too.
version = "1.7.4"
version = "1.7.5"
authors = ["Chainflip team <https://github.com/chainflip-io>"]
build = "build.rs"
edition = "2021"
Expand All @@ -22,10 +22,10 @@ assets = [
# to specify this. We do this in the `chainflip-engine.service` files, so the user does not need to set it
# manually.
[
"target/release/libchainflip_engine_v1_7_4.so",
"target/release/libchainflip_engine_v1_7_5.so",
# This is the path where the engine dylib is searched for on linux.
# As set in the build.rs file.
"usr/lib/chainflip-engine/libchainflip_engine_v1_7_4.so",
"usr/lib/chainflip-engine/libchainflip_engine_v1_7_5.so",
"755",
],
# The old version gets put into target/release by the package github actions workflow.
Expand Down
2 changes: 1 addition & 1 deletion engine-runner-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod old {
}

mod new {
#[engine_proc_macros::link_engine_library_version("1.7.4")]
#[engine_proc_macros::link_engine_library_version("1.7.5")]
extern "C" {
fn cfe_entrypoint(
c_args: engine_upgrade_utils::CStrArray,
Expand Down
2 changes: 1 addition & 1 deletion engine-upgrade-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod build_helpers;
// relevant crates.
// Should also check that the compatibility function below `args_compatible_with_old` is correct.
pub const OLD_VERSION: &str = "1.6.8";
pub const NEW_VERSION: &str = "1.7.4";
pub const NEW_VERSION: &str = "1.7.5";

pub const ENGINE_LIB_PREFIX: &str = "chainflip_engine_v";
pub const ENGINE_ENTRYPOINT_PREFIX: &str = "cfe_entrypoint_v";
Expand Down
2 changes: 1 addition & 1 deletion engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ authors = ["Chainflip team <https://github.com/chainflip-io>"]
build = "build.rs"
edition = "2021"
name = "chainflip-engine"
version = "1.7.4"
version = "1.7.5"

[lib]
crate-type = ["lib"]
Expand Down
2 changes: 1 addition & 1 deletion state-chain/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "<TODO>"
name = "chainflip-node"
publish = false
repository = "https://github.com/chainflip-io/chainflip-backend"
version = "1.7.4"
version = "1.7.5"

[[bin]]
name = "chainflip-node"
Expand Down
2 changes: 1 addition & 1 deletion state-chain/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "state-chain-runtime"
version = "1.7.4"
version = "1.7.5"
authors = ["Chainflip Team <https://github.com/chainflip-io>"]
edition = "2021"
homepage = "https://chainflip.io"
Expand Down
2 changes: 1 addition & 1 deletion state-chain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("chainflip-node"),
impl_name: create_runtime_str!("chainflip-node"),
authoring_version: 1,
spec_version: 174,
spec_version: 175,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 12,
Expand Down
40 changes: 38 additions & 2 deletions state-chain/runtime/src/migrations/housekeeping.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
use crate::Runtime;
use cf_chains::instances::{ArbitrumInstance, EthereumInstance, PolkadotInstance};
use core::str::FromStr as _;

use crate::{Runtime, SolEnvironment};
use cf_chains::{
instances::{ArbitrumInstance, EthereumInstance, PolkadotInstance, SolanaInstance},
sol::{api::SolanaApi, SolAddress, SolAsset},
ForeignChain, Solana, TransferAssetParams,
};
use cf_runtime_upgrade_utilities::genesis_hashes;
use frame_support::{traits::OnRuntimeUpgrade, weights::Weight};
use pallet_cf_broadcast::migrations::remove_aborted_broadcasts;
Expand All @@ -21,6 +27,36 @@ impl OnRuntimeUpgrade for Migration {
remove_aborted_broadcasts::remove_stale_and_all_older::<Runtime, ArbitrumInstance>(
remove_aborted_broadcasts::ARBITRUM_MAX_ABORTED_BROADCAST_BERGHAIN,
);
if crate::VERSION.spec_version == 175 {
log::info!("🧹 Housekeeping, bumping Solana refund");
if let Ok(to) =
SolAddress::from_str("9RbaLSDtScGDur9UGAiBQFYPiKK9xDZLuD39xkEqa5Zw")
{
if let Ok(mut calls) =
SolanaApi::<SolEnvironment>::transfer(sp_std::vec![(
TransferAssetParams::<Solana> {
asset: SolAsset::SolUsdc,
amount: 162740593954,
to,
},
(ForeignChain::Solana, 0)
)]) {
if calls.len() == 1 {
let _ = <pallet_cf_broadcast::Pallet<Runtime, SolanaInstance> as cf_traits::Broadcaster<
Solana,
>>::threshold_sign_and_broadcast(
calls.pop().expect("Checked for 1 call.").0,
);
} else {
log::error!("Expected 1 call, got {}", calls.len());
}
} else {
log::error!("Failed to build Solana transaction");
}
} else {
log::error!("Invalid Solana address");
}
}
},
genesis_hashes::PERSEVERANCE => {
log::info!("🧹 Housekeeping, removing stale aborted broadcasts");
Expand Down

0 comments on commit 2752fc6

Please sign in to comment.