Update to the latest Serai Substrate (#125)

* Update to the latest Serai Substrate

* Add Protobuf to build dependencies

Docker shouldn't need updating as this should've been added to the image 
in 
2dbace5b01.

* Get substrate to build

* Correct protoc build step

* Remove the benchmarking code

There's some macro resolution error that isn't apparent. I worked on it 
for about half an hour but...

* Remove unnecessary clone

* Correct runtime-benchmarks flag usage
This commit is contained in:
Luke Parker
2022-09-29 13:33:09 -05:00
committed by GitHub
parent 2c3f36fd3f
commit 482a8ec209
9 changed files with 588 additions and 515 deletions

View File

@@ -94,6 +94,12 @@ pub fn run() -> sc_cli::Result<()> {
BenchmarkCmd::Block(cmd) => cmd.run(service::new_partial(&config)?.client),
#[cfg(not(feature = "runtime-benchmarks"))]
BenchmarkCmd::Storage(_) => {
Err("Storage benchmarking can be enabled with `--features runtime-benchmarks`.".into())
}
#[cfg(feature = "runtime-benchmarks")]
BenchmarkCmd::Storage(cmd) => {
let PartialComponents { client, backend, .. } = service::new_partial(&config)?;
cmd.run(config, client, backend.expose_db(), backend.expose_storage())
@@ -101,7 +107,13 @@ pub fn run() -> sc_cli::Result<()> {
BenchmarkCmd::Overhead(cmd) => {
let client = service::new_partial(&config)?.client;
cmd.run(config, client.clone(), inherent_benchmark_data()?, &RemarkBuilder::new(client))
cmd.run(
config,
client.clone(),
inherent_benchmark_data()?,
vec![],
&RemarkBuilder::new(client),
)
}
BenchmarkCmd::Extrinsic(cmd) => {
@@ -109,6 +121,7 @@ pub fn run() -> sc_cli::Result<()> {
cmd.run(
client.clone(),
inherent_benchmark_data()?,
vec![],
&ExtrinsicFactory(vec![Box::new(RemarkBuilder::new(client))]),
)
}