Skip to content

Commit

Permalink
Merge branch 'master' into ddc-try-state-core-fellowship
Browse files Browse the repository at this point in the history
  • Loading branch information
Doordashcon authored Jun 17, 2024
2 parents 2131e3c + 7968909 commit 650da66
Show file tree
Hide file tree
Showing 285 changed files with 7,452 additions and 3,388 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/release-30_publish_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
binary: [ frame-omni-bencher, chain-spec-builder ]
# Tuples of [package, binary-name]
binary: [ [frame-omni-bencher, frame-omni-bencher], [staging-chain-spec-builder, chain-spec-builder] ]
steps:
- name: Checkout sources
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
Expand All @@ -41,21 +42,16 @@ jobs:
sudo apt update
sudo apt install -y protobuf-compiler
- name: Build ${{ matrix.binary }} binary
- name: Build ${{ matrix.binary[1] }} binary
run: |
if [[ ${{ matrix.binary }} =~ chain-spec-builder ]]; then
cargo build --locked --profile=production -p staging-${{ matrix.binary }} --bin ${{ matrix.binary }}
target/production/${{ matrix.binary }} -h
else
cargo build --locked --profile=production -p ${{ matrix.binary }}
target/production/${{ matrix.binary }} --version
fi
cargo build --locked --profile=production -p ${{ matrix.binary[0] }} --bin ${{ matrix.binary[1] }}
target/production/${{ matrix.binary[1] }} --version
- name: Upload ${{ matrix.binary }} binary
- name: Upload ${{ matrix.binary[1] }} binary
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: ${{ matrix.binary }}
path: target/production/${{ matrix.binary }}
name: ${{ matrix.binary[1] }}
path: target/production/${{ matrix.binary[1] }}


publish-release-draft:
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/release-clobber-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Clobber Stable

# This action implements the
# [Clobbering](https://github.com/paritytech/polkadot-sdk/blob/master/docs/RELEASE.md#clobbering)
# process from the release process. It pushes a new commit to the `stable` branch with all the
# current content of the `audited` tag. It does not use a merge commit, but rather 'clobbers' the
# branch with a single commit that contains all the changes. It has a naming scheme of `Clobber with
# audited ($COMMIT)`.
# Currently, the script is only triggered manually, but can be easily changed to a schedule.

on:
workflow_dispatch:

permissions:
contents: write

jobs:
clobber-stable:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
STABLE: stable
UNSTABLE: master
AUDITED: audited
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Prechecks
run: |
# Properly fetch
git fetch --prune --unshallow origin tag $AUDITED
git fetch origin $STABLE
# Sanity checks
git checkout -q tags/$AUDITED || (echo "Could not find the '$AUDITED' tag." && exit 1)
COMMIT=$(git rev-parse tags/$AUDITED)
#$(git branch --contains $COMMIT | grep -q $UNSTABLE) || (echo "The '$AUDITED' tag is not on the '$UNSTABLE' branch." && exit 1)
git config --global user.email "admin@parity.io"
git config --global user.name "Parity Release Team"
- name: Prepare commit
run: |
git checkout --quiet origin/$STABLE
# Delete all tracked files in the working directory
git ls-files -z | xargs -0 rm -f
# Find and delete any empty directories
find . -type d -empty -delete
git add . 1>/dev/null 2>/dev/null
git commit -qm "Delete all files"
# Grab the files from the commit
git checkout --quiet tags/$AUDITED -- .
# Stage, commit, and push the working directory which now matches 'audited' 1:1
git status
COMMIT=$(git rev-parse --short=10 tags/$AUDITED)
git add . 1>/dev/null 2>/dev/null
git commit --allow-empty --amend -qm "Clobber with $AUDITED ($COMMIT)"
- name: Push stable branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git log -3
git push --verbose origin HEAD:$STABLE
2 changes: 0 additions & 2 deletions .github/workflows/release-srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ env:

on:
push:
tags:
- "*"
branches:
- release-v[0-9]+.[0-9]+.[0-9]+*
- release-cumulus-v[0-9]+*
Expand Down
51 changes: 49 additions & 2 deletions Cargo.lock

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

21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ forks](https://img.shields.io/github/forks/paritytech/polkadot-sdk)
## 📚 Documentation

* [🦀 rust-docs](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html)
* [Introduction](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html)
to each component of the Polkadot SDK: Substrate, FRAME, Cumulus, and XCM
* [Introduction](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html)
to each component of the Polkadot SDK: Substrate, FRAME, Cumulus, and XCM
* [Guides](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/index.html),
namely how to build your first FRAME pallet.
* [Templates](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html)
for starting a new project.
* Other Resources:
* [Polkadot Wiki -> Build](https://wiki.polkadot.network/docs/build-guide)

Expand All @@ -39,6 +43,9 @@ The Polkadot-SDK has two release channels: `stable` and `nightly`. Production so
only use `stable`. `nightly` is meant for tinkerers to try out the latest features. The detailed
release process is described in [RELEASE.md](docs/RELEASE.md).

You can use [`psvm`](https://github.com/paritytech/psvm) to manage your Polkadot-SDK dependency
versions in downstream projects.

### 😌 Stable

`stable` releases have a support duration of **three months**. In this period, the release will not
Expand All @@ -50,6 +57,12 @@ non-breaking features on a **two week** cadence.
`nightly` releases are released every night from the `master` branch, potentially with breaking
changes. They have pre-release version numbers in the format `major.0.0-nightlyYYMMDD`.

## 🛠️ Tooling

[Polkadot SDK Version Manager](https://github.com/paritytech/psvm):
A simple tool to manage and update the Polkadot SDK dependencies in any Cargo.toml file.
It will automatically update the Polkadot SDK dependencies to their correct crates.io version.

## 🔐 Security

The security policy and procedures can be found in
Expand Down Expand Up @@ -81,7 +94,3 @@ fellowship, this separation, the RFC process
This repository is the amalgamation of 3 separate repositories that used to make up Polkadot SDK,
namely Substrate, Polkadot and Cumulus. Read more about the merge and its history
[here](https://polkadot-public.notion.site/Polkadot-SDK-FAQ-fbc4cecc2c46443fb37b9eeec2f0d85f).

## Other useful resources and tooling

* A simple tool to manage and update the Polkadot SDK dependencies (https://github.com/paritytech/psvm)
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ use sp_runtime::{
transaction_validity::{TransactionPriority, TransactionValidity, ValidTransactionBuilder},
};

// Re-export to avoid include tuplex dependency everywhere.
#[doc(hidden)]
pub mod __private {
pub use tuplex;
}

/// A duplication of the `FilterCall` trait.
///
/// We need this trait in order to be able to implement it for the messages pallet,
Expand Down Expand Up @@ -313,7 +319,7 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
info: &sp_runtime::traits::DispatchInfoOf<Self::Call>,
len: usize,
) -> Result<Self::Pre, sp_runtime::transaction_validity::TransactionValidityError> {
use tuplex::PushBack;
use $crate::extensions::check_obsolete_extension::__private::tuplex::PushBack;
let to_post_dispatch = ();
$(
let (from_validate, call_filter_validity) = <
Expand All @@ -336,7 +342,7 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
len: usize,
result: &sp_runtime::DispatchResult,
) -> Result<(), sp_runtime::transaction_validity::TransactionValidityError> {
use tuplex::PopFront;
use $crate::extensions::check_obsolete_extension::__private::tuplex::PopFront;
let Some((relayer, to_post_dispatch)) = to_post_dispatch else { return Ok(()) };
let has_failed = result.is_err();
$(
Expand Down
Loading

0 comments on commit 650da66

Please sign in to comment.