Skip to content

Commit

Permalink
update copyright year
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Jan 8, 2025
1 parent 53b62ae commit f5a6381
Show file tree
Hide file tree
Showing 43 changed files with 56 additions and 98 deletions.
2 changes: 1 addition & 1 deletion modules/consensus/grandpa/primitives/src/justification.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/consensus/grandpa/primitives/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
4 changes: 2 additions & 2 deletions modules/consensus/grandpa/verifier/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -125,7 +125,7 @@ where
for (hash, proof) in parachain_headers {
if finalized_hashes.binary_search(&hash).is_err() {
// seems relay hash isn't in the finalized chain.
continue
continue;
}
let relay_chain_header =
headers.header(&hash).expect("Headers have been checked by AncestryChain; qed");
Expand Down
12 changes: 6 additions & 6 deletions modules/consensus/sync-committee/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ Consists of the various proof generations for the ethereum beacon chain structs/
- Sync committee update

## verifier
This exports a single function for verifying ethereum's sync committee attestation.
This exports a single function for verifying ethereum's sync committee attestation.


# Major Depedencies
The major dependencies for this SDK/Library are:

- [ssz-rs](https://github.com/ralexstokes/ssz-rs)
- [ssz-rs](https://github.com/ralexstokes/ssz-rs)
- [ethereum-consensus](https://github.com/ralexstokes/ethereum-consensus)


# Running the prover tests
**NOTE**
1. To run these tests make sure the latest fork version on your devnet is the BELLATRIX_FORK_VERSION as defined in the mainnet config
2. Modify `sync_committee_primitives::types::GENESIS_ROOT_VALIDATORS` defined under the testing
1. To run these tests make sure the latest fork version on your devnet is the BELLATRIX_FORK_VERSION as defined in the mainnet config
2. Modify `sync_committee_primitives::types::GENESIS_ROOT_VALIDATORS` defined under the testing
feature flag to match the one that is present in the devnet you are running the tests with
3. Make sure the SLOTS_PER_EPOCH is set to 32 in your devnet.
3. Make sure the SLOTS_PER_EPOCH is set to 32 in your devnet.


## License
This library is licensed under the [Apache 2.0 License](./LICENSE), Copyright (c) 2024 Polytope Labs.
This library is licensed under the [Apache 2.0 License](./LICENSE), Copyright (c) 2025 Polytope Labs.
6 changes: 3 additions & 3 deletions modules/ismp/clients/grandpa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ The Pallet allows the [`AdminOrigin`](https://docs.rs/pallet-ismp/latest/pallet_
## Setting up

When using this consensus client the following should be done in order:

- Create the consensus state using [`create_consensus_client`](https://docs.rs/pallet-ismp/latest/pallet_ismp/pallet/dispatchables/fn.create_consensus_client.html)

- The supported state machine identifiers should be whitelisted in the pallet by calling `add_state_machines` from the [`AdminOrigin`].</br>

## Note

If a state machine identifier is not found in the whitelist, ismp datagrams from that chain will be rejected.
Expand All @@ -27,4 +27,4 @@ If a state machine identifier is not found in the whitelist, ismp datagrams from

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/ismp/clients/grandpa/src/benchmarking.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/clients/grandpa/src/consensus.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/clients/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/clients/grandpa/src/messages.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/ismp/clients/parachain/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ The Pallet allows the [`AdminOrigin`](https://docs.rs/pallet-ismp/latest/pallet_

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
4 changes: 2 additions & 2 deletions modules/ismp/clients/parachain/inherent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ fn start_consensus(
..Default::default()
// omitted fields
};
// ..omitted calls
}
```


## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/ismp/clients/parachain/runtime-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ impl_runtime_apis! {

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/ismp/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ This repo provides an implementation of the neccessary components laid out in th

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/ismp/state-machines/substrate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ The [`StateMachineClient`](https://docs.rs/ismp/latest/ismp/consensus/trait.Stat

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/pallets/demo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 1 addition & 2 deletions modules/pallets/hyperbridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@ impl IsmpRouter for ModuleRouter {

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.

This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/pallets/ismp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ impl IsmpModule for YourModule {

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/pallets/ismp/rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ pub fn create_full<C, P>(

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/pallets/ismp/rpc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/runtime-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ sp_api::impl_runtime_apis! {

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/pallets/ismp/runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/child_trie.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/dispatcher.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/events.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/host.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
42 changes: 1 addition & 41 deletions modules/pallets/ismp/src/impls.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -34,46 +34,6 @@ use ismp::{
use sp_core::{offchain::StorageKind, H256};

impl<T: Config> Pallet<T> {
/// Generate an MMR proof for the given `leaf_indices`.
/// Note this method can only be used from an off-chain context
/// (Offchain Worker or Runtime API call), since it requires
/// all the leaves to be present.
/// It may return an error or panic if used incorrectly.
pub fn generate_proof(
keys: ProofKeys,
) -> Result<(Vec<Leaf>, Proof<H256>), sp_mmr_primitives::Error> {
let leaf_indices_and_positions = match keys {
ProofKeys::Requests(commitments) => commitments
.into_iter()
.map(|commitment| {
let val = RequestCommitments::<T>::get(commitment)
.ok_or_else(|| sp_mmr_primitives::Error::LeafNotFound)?
.offchain;
Ok(val)
})
.collect::<Result<Vec<_>, _>>()?,
ProofKeys::Responses(commitments) => commitments
.into_iter()
.map(|commitment| {
let val = ResponseCommitments::<T>::get(commitment)
.ok_or_else(|| sp_mmr_primitives::Error::LeafNotFound)?
.offchain;
Ok(val)
})
.collect::<Result<Vec<_>, _>>()?,
};
let indices =
leaf_indices_and_positions.iter().map(|val| val.leaf_index).collect::<Vec<_>>();
let (leaves, proof) = T::OffchainDB::proof(indices)?;
let proof = Proof {
leaf_indices_and_pos: leaf_indices_and_positions,
leaf_count: proof.leaf_count,
items: proof.items,
};

Ok((leaves, proof))
}

/// Execute the provided ISMP datagrams, this will short circuit if any messages are invalid.
pub fn execute(messages: Vec<Message>) -> DispatchResultWithPostInfo {
// Define a host
Expand Down
3 changes: 1 addition & 2 deletions modules/pallets/ismp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -245,7 +245,6 @@ pub mod pallet {

let child_trie_root = H256::from_slice(&child_trie_root);
ChildTrieRoot::<T>::put::<T::Hash>(child_trie_root.into());
// Only finalize if mmr was modified
let root = match T::OffchainDB::finalize() {
Ok(root) => root,
Err(e) => {
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/offchain.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/ismp/src/weights.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/mmr/rpc/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/testsuite/src/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/testsuite/src/tests/pallet_fishermen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/testsuite/src/tests/pallet_hyperbridge.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/testsuite/src/tests/pallet_ismp.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion modules/pallets/testsuite/src/tests/pallet_ismp_relayer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2024 Polytope Labs.
// Copyright (c) 2025 Polytope Labs.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
10 changes: 5 additions & 5 deletions modules/pallets/token-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ismp::router::IsmpRouter;
parameter_types! {
// A constant that should represent the native asset id
pub const NativeAssetId: u32 = 0;
pub const NativeAssetId: u32 = 0;
// Set the correct precision for the native currency
pub const Decimals: u8 = 12;
}
Expand All @@ -35,7 +35,7 @@ impl Get<AccountId> for AssetAdmin {
impl pallet_token_gateway::Config for Runtime {
// configure the runtime event
type RuntimeEvent = RuntimeEvent;
// Pallet Ismp
// Pallet Ismp
type Dispatcher = Ismp;
// Pallet Assets
type Assets = Assets;
Expand Down Expand Up @@ -64,15 +64,15 @@ impl IsmpRouter for Router {
Ok(module)
}
}
```
```

## Setting up

The pallet requires some setting up before the teleport function is available for use in the runtime.

1. Register your native assets directly on `Hyperbridge` by dispatching `create_erc6160_asset`.
3. Set token gateway addresses for the EVM chains of interest by dispatching the `set_token_gateway_addresses` extrinsic. These addresses are used to validate incoming messages.


## Dispatchable Functions

Expand All @@ -83,4 +83,4 @@ The pallet requires some setting up before the teleport function is available fo

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/pallets/token-gateway/primitives/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ A collection of types used by token gateway

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
2 changes: 1 addition & 1 deletion modules/trees/ethereum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ This library also supports `no_std`, simply add `default-features = false` to th

## License

This library is licensed under the Apache 2.0 License, Copyright (c) 2024 Polytope Labs.
This library is licensed under the Apache 2.0 License, Copyright (c) 2025 Polytope Labs.
Loading

0 comments on commit f5a6381

Please sign in to comment.