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 v0.13.0 #1898

Merged
merged 29 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
dd23213
chore: update deps to enable metadata hash check
wischli Jul 5, 2024
0a26688
chore: update srtool + add on-chain-release-build opts
wischli Jul 5, 2024
3da4e2e
chore: bump spec versions + cleanup migrations
wischli Jul 5, 2024
595b275
fmt: taplo
wischli Jul 5, 2024
d90644b
ci: fix srtool fmt
wischli Jul 5, 2024
4cb3180
ci: apply proper CLI
wischli Jul 5, 2024
3e02647
attempt2 to enable on-chain-release-build
wischli Jul 5, 2024
4f58c15
change srtool build for chevdor/strool-actions action
gpmayorga Jul 5, 2024
a882fd9
desperate attempts to get it working
wischli Jul 6, 2024
805273f
override workdir
gpmayorga Jul 8, 2024
7dd5f48
Try to set permissions wide open before running docker
gpmayorga Jul 8, 2024
559e568
add RUST_BACKTRACE
gpmayorga Jul 8, 2024
9d142f8
revert to our GHA manual process & add enhancements
gpmayorga Jul 8, 2024
b3a97bc
fix package name
gpmayorga Jul 8, 2024
8a259a4
Output information about srtool
gpmayorga Jul 8, 2024
99dce4b
Revert "desperate attempts to get it working"
wischli Jul 9, 2024
4601e21
fix: some scripts
wischli Jul 9, 2024
4ee87b6
fix bad colon on echo command
gpmayorga Jul 9, 2024
a649876
Fix missing colon and remove docker publish release
gpmayorga Jul 9, 2024
cfa9880
upload wasm to release
gpmayorga Jul 9, 2024
6472be0
fix issue with gchr tags
gpmayorga Jul 9, 2024
4a981c0
more semicolon issues
gpmayorga Jul 9, 2024
e52d367
Merge branch 'main' into release-v0.13.0
gpmayorga Jul 9, 2024
5edb9bf
unique name for delete untagged
gpmayorga Jul 9, 2024
d43b773
fix delete_untagged
gpmayorga Jul 9, 2024
ac4d669
move delete_untagged under workflows
gpmayorga Jul 9, 2024
acc6ff5
move delete untagged to manual runs
gpmayorga Jul 9, 2024
c4785b1
review bash syntax for wasm build
gpmayorga Jul 9, 2024
209167e
recover cache and limit sanity check build time
gpmayorga Jul 9, 2024
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
19 changes: 11 additions & 8 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
# Benchmark (with cache hit)
# ubuntu-latest 50 min
# ubuntu-latest-4-cores 34 min
runs-on: ubuntu-latest-4-cores
runs-on: ubuntu-latest-4-cores
strategy:
matrix:
target: [build-runtime]
package: [altair-runtime, centrifuge-runtime, development-runtime]
target: [ build-runtime ]
package: [ altair-runtime, centrifuge-runtime, development-runtime ]
name: ${{ matrix.target }}-${{ matrix.package }}
steps:
# PREP
# PREP
- name: Check out code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b #4.1.4

Expand All @@ -42,12 +42,15 @@ jobs:
./target/srtool
cache-directories: ./runtime

# BUILD
# BUILD
- name: Run srtool # https://docs.substrate.io/reference/command-line-tools/srtool/
run: >
docker run --rm --user root --platform=linux/amd64
-e PACKAGE=${{ matrix.package }} -v /home/runner/.cargo:/cargo-home
-v ${{ github.workspace }}:/build paritytech/srtool:1.75.0-0.14.0
docker run --rm --user root --platform=linux/amd64 \
-e PACKAGE=${{ matrix.package }} \
-e BUILD_OPTS="on-chain-release-build" \
-v /home/runner/.cargo:/cargo-home \
-v ${{ github.workspace }}:/build \
paritytech/srtool:1.77.0-0.15.0 \
/srtool/build --app

# Alternative way of running SRTool that allows for "script-like" execution,
Expand Down
560 changes: 280 additions & 280 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 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.12.0"
version = "0.13.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a major version instead of 0.12.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's something I battled with internally myself. I thought this would be cleaner because v0.12.0 was related to enabling OpenGov on Altair.

Since this enables the metadata hash check, I think it deserves its major version. For similar releases in the future, I will take the minor version approach then since you seem to prefer that as well.


[workspace.dependencies]
hex-literal = { version = "0.4.1" }
Expand Down
4 changes: 2 additions & 2 deletions runtime/altair/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("altair"),
impl_name: create_runtime_str!("altair"),
authoring_version: 1,
spec_version: 1200,
spec_version: 1300,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -2071,7 +2071,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
migrations::UpgradeAltair1200,
migrations::UpgradeAltair1300,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
60 changes: 1 addition & 59 deletions runtime/altair/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,64 +10,6 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

use cfg_primitives::AccountId;
use sp_core::parameter_types;

use crate::{ForeignInvestments, OraclePriceCollection, OraclePriceFeed, OrderBook};

// Number of identities on Altair Chain on 30.05.2024 was 34
const IDENTITY_MIGRATION_KEY_LIMIT: u64 = 1000;

parameter_types! {
pub InitialTcMembers: sp_std::vec::Vec<AccountId> = sp_std::vec![
// Luis: 4ck67NuZLjvbMRijqsmHdRMbGbyq2CoD99urmawqvx73WUn4
AccountId::new(hex_literal::hex!("3e098bb449c1ab045c84e560c301a04ecd10660b7411b649047c8ca247115265")),
// Cosmin: 4dM5pHAuujs6HT63qpgCa7pMMhq9GpgevY8PSgsaXz6msuB6
AccountId::new(hex_literal::hex!("58ba2478321eb64560f7e8f1172e8f2b2ba6ea84ecb49efe277bf6228fb35c4b")),
// William: kAKWYPrsqdtdUbQx39xAnNjXJLdHniAbeb96vk1CnjapdVKVt
AccountId::new(hex_literal::hex!("684f4dc6a026ea82a6cb36de4330a1a44428bbe243fb7f26ccf6227b0d0ef054")),
// Frederik: kALk3JfT7QGy4ChQwoV3z45ARuWpgVBGQaRrqt97trG5KPxoy
AccountId::new(hex_literal::hex!("9ed70c707d596bb8687518884161377c2617402f69116ef0970ce0f547b1db5d")),
// Jeroen: kAJ4NgSQg6Jv8JQautnNoHmjt8EYw4Q1Z1G4LsK6bqStqHQyq
AccountId::new(hex_literal::hex!("281dfd3154a3ca796fd870e806fe4d1fa17844ba4b0c03ebae04b8e510b6012e")),
// Lucas: kAMMsuzRLaEgDppbvpcJp2hdCQhiyBTcdWZWFtq3ENrVhtuKg
AccountId::new(hex_literal::hex!("ba2c4540acac96a93e611ec4258ce05338434f12107d35f29783bbd2477dd20e")),
// Cassidy kAM4RNjEyJ1jZiMCA2onHwtLW8EoAtGCjYvNHCGEpvag5jeWF
AccountId::new(hex_literal::hex!("acdbc2ab1dd9274a5d0699a9b666d531b880aef033fd748e5e09522ac5896010"))
];
}

/// The migration set for Altair @ Kusama.
/// It includes all the migrations that have to be applied on that chain.
pub type UpgradeAltair1200 = (
runtime_common::migrations::increase_storage_version::Migration<OraclePriceFeed, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<OraclePriceCollection, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<OrderBook, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<ForeignInvestments, 0, 1>,
pallet_collator_selection::migration::v1::MigrateToV1<crate::Runtime>,
pallet_collator_selection::migration::v2::MigrationToV2<crate::Runtime>,
runtime_common::migrations::loans::AddWithLinearPricing<crate::Runtime>,
// As of May 2024, the `pallet_balances::Hold` storage was empty. But better be safe.
runtime_common::migrations::hold_reason::MigrateTransferAllowListHolds<
crate::Runtime,
crate::RuntimeHoldReason,
>,
// Migrations below this comment originate from Polkadot SDK
pallet_xcm::migration::MigrateToLatestXcmVersion<crate::Runtime>,
cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4<crate::Runtime>,
pallet_identity::migration::versioned::V0ToV1<crate::Runtime, IDENTITY_MIGRATION_KEY_LIMIT>,
pallet_uniques::migration::MigrateV0ToV1<crate::Runtime, ()>,
// Initialize OpenGov TechnicalCommittee
runtime_common::migrations::technical_comittee::InitMigration<crate::Runtime, InitialTcMembers>,
runtime_common::migrations::increase_storage_version::Migration<crate::Referenda, 0, 1>,
runtime_common::migrations::increase_storage_version::Migration<
crate::TechnicalCommittee,
0,
4,
>,
runtime_common::migrations::increase_storage_version::Migration<
crate::TechnicalCommitteeMembership,
0,
4,
>,
);
pub type UpgradeAltair1300 = ();
4 changes: 2 additions & 2 deletions runtime/centrifuge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("centrifuge"),
impl_name: create_runtime_str!("centrifuge"),
authoring_version: 1,
spec_version: 1200,
spec_version: 1300,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -2082,7 +2082,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
migrations::UpgradeCentrifuge1200,
migrations::UpgradeCentrifuge1300,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
2 changes: 1 addition & 1 deletion runtime/centrifuge/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

/// The migration set for Centrifuge @ Polkadot.
/// It includes all the migrations that have to be applied on that chain.
pub type UpgradeCentrifuge1200 = ();
pub type UpgradeCentrifuge1300 = ();
4 changes: 2 additions & 2 deletions runtime/development/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("centrifuge-devel"),
impl_name: create_runtime_str!("centrifuge-devel"),
authoring_version: 1,
spec_version: 1200,
spec_version: 1300,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -2171,7 +2171,7 @@ pub type Executive = frame_executive::Executive<
frame_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
crate::migrations::UpgradeDevelopment1200,
crate::migrations::UpgradeDevelopment1300,
>;

// Frame Order in this block dictates the index of each one in the metadata
Expand Down
2 changes: 1 addition & 1 deletion runtime/development/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parameter_types! {

/// The migration set for Development & Demo.
/// It includes all the migrations that have to be applied on that chain.
pub type UpgradeDevelopment1200 = (
pub type UpgradeDevelopment1300 = (
// Initialize OpenGov Technical Committee with Alice
runtime_common::migrations::technical_comittee::InitMigration<crate::Runtime, InitialTcMembers>,
runtime_common::migrations::increase_storage_version::Migration<crate::Referenda, 0, 1>,
Comment on lines 25 to 27
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: Still needed because we haven't upgraded Dev and Demo to 1200.

Expand Down
Loading