-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for metadata hash verification. (#494)
* add frame metadata hash signed extra * unrelated, add foucoco paseo genesis spec and wasm * Add `metadata-hash` feature to pendulum-node * Revert "Add `metadata-hash` feature to pendulum-node" This reverts commit d87aa44. --------- Co-authored-by: Marcel Ebert <[email protected]>
- Loading branch information
Showing
13 changed files
with
4,153 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
use substrate_wasm_builder::WasmBuilder; | ||
|
||
#[cfg(all(feature = "std", not(feature = "metadata-hash")))] | ||
fn main() { | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.export_heap_base() | ||
.import_memory() | ||
.build() | ||
} | ||
#[cfg(all(feature = "std", feature = "metadata-hash"))] | ||
fn main() { | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.export_heap_base() | ||
.import_memory() | ||
.enable_metadata_hash("AMPE", 12) | ||
.build(); | ||
} | ||
|
||
#[cfg(not(feature = "std"))] | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
use substrate_wasm_builder::WasmBuilder; | ||
|
||
#[cfg(all(feature = "std", not(feature = "metadata-hash")))] | ||
fn main() { | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.export_heap_base() | ||
.import_memory() | ||
.build() | ||
} | ||
#[cfg(all(feature = "std", feature = "metadata-hash"))] | ||
fn main() { | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.export_heap_base() | ||
.import_memory() | ||
.enable_metadata_hash("AMPE", 12) | ||
.build(); | ||
} | ||
|
||
#[cfg(not(feature = "std"))] | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
use substrate_wasm_builder::WasmBuilder; | ||
|
||
#[cfg(all(feature = "std", not(feature = "metadata-hash")))] | ||
fn main() { | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.export_heap_base() | ||
.import_memory() | ||
.build() | ||
} | ||
#[cfg(all(feature = "std", feature = "metadata-hash"))] | ||
fn main() { | ||
WasmBuilder::new() | ||
.with_current_project() | ||
.export_heap_base() | ||
.import_memory() | ||
.enable_metadata_hash("PEN", 12) | ||
.build(); | ||
} | ||
|
||
#[cfg(not(feature = "std"))] | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters