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

Revert "feat: 🎸 add metadata-hash-extension" #1268

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
87 changes: 13 additions & 74 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ cumulus-primitives-utility = { version = "0.8.0", default-featur
cumulus-test-relay-sproof-builder = { version = "0.8.0", default-features = false }
frame-benchmarking = { version = "29.0.0", default-features = false }
frame-executive = { version = "29.0.0", default-features = false }
frame-metadata-hash-extension = { version = "0.1.0", default-features = false }
frame-support = { version = "29.0.0", default-features = false }
frame-system = { version = "29.0.0", default-features = false }
frame-system-benchmarking = { version = "29.0.0", default-features = false }
Expand Down Expand Up @@ -265,7 +264,7 @@ sp-rpc = { version = "27.0.0" }
substrate-build-script-utils = { version = "11.0.0" }
substrate-frame-rpc-system = { version = "29.0.0" }
substrate-prometheus-endpoint = { version = "0.17.0" }
substrate-wasm-builder = { version = "18.0.1" }
substrate-wasm-builder = { version = "18.0.0" }
try-runtime-cli = { version = "0.39.0" }
xcm-emulator = { version = "0.6.0" }
xcm-simulator = { version = "8.0.0" }
Expand Down
6 changes: 1 addition & 5 deletions runtime/bifrost-kusama/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ serde_json = { workspace = true }
# frame dependencies
frame-benchmarking = { workspace = true, optional = true }
frame-executive = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
frame-support = { workspace = true, features = ["tuples-96"] }
frame-system = { workspace = true }
frame-system-benchmarking = { workspace = true, optional = true }
Expand Down Expand Up @@ -160,7 +159,6 @@ std = [

"frame-benchmarking?/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
Expand Down Expand Up @@ -399,8 +397,6 @@ try-runtime = [
"bifrost-channel-commission/try-runtime",
]

# Enable the metadata hash generation in the wasm builder.
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
# When enabled, the runtime API will not be build.
#
# This is required by Cumulus to access certain types of the
Expand All @@ -411,7 +407,7 @@ disable-runtime-api = []
# A feature that should be enabled when the runtime should be build for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["sp-api/disable-logging"]

# Set timing constants (e.g. session period) to faster versions to speed up testing.
fast-runtime = []
12 changes: 1 addition & 11 deletions runtime/bifrost-kusama/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

#[cfg(all(feature = "metadata-hash", feature = "std"))]
fn main() {
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.enable_metadata_hash("BNC", 12)
.build()
}

#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
#[cfg(feature = "std")]
fn main() {
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
Expand Down
2 changes: 0 additions & 2 deletions runtime/bifrost-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,6 @@ where
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
frame_metadata_hash_extension::CheckMetadataHash::<Runtime>::new(true),
);
let raw_payload = SignedPayload::new(call, extra)
.map_err(|e| {
Expand Down Expand Up @@ -2031,7 +2030,6 @@ pub type SignedExtra = (
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down
6 changes: 1 addition & 5 deletions runtime/bifrost-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ serde_json = { workspace = true }
# frame dependencies
frame-benchmarking = { workspace = true, optional = true }
frame-executive = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
frame-support = { workspace = true, features = ["tuples-96"] }
frame-system = { workspace = true }
frame-system-benchmarking = { workspace = true, optional = true }
Expand Down Expand Up @@ -157,7 +156,6 @@ std = [
"strum/std",

"frame-executive/std",
"frame-metadata-hash-extension/std",
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
Expand Down Expand Up @@ -374,8 +372,6 @@ try-runtime = [
"zenlink-protocol/try-runtime",
]

# Enable the metadata hash generation in the wasm builder.
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
# When enabled, the runtime API will not be build.
#
# This is required by Cumulus to access certain types of the
Expand All @@ -386,7 +382,7 @@ disable-runtime-api = []
# A feature that should be enabled when the runtime should be build for on-chain
# deployment. This will disable stuff that shouldn't be part of the on-chain wasm
# to make it smaller like logging for example.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["sp-api/disable-logging"]

# Set timing constants (e.g. session period) to faster versions to speed up testing.
fast-runtime = []
12 changes: 1 addition & 11 deletions runtime/bifrost-polkadot/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#[cfg(all(feature = "metadata-hash", feature = "std"))]
fn main() {
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
.enable_metadata_hash("BNC", 12)
.build()
}

#[cfg(all(not(feature = "metadata-hash"), feature = "std"))]
#[cfg(feature = "std")]
fn main() {
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
Expand Down
1 change: 0 additions & 1 deletion runtime/bifrost-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1864,7 +1864,6 @@ pub type SignedExtra = (
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down