Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/limit-select-…
Browse files Browse the repository at this point in the history
…utxo

* origin/main:
  fix "get_proposed_runtime" command (#4624)
  fix: allow OldAsset to support unambiguously encoding Arb USDC and Eth USDC, while maintaining backcompat (PRO-1237) (#4614)
  fix: start localnet using correct commit (#4623)
  chore: migration housekeeping (#4612)
  feat: add arbitrum support (PRO-1154) (#4486)
  fix: swap subscription amounts as hex (#4611)
  feat: use swapping queue when swapping network fee for burn (#4584)
  chore: update chainspecs (#4615)
  feat: Add channel opening fee to *DepositAddressReady Events (#4609)
  refactor: pass out CFE incompatibility exit information to main (#4563)
  feat: Introduce tx fee multiplier storage item (#4594)
  fix: debug cli  (#4605)
  fix: patch 1.2 broker test (#4607)
  feat: add block height and deposit details to PrewitnessedDeposit (#4606)
  chore: add myself as codeowner to upgrade-test (#4603)
  fix: RUSTSEC-2024-0019 (#4604)

# Conflicts:
#	state-chain/pallets/cf-environment/src/lib.rs
  • Loading branch information
syan095 committed Mar 10, 2024
2 parents fc752fe + 1b17c0f commit 100faf2
Show file tree
Hide file tree
Showing 159 changed files with 4,575 additions and 1,693 deletions.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tree --no-default-features --depth 1 --edges=features,normal
-p cf-*
'''

# Requires `cargo-audit`. Run `cargo install cargo-audit` to install it.
# The `cf-audit` command is configured to ignore the following advisories:
# Vulnerabilities:
# - RUSTSEC-2022-0093: This advisory is related to ed25519-dalek's public api design, which we don't expose.
Expand Down
21 changes: 16 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
/bouncer/ @martin-chainflip

/bouncer/shared/upgrade_network.ts @kylezs
/bouncer/commands/upgrade_network.ts @kylezs
.github/workflows/upgrade-test.yml @kylezs

/state-chain/custom-rpc/ @chainflip-io/web
/api/bin/chainflip-ingress-egress-tracker @chainflip-io/web

/engine/config/CI/config/Settings.toml @chainflip-io/platform
/localnet/ @chainflip-io/platform
/engine/src/witness/ @kylezs @AlastairHolmes
/engine/src/witness.rs @kylezs @AlastairHolmes
/engine/multisig/ @msgmaxim

/state-chain/pallets/cf-pools/ @AlastairHolmes
/state-chain/amm/ @AlastairHolmes

/state-chain/ @dandanlen

/utilities/with_std/task_scope @AlastairHolmes

/engine/multisig/ @msgmaxim
/engine/src/p2p/ @msgmaxim
/engine/src/p2p.rs @msgmaxim

/engine/state_chain_observer/client/ @AlastairHolmes
/engine/src/witness/ @kylezs @AlastairHolmes
/engine/src/witness.rs @kylezs @AlastairHolmes
/engine/src/eth/ @kylezs
/engine/src/btc/ @kylezs
/engine/src/dot/ @kylezs
/engine/src/p2p/ @msgmaxim
/engine/src/p2p.rs @msgmaxim
/engine/src/retrier.rs @kylezs
8 changes: 7 additions & 1 deletion .github/workflows/upgrade-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ jobs:
env:
BINARY_ROOT_PATH: ./latest-release-bins
DEBUG_OUTPUT_DESTINATION: /tmp/chainflip/debug.log
# TEMP: It should be: # git checkout ${{ steps.get-upgrade-from-commit.outputs.commit-sha }}
# But we need the fix for the broker test for 1.2 here for now
run: |
git fetch --all
git checkout release-1.2-broker-test-fix
set -x
mkdir -p /tmp/chainflip/bashful
mkdir -p /tmp/chainflip/doc
Expand All @@ -173,9 +177,11 @@ jobs:
- name: Run bouncer on latest release
id: pre-upgrade-bouncer
# TEMP: It should be: # git checkout ${{ steps.get-upgrade-from-commit.outputs.commit-sha }}
# But we need the fix for the broker test for 1.2 here for now
run: |
git fetch --all
git checkout ${{ steps.get-upgrade-from-commit.outputs.commit-sha }}
git checkout release-1.2-broker-test-fix
git rev-parse HEAD
cd bouncer
pnpm install
Expand Down
7 changes: 5 additions & 2 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions api/bin/chainflip-broker-api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub struct BrokerSwapDepositAddress {
pub issued_block: BlockNumber,
pub channel_id: ChannelId,
pub source_chain_expiry_block: NumberOrHex,
pub channel_opening_fee: u128,
}

impl From<chainflip_api::SwapDepositAddress> for BrokerSwapDepositAddress {
Expand All @@ -38,6 +39,7 @@ impl From<chainflip_api::SwapDepositAddress> for BrokerSwapDepositAddress {
issued_block: value.issued_block,
channel_id: value.channel_id,
source_chain_expiry_block: NumberOrHex::from(value.source_chain_expiry_block),
channel_opening_fee: value.channel_opening_fee,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/bin/chainflip-cli/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::{
};

#[derive(Parser, Clone, Debug)]
#[clap(version = env!("SUBSTRATE_CLI_IMPL_VERSION"), version_short = 'v')]
#[clap(version = env!("SUBSTRATE_CLI_IMPL_VERSION"))]
pub struct CLICommandLineOptions {
#[clap(short = 'c', long = "config-root", env = CONFIG_ROOT, default_value = DEFAULT_CONFIG_ROOT)]
pub config_root: String,
Expand Down
10 changes: 5 additions & 5 deletions api/bin/chainflip-ingress-egress-tracker/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use cf_chains::instances::{ChainInstanceAlias, ChainInstanceFor};
use cf_primitives::BroadcastId;
use chainflip_engine::state_chain_observer::client::{
chain_api::ChainApi, storage_api::StorageApi, STATE_CHAIN_CONNECTION,
};
use pallet_cf_broadcast::TransactionOutIdFor;
use state_chain_runtime::PalletInstanceAlias;
use tracing::log;

pub fn hex_encode_bytes(bytes: &[u8]) -> String {
Expand All @@ -12,17 +12,17 @@ pub fn hex_encode_bytes(bytes: &[u8]) -> String {

pub async fn get_broadcast_id<I, StateChainClient>(
state_chain_client: &StateChainClient,
tx_out_id: &TransactionOutIdFor<state_chain_runtime::Runtime, I::Instance>,
tx_out_id: &TransactionOutIdFor<state_chain_runtime::Runtime, ChainInstanceFor<I>>,
) -> Option<BroadcastId>
where
state_chain_runtime::Runtime: pallet_cf_broadcast::Config<I::Instance>,
I: PalletInstanceAlias + 'static,
state_chain_runtime::Runtime: pallet_cf_broadcast::Config<ChainInstanceFor<I>>,
I: ChainInstanceAlias + 'static,
StateChainClient: StorageApi + ChainApi + 'static + Send + Sync,
{
let id = state_chain_client
.storage_map_entry::<pallet_cf_broadcast::TransactionOutIdToBroadcastId<
state_chain_runtime::Runtime,
I::Instance,
ChainInstanceFor<I>,
>>(state_chain_client.latest_unfinalized_block().hash, tx_out_id)
.await
.expect(STATE_CHAIN_CONNECTION)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use chainflip_engine::{
StateChainClient,
},
witness::{
btc::{btc_source::BtcSource, process_egress},
btc::{process_egress, source::BtcSource},
common::{chain_source::extension::ChainSourceExt, epoch_source::EpochSourceBuilder},
},
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use anyhow::Context;
use cf_chains::Ethereum;
use cf_primitives::chains::assets::eth::Asset;
use std::sync::Arc;
use utilities::task_scope;
Expand All @@ -14,9 +15,9 @@ use chainflip_engine::{
},
witness::{
common::{chain_source::extension::ChainSourceExt, epoch_source::EpochSourceBuilder},
eth::{
evm::{
erc20_deposits::{flip::FlipEvents, usdc::UsdcEvents},
EthSource,
source::EvmSource,
},
},
};
Expand Down Expand Up @@ -48,8 +49,8 @@ where
EthRetryRpcClient::<EthRpcClient>::new(scope, nodes, env_params.eth_chain_id.into())?
};

let vaults = epoch_source.vaults::<cf_chains::Ethereum>().await;
let eth_source = EthSource::new(eth_client.clone())
let vaults = epoch_source.vaults::<Ethereum>().await;
let eth_source = EvmSource::<_, Ethereum>::new(eth_client.clone())
.strictly_monotonic()
.chunk_by_vault(vaults, scope);

Expand Down
Loading

0 comments on commit 100faf2

Please sign in to comment.