Skip to content

Commit

Permalink
feat(lib/runtime): remove runtime type reflection in host module func…
Browse files Browse the repository at this point in the history
…tion definitions (with Generics) (#3962)

Co-authored-by: EclesioMeloJunior <[email protected]>
  • Loading branch information
ec2 and EclesioMeloJunior authored Jun 13, 2024
1 parent 72a8704 commit f1f9b83
Show file tree
Hide file tree
Showing 3 changed files with 419 additions and 325 deletions.
6 changes: 3 additions & 3 deletions lib/runtime/wazero/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,12 @@ func ext_crypto_sr25519_verify_version_2(ctx context.Context, m api.Module, sig
return 1
}

func ext_crypto_start_batch_verify_version_1(ctx context.Context, m api.Module) {
func ext_crypto_start_batch_verify_version_1(_ context.Context, _ api.Module) {
// TODO: fix and re-enable signature verification (#1405)
// beginBatchVerify(context)
}

func ext_crypto_finish_batch_verify_version_1(_ context.Context) uint32 {
func ext_crypto_finish_batch_verify_version_1(_ context.Context, _ api.Module) uint32 {
// TODO: fix and re-enable signature verification (#1405)
// return finishBatchVerify(context)
return 1
Expand Down Expand Up @@ -1831,7 +1831,7 @@ func ext_offchain_random_seed_version_1(ctx context.Context, m api.Module) uint3
}

// TODO Investigate via https://github.com/ChainSafe/gossamer/issues/3986
func ext_offchain_submit_transaction_version_1(ctx context.Context, m api.Module, data uint64) uint64 { //nolint
func ext_offchain_submit_transaction_version_1(ctx context.Context, m api.Module, data uint64) uint64 {
rtCtx := ctx.Value(runtimeContextKey).(*runtime.Context)
if rtCtx == nil {
panic("nil runtime context")
Expand Down
Loading

0 comments on commit f1f9b83

Please sign in to comment.