Skip to content

Add Missing Host APIs#1811

Merged
igor-egorov merged 11 commits intomasterfrom
feature/missing-apis
Sep 29, 2023
Merged

Add Missing Host APIs#1811
igor-egorov merged 11 commits intomasterfrom
feature/missing-apis

Conversation

@igor-egorov
Copy link
Copy Markdown
Contributor

Referenced issues

Resolves #1772

Description of the Change

Corrected implementation of:

ext_crypto_ecdsa_verify_prehashed_version_1
ext_crypto_ed25519_batch_verify_version_1
ext_crypto_sr25519_batch_verify_version_1
ext_crypto_ecdsa_verify_version_2

Added WAVM stubs for:

ext_benchmarking_add_to_whitelist_version_1
ext_benchmarking_commit_db_version_1
ext_benchmarking_current_time_version_1
ext_benchmarking_get_read_and_written_keys_version_1
ext_benchmarking_proof_size_version_1
ext_benchmarking_read_write_count_version_1
ext_benchmarking_reset_read_write_count_version_1
ext_benchmarking_set_whitelist_version_1
ext_benchmarking_wipe_db_version_1
ext_evm_ext_call_list_new_version_2
ext_evm_ext_evm_event_version_1
ext_evm_ext_gasometer_event_version_1
ext_evm_ext_runtime_event_version_1
ext_evm_ext_step_event_filter_version_1
ext_transaction_index_index_version_1

Usage Examples or Tests

wavm_module_init_test for testing local copies of runtimes

Igor Egorov and others added 9 commits August 23, 2023 10:45
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
Signed-off-by: Igor Egorov <igor@soramitsu.co.jp>
ecdsa_verify_prehashed

Signed-off-by: Igor Egorov <igor@qdrvm.io>
Signed-off-by: Igor Egorov <igor@qdrvm.io>
Signed-off-by: Igor Egorov <igor@qdrvm.io>
Signed-off-by: Igor Egorov <igor@qdrvm.io>
@igor-egorov igor-egorov enabled auto-merge (squash) September 22, 2023 08:14
@igor-egorov igor-egorov requested review from xDimon and removed request for Harrm September 26, 2023 08:35
Comment thread core/host_api/impl/crypto_extension.cpp Outdated

crypto::EcdsaPrehashedMessage digest;
std::copy(msg.begin(), msg.end(), digest.begin());
auto message =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid redundant copying here?

Comment on lines +6 to +7
#ifndef KAGOME_DUMMY_PRUNER_HPP
#define KAGOME_DUMMY_PRUNER_HPP
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed to replace include-guards by pragma-once while file changed. Lets do it for affected header-files.

"./kusama-para-code/";

constexpr std::string_view kRococoParachains[] = {
"01165a749e9bb0c9cdceec7745cdf2693fee68bce0a4de583488c4af5643bbdd.wasm",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to distribute this .wasm files as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Added parachain_runtimes/README.md and required scripts to produce those files locally on demand.

Comment thread test/core/runtime/wavm/CMakeLists.txt Outdated
offchain_worker_pool
runtime_properties_cache
logger_for_tests
) No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line at the end

Igor Egorov and others added 2 commits September 29, 2023 11:23
@igor-egorov igor-egorov requested a review from xDimon September 29, 2023 08:31
Comment on lines +329 to +330
// "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314.wasm",
// // zero size
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314.wasm",
// // zero size
// // zero size
// "03170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314.wasm",

Comment on lines +393 to +394
// "ae85d245a3d00bfde01f59f3c4fe0b4bfae1cb37e9cf91929eadcea4985711de.wasm",
// // zero size
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// "ae85d245a3d00bfde01f59f3c4fe0b4bfae1cb37e9cf91929eadcea4985711de.wasm",
// // zero size
// // zero size
// "ae85d245a3d00bfde01f59f3c4fe0b4bfae1cb37e9cf91929eadcea4985711de.wasm",

@igor-egorov igor-egorov merged commit 446ede8 into master Sep 29, 2023
@igor-egorov igor-egorov deleted the feature/missing-apis branch September 29, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Missing Host APIs

4 participants