Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/open-gov-2
Browse files Browse the repository at this point in the history
  • Loading branch information
wischli committed Jun 28, 2024
2 parents 05c50aa + eb38d05 commit 230651d
Show file tree
Hide file tree
Showing 137 changed files with 3,169 additions and 3,194 deletions.
64 changes: 60 additions & 4 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ license = "LGPL-3.0"
homepage = "https://centrifuge.io/"
repository = "https://github.com/centrifuge/centrifuge-chain"
documentation = "https://reference.centrifuge.io/centrifuge_chain/index.html"
version = "0.11.0"
version = "0.11.3"

[workspace.dependencies]
hex-literal = { version = "0.4.1" }
Expand Down Expand Up @@ -173,6 +173,7 @@ sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", default-featu
sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" }
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" }
frame-metadata-hash-extension = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.7.2" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, features = [
"tuples-96",
], branch = "release-polkadot-v1.7.2" } # Check when tuples-96 can be removed
Expand Down
101 changes: 49 additions & 52 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use sp_runtime::traits::AccountIdConversion;
use crate::{
chain_spec,
cli::{Cli, RelayChainCli, Subcommand},
service::{evm, AltairRuntimeExecutor, CentrifugeRuntimeExecutor, DevelopmentRuntimeExecutor},
service::evm,
};

pub const LOCAL_PARA_ID: ParaId = ParaId::new(2000u32);
Expand Down Expand Up @@ -165,28 +165,28 @@ macro_rules! construct_async_run {

match runner.config().chain_spec.identify() {
ChainIdentity::Altair => runner.async_run(|$config| {
let $components = evm::new_partial::<altair_runtime::RuntimeApi, _, AltairRuntimeExecutor>(
let $components = evm::new_partial::<altair_runtime::RuntimeApi, _>(
&$config,
first_evm_block,
crate::service::build_import_queue::<altair_runtime::RuntimeApi, AltairRuntimeExecutor>
crate::service::build_import_queue::<altair_runtime::RuntimeApi>
)?;
let task_manager = $components.task_manager;
{ $( $code )* }.map(|v| (v, task_manager))
}),
ChainIdentity::Centrifuge => runner.async_run(|$config| {
let $components = evm::new_partial::<centrifuge_runtime::RuntimeApi, _, CentrifugeRuntimeExecutor>(
let $components = evm::new_partial::<centrifuge_runtime::RuntimeApi, _>(
&$config,
first_evm_block,
crate::service::build_import_queue::<centrifuge_runtime::RuntimeApi, CentrifugeRuntimeExecutor>,
crate::service::build_import_queue::<centrifuge_runtime::RuntimeApi>,
)?;
let task_manager = $components.task_manager;
{ $( $code )* }.map(|v| (v, task_manager))
}),
ChainIdentity::Development => runner.async_run(|$config| {
let $components = evm::new_partial::<development_runtime::RuntimeApi, _, DevelopmentRuntimeExecutor>(
let $components = evm::new_partial::<development_runtime::RuntimeApi, _>(
&$config,
first_evm_block,
crate::service::build_import_queue::<development_runtime::RuntimeApi, DevelopmentRuntimeExecutor>,
crate::service::build_import_queue::<development_runtime::RuntimeApi>,
)?;
let task_manager = $components.task_manager;
{ $( $code )* }.map(|v| (v, task_manager))
Expand Down Expand Up @@ -351,51 +351,48 @@ pub fn run() -> Result<()> {
);

match config.chain_spec.identify() {
ChainIdentity::Altair => crate::service::start_node::<
altair_runtime::RuntimeApi,
AltairRuntimeExecutor,
>(
config,
polkadot_config,
cli.eth,
collator_options,
id,
hwbench,
first_evm_block,
)
.await
.map(|r| r.0)
.map_err(Into::into),
ChainIdentity::Centrifuge => crate::service::start_node::<
centrifuge_runtime::RuntimeApi,
CentrifugeRuntimeExecutor,
>(
config,
polkadot_config,
cli.eth,
collator_options,
id,
hwbench,
first_evm_block,
)
.await
.map(|r| r.0)
.map_err(Into::into),
ChainIdentity::Development => crate::service::start_node::<
development_runtime::RuntimeApi,
DevelopmentRuntimeExecutor,
>(
config,
polkadot_config,
cli.eth,
collator_options,
id,
hwbench,
first_evm_block,
)
.await
.map(|r| r.0)
.map_err(Into::into),
ChainIdentity::Altair => {
crate::service::start_node::<altair_runtime::RuntimeApi>(
config,
polkadot_config,
cli.eth,
collator_options,
id,
hwbench,
first_evm_block,
)
.await
.map(|r| r.0)
.map_err(Into::into)
}
ChainIdentity::Centrifuge => {
crate::service::start_node::<centrifuge_runtime::RuntimeApi>(
config,
polkadot_config,
cli.eth,
collator_options,
id,
hwbench,
first_evm_block,
)
.await
.map(|r| r.0)
.map_err(Into::into)
}
ChainIdentity::Development => {
crate::service::start_node::<development_runtime::RuntimeApi>(
config,
polkadot_config,
cli.eth,
collator_options,
id,
hwbench,
first_evm_block,
)
.await
.map(|r| r.0)
.map_err(Into::into)
}
}
})
}
Expand Down
Loading

0 comments on commit 230651d

Please sign in to comment.