Questions tagged [host-functions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

`sp_io::crypto::ed25519_batch_verify` was removed amid Polkadot 0.9.39 and 0.9.43. What is replacement in Runtime?

We useded25519_batch_verify in runtime from sp_io::crypto mod. sp_io::Crypto and Verify traits require self, but I cannot find implementation. In substrate primitives core I see verify calling fn ...
Dzmitry Lahoda's user avatar
0 votes
0 answers
20 views

Can a Substrate Runtime bulk-read many storage keys at once?

This question is about the Substrate host functions and storage implementation and is not specific to FRAME (although relevant FRAME-related information is welcome). Imagine that the runtime knows it ...
JoshOrndorff's user avatar
  • 1,007
2 votes
0 answers
51 views

Why Hosts set storage information directly and not through the Runtime

Why Host set storage information directly and not through the Runtime api? (e.g. Grandpa Authorities, Accounts, Code, Heap_Pages) Is this an expected behavior or legacy?
user2862's user avatar
  • 189
2 votes
2 answers
76 views

Calling std-based host function from a pallet

Based on: Use std only rust library to extend substrate runtime interface? How to understand [runtime-interface] and `Externalities`? I understand that I should be able to: have a crate that is not ...
pmikolajczyk41's user avatar
0 votes
0 answers
35 views

runtime requires function imports which are not present on the host: 'env:_critical_section_1_0_acquire', 'env:_critical_section_1_0_release'

I wanted to add a runtime interface, which can be simplified to the following: #[sp_runtime_interface::runtime_interface] pub trait Test { fn some_bytes() -> Vec<u8> { vec![] }...
nazar-pc's user avatar
  • 529
4 votes
2 answers
82 views

How to provide host functions and make it callable from pallets?

I'm trying to encapsulate some host functions so that I can call them in pallets. I use sp_runtime_interface::runtime_interface to declare a trait, give the default implementation in the declaration, ...
Brice's user avatar
  • 41
1 vote
1 answer
20 views

Is there a way to set a pallet configuration using a function that lives on the outer node?

I am aware that this should break consensus, as one may easily start a node with different params -> end up with a different wasm bytecode, and thus be on a different network. However, inspite of ...
b0zero's user avatar
  • 502
3 votes
0 answers
46 views

What is transaction indexing in externalities useful for?

For example, there's a FRAME pallet called Remark which does one thing: it allows storing data in externalities that can access the node's storage via a runtime interface. If integrated into a runtime,...
Sacha Lansky's user avatar
  • 2,570
2 votes
1 answer
58 views

How can I access a backend instance from a host function?

As given in the title, I would like to get access to an instance of the backend from a host function. When I say 'backend instance' here, I'm referring to this. I hope to call its offchain_storage(), ...
Justin Frevert's user avatar
2 votes
1 answer
130 views

How might we introduce a new host function into the Polkadot ecosystem?

Introducing new host functions means that all nodes must update to include it. In the future, some parachain teams may require some custom host functions for their needs. What would the approval ...
Sacha Lansky's user avatar
  • 2,570