Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release centrifuge 1024 client 1035 #1607

Merged
merged 31 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
dbd5934
feat: new weights altair
mustermeiszer Nov 15, 2023
09bf25e
feat: new weights centrifuge
mustermeiszer Nov 15, 2023
6a5f505
wip
mustermeiszer Nov 15, 2023
0654dac
migrations: Add migration for account data
cdamian Nov 16, 2023
4d7e8c5
migrations: Adjust pre upgrade logic for accounts
cdamian Nov 20, 2023
44e5e7d
migrations: Log total count for accounts
cdamian Nov 20, 2023
71a1fc5
migrations: Log total count for accounts with frozen and reserved bal…
cdamian Nov 21, 2023
0e52d38
Merge branch 'main' into release-centrifuge_1024-client_1035
wischli Nov 21, 2023
6ef6cc5
deps: Remove double orml-tokens dep
cdamian Nov 21, 2023
f8d871e
migrations: Add test account data for balances
cdamian Nov 21, 2023
08ff938
fix: account info checks
wischli Nov 22, 2023
c4c754e
fix: local docker setup
wischli Nov 22, 2023
e8fbe8a
CI release bug fixes (#1611)
gpmayorga Nov 21, 2023
b80639b
Fix: Transfer debt (#1615)
mustermeiszer Nov 21, 2023
e84e22c
chore(deps): bump google-github-actions/auth from 1.1.1 to 1.2.0 (#1614)
dependabot[bot] Nov 22, 2023
cb2e474
fix: minor stuff balances migration
wischli Nov 22, 2023
2dd0a6b
chore: bump development version, rm dummy migration
wischli Nov 22, 2023
205024a
chore: bump MaxFeedValues from 10 to 500
wischli Nov 22, 2023
5299da0
Merge remote-tracking branch 'origin/main' into release-centrifuge_10…
mustermeiszer Dec 1, 2023
ab0a221
fix: toml versions
wischli Dec 1, 2023
2451724
fix: remove balance migration from runtimes
wischli Dec 1, 2023
0da6e58
refactor: remove balance migration from codebase
wischli Dec 1, 2023
9d4922e
chore: update dev weights
wischli Dec 4, 2023
84bf880
chore: update cfg weights
wischli Dec 4, 2023
27baf14
chore: altair weights
wischli Dec 4, 2023
a0ea8cb
fix: enable XCM benches for dev
wischli Dec 4, 2023
597f674
Merge remote-tracking branch 'origin/main' into release-centrifuge_10…
wischli Dec 4, 2023
bf0885e
chore: bump dev to 1035
wischli Dec 4, 2023
52ee34a
fix: missed renaming
wischli Dec 4, 2023
f01b929
chore: bump client to 0.10.35
wischli Dec 6, 2023
372606f
Merge branch 'main' into release-centrifuge_1024-client_1035
wischli Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".github/workflows/build-docker.yml"
- "docker/centrifuge-chain/Dockerfile"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}${{ github.ref == '/refs/heads/main' && github.sha || 'false' }}
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}${{ github.event_name }}
cancel-in-progress: true
jobs:
docker:
Expand All @@ -34,12 +34,6 @@ jobs:
docker volume ls
df -h

- name: Install toolchain from rust-toolchain.toml
shell: sh
run: |
TOOLCHAIN_VERSION=$(grep 'channel =' rust-toolchain.toml | awk -F'"' '{print $2}')
rustup toolchain install "$TOOLCHAIN_VERSION"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 #v3
- name: DockerHub Login
Expand All @@ -64,7 +58,7 @@ jobs:
type=semver,pattern={{major}},prefix=${{ matrix.target == 'test' && 'test-' || '' }},suffix=
type=edge

- name: Configure sccache
- name: Configure GHA cache
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 #v6
with:
script: |
Expand All @@ -78,7 +72,7 @@ jobs:
file: ./docker/centrifuge-chain/Dockerfile
build-args: |
FEATURES=${{ matrix.target == 'test' && 'fast-runtime' || '' }}
push: ${{ github.ref == '/refs/heads/main' && true || false }}
push: ${{ github.event_name == 'pull_request' && false || true }}
tags: ${{ steps.meta.outputs.tags }}
# Cache options:
# https://docs.docker.com/build/ci/github-actions/cache/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: ./.github/actions/prep-ubuntu

# sccache does not work inside the srtool container
- uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # 2.6.2
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # 2.7
with:
prefix-key: build
shared-key: wasm
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
path: ./${{ matrix.package }}-srtool-wasm-report.json

- id: 'auth'
uses: 'google-github-actions/auth@35b0e87d162680511bf346c299f71c9c5c379033' # v1.1.1
uses: 'google-github-actions/auth@f105ef0cdb3b102a020be1767fcc8a974898b7c6' # v1.2.0
with:
workload_identity_provider: ${{ secrets.GWIP_ARTIFACTS }}
service_account: ${{ secrets.GSA_ARTIFACTS }}
Expand Down
38 changes: 23 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
docs:
build-docs:
permissions:
contents: write
contents: read
id-token: write
runs-on: ubuntu-latest-4-cores
env:
RUSTDOCFLAGS: "-D warnings"
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4

- name: Prep build on Ubuntu
uses: ./.github/actions/prep-ubuntu
with:
RUST_TOOLCHAIN: ${{ env.RUST_TOOLCHAIN }}
cache: enabled
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
Expand All @@ -31,7 +27,9 @@ jobs:
- name: Build documentation
id: build_docs
run: cargo doc --all --no-deps

env:
RUSTDOCFLAGS: "-D warnings"
RUSTC_WRAPPER: "sccache"

- name: Build Documentation failed
if: always() && steps.build_docs.outcome == 'failure'
Expand All @@ -43,12 +41,22 @@ jobs:
run: |
echo "<meta http-equiv=\"refresh\" content=\"0; url=centrifuge_chain/index.html\">" \ > ./target/doc/index.html

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # 3.9.3
if: github.ref == 'refs/heads/main'
- name: upload Docs files
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
cname: reference.centrifuge.io
force_orphan: true
path: ./target/doc

deploy-docs:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write # to deploy to Pages
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Docs
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions docker/docker-compose-local-chain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "9946:9933"
volumes:
- type: bind
source: ./res/rococo-local.json
source: ../res/rococo-local.json
target: /chainspec.json
read_only: true
command: >
Expand Down Expand Up @@ -45,7 +45,7 @@ services:
- "9946:9944"
volumes:
- type: bind
source: ./res/rococo-local.json
source: ../res/rococo-local.json
target: /chainspec.json
read_only: true
command: >
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose-local-relay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "9944:9933"
volumes:
- type: bind
source: ./res/rococo-local.json
source: ../res/rococo-local.json
target: /chainspec.json
read_only: true
command: >
Expand All @@ -37,7 +37,7 @@ services:
- "9945:9933"
volumes:
- type: bind
source: ./res/rococo-local.json
source: ../res/rococo-local.json
target: /chainspec.json
read_only: true
command: >
Expand Down
5 changes: 3 additions & 2 deletions pallets/pool-system/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,13 @@ impl<T: Config> ChangeGuard for Pallet<T> {
type PoolId = T::PoolId;

fn note(pool_id: Self::PoolId, change: Self::Change) -> Result<Self::ChangeId, DispatchError> {
// NOTE: Essentially, this key-generation allows to override previously
// submitted changes, if they are identical.
let change_id: Self::ChangeId = T::Hashing::hash(&change.encode());
let noted_change = NotedPoolChange {
submitted_time: T::Time::now(),
change,
};

let change_id: Self::ChangeId = T::Hashing::hash(&noted_change.encode());
NotedChange::<T>::insert(pool_id, change_id, noted_change.clone());

Self::deposit_event(Event::ProposedChange {
Expand Down
6 changes: 4 additions & 2 deletions pallets/pool-system/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2449,12 +2449,14 @@ mod changes {
let change = PoolChangeProposal::new([Requirement::DelayTime(2)]);
let change_id_3 = PoolSystem::note(DEFAULT_POOL_ID, change).unwrap();

// Same change but different moment;
// Same change but different moment so overwrites
util::advance_secs(1);
let change = PoolChangeProposal::new([Requirement::DelayTime(2)]);
let change_id_4 = PoolSystem::note(DEFAULT_POOL_ID, change).unwrap();

let ids = [change_id_1, change_id_2, change_id_3, change_id_4];
assert_eq!(change_id_4, change_id_3);

let ids = [change_id_1, change_id_2, change_id_3];
assert_eq!(BTreeSet::from(ids.clone()).len(), ids.len());
});
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ impl pallet_membership::Config for Runtime {
}

parameter_types! {
pub const MaxFeedValues: u32 = 10;
pub const MaxFeedValues: u32 = 500;
}

impl orml_oracle::Config for Runtime {
Expand Down
2 changes: 2 additions & 0 deletions runtime/altair/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ pub type UpgradeAltair1034 = (
xcm_v2_to_v3::SetSafeXcmVersion,
// Sets account codes for all precompiles
runtime_common::migrations::precompile_account_codes::Migration<crate::Runtime>,
// Converts the old account data to the new format
runtime_common::migrations::balances::Migration<crate::Runtime>,
);

mod asset_registry {
Expand Down
12 changes: 6 additions & 6 deletions runtime/altair/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! Autogenerated weights for `cumulus_pallet_xcmp_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `kf-FG`, CPU: `<UNKNOWN>`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -38,8 +38,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1627`
// Minimum execution time: 6_000_000 picoseconds.
Weight::from_parts(6_000_000, 0)
// Minimum execution time: 8_486_000 picoseconds.
Weight::from_parts(8_967_000, 0)
.saturating_add(Weight::from_parts(0, 1627))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -50,8 +50,8 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
// Proof Size summary in bytes:
// Measured: `142`
// Estimated: `1627`
// Minimum execution time: 6_000_000 picoseconds.
Weight::from_parts(6_000_000, 0)
// Minimum execution time: 8_606_000 picoseconds.
Weight::from_parts(9_046_000, 0)
.saturating_add(Weight::from_parts(0, 1627))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
Expand Down
20 changes: 10 additions & 10 deletions runtime/altair/src/weights/pallet_anchors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! Autogenerated weights for `pallet_anchors`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-11-10, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-11-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `kf-FG`, CPU: `<UNKNOWN>`
//! HOSTNAME: `runner`, CPU: `AMD EPYC 7763 64-Core Processor`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("altair-dev"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -42,8 +42,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `301`
// Estimated: `3581`
// Minimum execution time: 27_000_000 picoseconds.
Weight::from_parts(27_000_000, 0)
// Minimum execution time: 39_414_000 picoseconds.
Weight::from_parts(40_395_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(1))
Expand All @@ -70,8 +70,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `668`
// Estimated: `3581`
// Minimum execution time: 47_000_000 picoseconds.
Weight::from_parts(48_000_000, 0)
// Minimum execution time: 68_949_000 picoseconds.
Weight::from_parts(70_471_000, 0)
.saturating_add(Weight::from_parts(0, 3581))
.saturating_add(T::DbWeight::get().reads(7))
.saturating_add(T::DbWeight::get().writes(5))
Expand All @@ -82,8 +82,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `12450`
// Estimated: `260090`
// Minimum execution time: 1_539_000_000 picoseconds.
Weight::from_parts(1_546_000_000, 0)
// Minimum execution time: 2_060_378_000 picoseconds.
Weight::from_parts(2_077_599_000, 0)
.saturating_add(Weight::from_parts(0, 260090))
.saturating_add(T::DbWeight::get().reads(100))
.saturating_add(T::DbWeight::get().writes(100))
Expand Down Expand Up @@ -506,8 +506,8 @@ impl<T: frame_system::Config> pallet_anchors::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `18357`
// Estimated: `254990`
// Minimum execution time: 1_428_000_000 picoseconds.
Weight::from_parts(1_433_000_000, 0)
// Minimum execution time: 1_916_971_000 picoseconds.
Weight::from_parts(1_945_704_000, 0)
.saturating_add(Weight::from_parts(0, 254990))
.saturating_add(T::DbWeight::get().reads(504))
.saturating_add(T::DbWeight::get().writes(402))
Expand Down
Loading
Loading