Skip to content

Commit

Permalink
Update Substrate to rc4 (paritytech#175)
Browse files Browse the repository at this point in the history
* Bump Substrate to rc4

* Add BaseCallFilter type

* Add DenyUnsafe to SystemApi extension

* Use new ServiceBuilder build functions

* Add BaseCallFilter to test runtimes

* Remove old comments

* Add `rev` and `git` fields back

Turns out that if you don't have these future release candidates will
be used if available. For instance, once `rc5` is released a fresh pull
would use that instead of `rc4` which is what we want.

* Use tag release instead of specific commit

Will make scripted updates easier in the future

* Add short script to update between `rc` versions

* Update scripts/update_rc.sh

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
  • Loading branch information
2 people authored and serban300 committed Apr 9, 2024
1 parent d6a1780 commit 19fd29a
Show file tree
Hide file tree
Showing 15 changed files with 195 additions and 192 deletions.
92 changes: 46 additions & 46 deletions bridges/bin/node/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,124 +20,124 @@ bridge-node-runtime = { version = "0.1.0", path = "../runtime" }
sp-bridge-eth-poa = { version = "0.1.0", path = "../../../primitives/ethereum-poa" }

[dependencies.sc-cli]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-rpc]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sp-core]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-executor]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-service]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sp-inherents]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-transaction-pool]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sp-transaction-pool]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-network]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-consensus-aura]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sp-consensus-aura]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sp-consensus]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.grandpa]
package = "sc-finality-grandpa"
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.grandpa-primitives]
package = "sp-finality-grandpa"
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-consensus]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-client-api]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sp-runtime]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.sc-basic-authorship]
version = "0.8.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "0.8.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.substrate-frame-rpc-system]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.frame-benchmarking]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[dependencies.frame-benchmarking-cli]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[build-dependencies]
vergen = "3.1.0"

[build-dependencies.build-script-utils]
package = "substrate-build-script-utils"
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[build-dependencies.frame-benchmarking-cli]
version = "2.0.0-rc3"
rev = "606c56d2e2f69f68f3947551224be6a3515dff60"
version = "2.0.0-rc4"
tag = 'v2.0.0-rc4'
git = "https://github.com/paritytech/substrate.git"

[features]
Expand Down
12 changes: 8 additions & 4 deletions bridges/bin/node/node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,14 @@ macro_rules! new_full_start {
},
)?
.with_rpc_extensions(|builder| -> Result<jsonrpc_core::IoHandler<sc_rpc::Metadata>, _> {
use sc_rpc::DenyUnsafe;
use substrate_frame_rpc_system::{FullSystem, SystemApi};

let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(SystemApi::to_delegate(FullSystem::new(
builder.client().clone(),
builder.pool(),
DenyUnsafe::No,
)));
Ok(io)
})?;
Expand All @@ -124,7 +126,7 @@ pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceEr
let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;
Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
})?
.build()?;
.build_full()?;

if role.is_authority() {
let proposer = sc_basic_authorship::ProposerFactory::new(
Expand Down Expand Up @@ -153,7 +155,7 @@ pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceEr

// the AURA authoring task is considered essential, i.e. if it
// fails we take down the service with it.
service.spawn_essential_task("aura", aura);
service.spawn_essential_task_handle().spawn_blocking("aura", aura);
}

// if the node isn't actively participating in consensus then it doesn't
Expand Down Expand Up @@ -195,7 +197,9 @@ pub fn new_full(config: Configuration) -> Result<impl AbstractService, ServiceEr

// the GRANDPA voter task is considered infallible, i.e.
// if it fails we take down the service with it.
service.spawn_essential_task("grandpa-voter", grandpa::run_grandpa_voter(grandpa_config)?);
service
.spawn_essential_task_handle()
.spawn_blocking("grandpa-voter", grandpa::run_grandpa_voter(grandpa_config)?);
} else {
grandpa::setup_disabled_grandpa(service.client(), &inherent_data_providers, service.network())?;
}
Expand Down Expand Up @@ -255,5 +259,5 @@ pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceE
let provider = client as Arc<dyn StorageAndProofProvider<_, _>>;
Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, provider)) as _)
})?
.build()
.build_light()
}
Loading

0 comments on commit 19fd29a

Please sign in to comment.