Skip to content

Commit

Permalink
Merge pull request #2 from paritytech/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
Daanvdplas authored Jun 15, 2024
2 parents a91e7b1 + ae0b3bf commit 8b40574
Show file tree
Hide file tree
Showing 202 changed files with 3,287 additions and 2,733 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
12 changes: 12 additions & 0 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion bridges/modules/messages/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ impl frame_system::Config for TestRuntime {

#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for TestRuntime {
type ReserveIdentifier = [u8; 8];
type AccountStore = System;
}

Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/relayers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub mod pallet {
/// The overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
/// Type of relayer reward.
type Reward: AtLeast32BitUnsigned + Copy + Parameter + MaxEncodedLen;
type Reward: AtLeast32BitUnsigned + Copy + Member + Parameter + MaxEncodedLen;
/// Pay rewards scheme.
type PaymentProcedure: PaymentProcedure<Self::AccountId, Self::Reward>;
/// Stake and slash scheme.
Expand Down
4 changes: 2 additions & 2 deletions bridges/primitives/relayers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ pub struct RelayerRewardsKeyProvider<AccountId, Reward>(PhantomData<(AccountId,

impl<AccountId, Reward> StorageDoubleMapKeyProvider for RelayerRewardsKeyProvider<AccountId, Reward>
where
AccountId: Codec + EncodeLike,
Reward: Codec + EncodeLike,
AccountId: 'static + Codec + EncodeLike + Send + Sync,
Reward: 'static + Codec + EncodeLike + Send + Sync,
{
const MAP_NAME: &'static str = "RelayerRewards";

Expand Down
10 changes: 5 additions & 5 deletions bridges/primitives/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ pub trait StorageMapKeyProvider {
/// The same as `StorageMap::Hasher1`.
type Hasher: StorageHasher;
/// The same as `StorageMap::Key1`.
type Key: FullCodec;
type Key: FullCodec + Send + Sync;
/// The same as `StorageMap::Value`.
type Value: FullCodec;
type Value: 'static + FullCodec;

/// This is a copy of the
/// `frame_support::storage::generator::StorageMap::storage_map_final_key`.
Expand All @@ -277,13 +277,13 @@ pub trait StorageDoubleMapKeyProvider {
/// The same as `StorageDoubleMap::Hasher1`.
type Hasher1: StorageHasher;
/// The same as `StorageDoubleMap::Key1`.
type Key1: FullCodec;
type Key1: FullCodec + Send + Sync;
/// The same as `StorageDoubleMap::Hasher2`.
type Hasher2: StorageHasher;
/// The same as `StorageDoubleMap::Key2`.
type Key2: FullCodec;
type Key2: FullCodec + Send + Sync;
/// The same as `StorageDoubleMap::Value`.
type Value: FullCodec;
type Value: 'static + FullCodec;

/// This is a copy of the
/// `frame_support::storage::generator::StorageDoubleMap::storage_double_map_final_key`.
Expand Down
1 change: 1 addition & 0 deletions bridges/relays/client-substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rand = "0.8.5"
scale-info = { version = "2.11.1", features = ["derive"] }
tokio = { version = "1.37", features = ["rt-multi-thread"] }
thiserror = { workspace = true }
quick_cache = "0.3"

# Bridge dependencies

Expand Down
3 changes: 3 additions & 0 deletions bridges/relays/client-substrate/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ use sp_runtime::{
};
use std::{fmt::Debug, time::Duration};

/// Signed block type of given chain.
pub type SignedBlockOf<C> = <C as Chain>::SignedBlock;

/// Substrate-based chain from minimal relay-client point of view.
pub trait Chain: ChainBase + Clone {
/// Chain name.
Expand Down
Loading

0 comments on commit 8b40574

Please sign in to comment.