Questions tagged [host-functions]
The host-functions tag has no usage guidance.
10
questions
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 ...
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 ...
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?
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 ...
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![]
}...
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, ...
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 ...
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,...
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(), ...
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 ...