Skip to content

Commit 81e7773

Browse files
Merge pull request #559 from Cerebellum-Network/fix_metedata_issue
Fix `CheckMetaDataExtension` issue
2 parents 85f77d5 + 743ff21 commit 81e7773

File tree

11 files changed

+121
-23
lines changed

11 files changed

+121
-23
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- [C] Changes is `Cere` Runtime
1111
- [D] Changes is `Cere Dev` Runtime
1212

13+
## [7.3.3]
14+
15+
- [C,D] Fix `CheckMetadataHash` extension issue
16+
-
1317
## [7.3.2]
1418

1519
- [C] Update Hyperbridge Coprocessor for Mainnet.

Cargo.lock

Lines changed: 70 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace.package]
2-
version = "7.3.1"
2+
version = "7.3.2"
33
authors = ["Cerebellum-Network"]
44
edition = "2021"
55
homepage = "https://cere.network/"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ENV \
5151
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
5252
export PATH=$PATH:$HOME/.cargo/bin && \
5353
scripts/init.sh && \
54-
cargo build --$PROFILE
54+
cargo build --$PROFILE --features on-chain-release-build
5555

5656
# ===== SECOND STAGE ======
5757
FROM phusion/baseimage:jammy-1.0.1

runtime/cere-dev/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,3 +323,11 @@ try-runtime = [
323323
"ismp-grandpa/try-runtime",
324324
"pallet-token-gateway/try-runtime",
325325
]
326+
327+
# Enable the metadata hash generation in the wasm builder.
328+
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
329+
330+
# A feature that should be enabled when the runtime should be built for on-chain
331+
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
332+
# to make it smaller, like logging for example.
333+
on-chain-release-build = ["metadata-hash"]

runtime/cere-dev/build.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18+
#[cfg(all(feature = "std", feature = "metadata-hash"))]
19+
fn main() {
20+
substrate_wasm_builder::WasmBuilder::init_with_defaults()
21+
.enable_metadata_hash("CERE", 10)
22+
.build();
23+
}
24+
25+
#[cfg(all(feature = "std", not(feature = "metadata-hash")))]
1826
fn main() {
1927
substrate_wasm_builder::WasmBuilder::build_using_defaults();
2028
}
29+
30+
/// The wasm builder is deactivated when compiling
31+
/// this crate for wasm to speed up the compilation.
32+
#[cfg(not(feature = "std"))]
33+
fn main() {}

runtime/cere-dev/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
163163
// and set impl_version to 0. If only runtime
164164
// implementation changes and behavior does not, then leave spec_version as
165165
// is and increment impl_version.
166-
spec_version: 73103,
166+
spec_version: 73104,
167167
impl_version: 0,
168168
apis: RUNTIME_API_VERSIONS,
169169
transaction_version: 24,

runtime/cere/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,11 @@ try-runtime = [
321321
"ismp-grandpa/try-runtime",
322322
"pallet-token-gateway/try-runtime",
323323
]
324+
325+
# Enable the metadata hash generation in the wasm builder.
326+
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
327+
328+
# A feature that should be enabled when the runtime should be built for on-chain
329+
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
330+
# to make it smaller, like logging for example.
331+
on-chain-release-build = ["metadata-hash"]

runtime/cere/build.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18+
#[cfg(all(feature = "std", feature = "metadata-hash"))]
19+
fn main() {
20+
substrate_wasm_builder::WasmBuilder::init_with_defaults()
21+
.enable_metadata_hash("CERE", 10)
22+
.build();
23+
}
24+
25+
#[cfg(all(feature = "std", not(feature = "metadata-hash")))]
1826
fn main() {
1927
substrate_wasm_builder::WasmBuilder::build_using_defaults();
2028
}
29+
30+
/// The wasm builder is deactivated when compiling
31+
/// this crate for wasm to speed up the compilation.
32+
#[cfg(not(feature = "std"))]
33+
fn main() {}

runtime/cere/src/hyperbridge_ismp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use super::*;
99

1010
parameter_types! {
1111
// The hyperbridge parachain on Polkadot
12-
pub const Coprocessor: Option<StateMachine> = Some(StateMachine::Polkadot(3367));
12+
pub const Coprocessor: Option<StateMachine> = Some(StateMachine::Kusama(4009));
1313
// The host state machine of this pallet, this must be unique to all every solochain
1414
pub const HostStateMachine: StateMachine = StateMachine::Substrate(*b"cere"); // your unique chain id here
1515
}

runtime/cere/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
158158
// and set impl_version to 0. If only runtime
159159
// implementation changes and behavior does not, then leave spec_version as
160160
// is and increment impl_version.
161-
spec_version: 73103,
161+
spec_version: 73104,
162162
impl_version: 0,
163163
apis: RUNTIME_API_VERSIONS,
164164
transaction_version: 24,

0 commit comments

Comments
 (0)