Skip to content

Commit

Permalink
Add onfinality script (#952)
Browse files Browse the repository at this point in the history
* minor update

* bump version and cargo update

* [benchmarking bot] Auto commit generated weights files (#951)

Co-authored-by: Kailai-Wang <Kailai-Wang@users.noreply.github.com>

* try to use new weights

* fix typo

* add missing mods

* fix compile

* add onFinality image version update

* fix indention

* add continue-on-error

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kailai-Wang <Kailai-Wang@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 16, 2022
1 parent 18fc80a commit 24ba176
Showing 79 changed files with 1,569 additions and 1,375 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/create-release-draft.yml
Original file line number Diff line number Diff line change
@@ -288,3 +288,40 @@ jobs:
*-parachain-runtime/*-parachain-srtool-digest.json
*-parachain-runtime/*-parachain-runtime.compact.compressed.wasm
litentry-collator/*
## update the image version at onfinality ##
update-onfinality-image:
runs-on: ubuntu-latest
needs:
- create-release-draft
if: ${{ github.event.inputs.release_client == 'true' }}
steps:
- name: Update litmus image version
uses: "OnFinality-io/action-onf-release@v1"
continue-on-error: true
with:
# These keys should be in your GitHub secrets
# https://documentation.onfinality.io/support/onfinality-cli-tool-and-access-keys
onf-access-key: ${{ secrets.ONF_ACCESS_KEY }}
onf-secret-key: ${{ secrets.ONF_SECRET_KEY }}
onf-workspace-id: ${{ secrets.ONF_WORKSPACE_ID }}
onf-network-key: ${{ secrets.ONF_LITMUS_NETWORK_KEY }}
# Add a new image version to network spec
onf-sub-command: image
onf-action: add
image-version: ${{ env.RELEASE_TAG }}

- name: Update litentry image version
uses: "OnFinality-io/action-onf-release@v1"
continue-on-error: true
with:
# These keys should be in your GitHub secrets
# https://documentation.onfinality.io/support/onfinality-cli-tool-and-access-keys
onf-access-key: ${{ secrets.ONF_ACCESS_KEY }}
onf-secret-key: ${{ secrets.ONF_SECRET_KEY }}
onf-workspace-id: ${{ secrets.ONF_WORKSPACE_ID }}
onf-network-key: ${{ secrets.ONF_LITENTRY_NETWORK_KEY }}
# Add a new image version to network spec
onf-sub-command: image
onf-action: add
image-version: ${{ env.RELEASE_TAG }}
34 changes: 17 additions & 17 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 node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ homepage = 'https://litentry.com/'
license = 'GPL-3.0'
name = 'litentry-collator'
repository = 'https://github.com/litentry/litentry-parachain'
version = '0.9.11'
version = '0.9.12'

[[bin]]
name = 'litentry-collator'
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
authors = ["Litentry Dev"]
edition = '2021'
name = 'primitives'
version = '0.9.11'
version = '0.9.12'

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
2 changes: 1 addition & 1 deletion runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
authors = ["Litentry Dev"]
edition = '2021'
name = 'runtime-common'
version = '0.9.11'
version = '0.9.12'

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
2 changes: 1 addition & 1 deletion runtime/litentry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
authors = ["Litentry Dev"]
edition = '2021'
name = 'litentry-parachain-runtime'
version = '0.9.11'
version = '0.9.12'

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
7 changes: 3 additions & 4 deletions runtime/litentry/src/lib.rs
Original file line number Diff line number Diff line change
@@ -139,7 +139,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
authoring_version: 1,
// same versioning-mechanism as polkadot:
// last digit is used for minor updates, like 9110 -> 9111 in polkadot
spec_version: 9115,
spec_version: 9120,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
@@ -316,7 +316,7 @@ impl pallet_proxy::Config for Runtime {
type ProxyDepositBase = ProxyDepositBase;
type ProxyDepositFactor = ProxyDepositFactor;
type MaxProxies = ConstU32<32>;
type WeightInfo = ();
type WeightInfo = weights::pallet_proxy::WeightInfo<Runtime>;
type MaxPending = ConstU32<32>;
type CallHasher = BlakeTwo256;
type AnnouncementDepositBase = AnnouncementDepositBase;
@@ -555,10 +555,9 @@ impl pallet_treasury::Config for Runtime {
type SpendPeriod = SpendPeriod;
type Burn = Burn;
type BurnDestination = ();
// type SpendFunds = Bounties;
// Bounties is not enabled yet
type SpendFunds = ();
type WeightInfo = ();
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
type MaxApprovals = ConstU32<100>;
}

8 changes: 4 additions & 4 deletions runtime/litentry/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-10-09, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `parachain-benchmark`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz`
//! DATE: 2022-11-14, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `parachain-benchmark`, CPU: `Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20
// Executed Command:
@@ -49,13 +49,13 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
Weight::from_ref_time(6_100_000 as u64)
Weight::from_ref_time(11_469_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
Weight::from_ref_time(5_916_000 as u64)
Weight::from_ref_time(11_409_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
}
37 changes: 20 additions & 17 deletions runtime/litentry/src/weights/frame_system.rs
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
//! Autogenerated weights for `frame_system`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2022-10-09, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `parachain-benchmark`, CPU: `Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz`
//! DATE: 2022-11-14, STEPS: `20`, REPEAT: 50, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! HOSTNAME: `parachain-benchmark`, CPU: `Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("litentry-dev"), DB CACHE: 20
// Executed Command:
@@ -49,45 +49,48 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> frame_system::WeightInfo for WeightInfo<T> {
/// The range of component `b` is `[0, 3932160]`.
fn remark(b: u32, ) -> Weight {
Weight::from_ref_time(278_000 as u64)
Weight::from_ref_time(6_116_000 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(1_000 as u64).saturating_mul(b as u64))
.saturating_add(Weight::from_ref_time(580 as u64).saturating_mul(b as u64))
}
/// The range of component `b` is `[0, 3932160]`.
fn remark_with_event(b: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 0
.saturating_add(Weight::from_ref_time(2_000 as u64).saturating_mul(b as u64))
Weight::from_ref_time(20_321_000 as u64)
// Standard Error: 1
.saturating_add(Weight::from_ref_time(2_131 as u64).saturating_mul(b as u64))
}
// Storage: System Digest (r:1 w:1)
// Storage: unknown [0x3a686561707061676573] (r:0 w:1)
fn set_heap_pages() -> Weight {
Weight::from_ref_time(5_819_000 as u64)
Weight::from_ref_time(12_702_000 as u64)
.saturating_add(T::DbWeight::get().reads(1 as u64))
.saturating_add(T::DbWeight::get().writes(2 as u64))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn set_storage(i: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(803_000 as u64).saturating_mul(i as u64))
Weight::from_ref_time(7_371_000 as u64)
// Standard Error: 1_494
.saturating_add(Weight::from_ref_time(1_267_397 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `i` is `[1, 1000]`.
fn kill_storage(i: u32, ) -> Weight {
Weight::from_ref_time(677_000 as u64)
// Standard Error: 1_000
.saturating_add(Weight::from_ref_time(657_000 as u64).saturating_mul(i as u64))
Weight::from_ref_time(7_347_000 as u64)
// Standard Error: 1_257
.saturating_add(Weight::from_ref_time(1_073_403 as u64).saturating_mul(i as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(i as u64)))
}
// Storage: Skipped Metadata (r:0 w:0)
/// The range of component `p` is `[1, 1000]`.
fn kill_prefix(p: u32, ) -> Weight {
Weight::from_ref_time(0 as u64)
// Standard Error: 2_000
.saturating_add(Weight::from_ref_time(1_399_000 as u64).saturating_mul(p as u64))
Weight::from_ref_time(11_081_000 as u64)
// Standard Error: 3_160
.saturating_add(Weight::from_ref_time(2_630_429 as u64).saturating_mul(p as u64))
.saturating_add(T::DbWeight::get().writes(1 as u64))
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(p as u64)))
}
}
6 changes: 3 additions & 3 deletions runtime/litentry/src/weights/mod.rs
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@ pub mod cumulus_pallet_xcmp_queue;
pub mod frame_system;
pub mod pallet_asset_manager;
pub mod pallet_balances;
pub mod pallet_bridge;
pub mod pallet_bridge_transfer;
pub mod pallet_collective;
pub mod pallet_democracy;
pub mod pallet_drop3;
@@ -32,7 +34,5 @@ pub mod pallet_proxy;
pub mod pallet_scheduler;
pub mod pallet_session;
pub mod pallet_timestamp;
// pub mod pallet_treasury;
pub mod pallet_bridge;
pub mod pallet_bridge_transfer;
pub mod pallet_treasury;
pub mod pallet_utility;
Loading

0 comments on commit 24ba176

Please sign in to comment.