All Questions
Tagged with offchain-worker offchain
17 questions
0
votes
1
answer
21
views
Why Off-chain worker does not deduct DispatchError in Substrate?
I am trying Substrate official off-chain example. I am throwing a DispatchError in my extrinsic.
#[pallet::call_index(0)]
#[pallet::weight({0})]
pub fn submit_price(origin: OriginFor&...
0
votes
0
answers
18
views
Not able to submit multiple signed transactions through off-chain worker
I have to submit 2 signed extrinsics through off-chain worker. The code structure of my off-chain worker is like this:
fn offchain_worker(block_number: BlockNumberFor<T>) {
if !...
0
votes
0
answers
25
views
Is there e2e testing framework/example for Substrate solo chain?
I am working on a live solo chain. I have to test a scenario where I want to hit HTTP API through off chain-worker. Unfortunately it's not possible to test in mock environment.
We can take an example ...
4
votes
1
answer
54
views
Is there a way to use a crate that depends on the `std` in substrate OCW?
from what I've learned so far, the OCW is designed specifically for executing heavy and time-consuming computations outside of the runtime. As the OCW is not a part of runtime/wasm, I guess the OCW ...
0
votes
0
answers
27
views
How to send HTTP POST request using Substrate Offchain worker
I am using Substrate official example to send HTTP POST request, which is mentioned here https://docs.substrate.io/reference/how-to-guides/offchain-workers/offchain-http-requests/#read-and-submit-the-...
2
votes
1
answer
170
views
How can I create OCW that won't activates every block, but will activates only when I call function that it represents?
I wanna create OCW that will send a http request to the API and get the response and use this response in runtime code to call extrinsic with this data. This OCW should triggers only when I want to ...
3
votes
1
answer
92
views
Offchain indexing storage overwrites during forks
We are using offchain indexing to store some value that will be read in offchain worker .
The keys that we are using to store data via offchain indexing is as following:
key = some_prefix + ...
0
votes
0
answers
66
views
How to execute smart contract from offchain-worker?
Would it be possible to execute smart contract call from an offchain-worker, either using ink! or pallet-contracts?
Can someone please help me to provide the solution? is there any example?
4
votes
1
answer
134
views
Facing issue in adding offchain worker
I'm using pow substrate chain.
I'm running 3 validators by using these commands:
For bob
./target/release/node-template \
--base-path /tmp/bob \
--chain local \
--bob \
--port 30335 \
--rpc-port 9944 \...
1
vote
0
answers
32
views
offchain worker choose key to sign and send
I have multiple keys in my node storage with offchain worker running, there are currently 2 ways to sign and send transactions, it is done either for all of the keys stored locally, or 1 unspecified ...
1
vote
1
answer
86
views
How to use Offchain Workers to create HTTP POST requests with JSON-RPC body?
Too my knowledge there are no guides on how to write HTTP POST requests to a JSON-RPC API with http utilities that are available to Substrate offchain workers. What I understand currently is that the ...
2
votes
1
answer
97
views
AccountId in offchain worker
I'm working on Substrate based project. In the project, each blockchain validator has an offchain worker. author_insertKey() is used to set up a key so the offchain worker can sign transactions. Each ...
4
votes
2
answers
213
views
Read a value from offchain storage of a node
I want to read a single value from OffchainStorage of a live substrate node. Is it possible? Assume I can not use localStorageGet rpc request because it is an unsafe rpc.
0
votes
1
answer
62
views
How to enable off-chain workers for parachain via command line?
There is no any logs and off-chain workers does not work by default.
How to specify to enable workers for parachain via command?
0
votes
0
answers
75
views
offchain indexing for large files
I'm new to the project and currently working on a pallet, which is supposed to deal with large files offchain. Pallet, offchain indexing and the offchain worker are all working fine, still I get "...
2
votes
1
answer
119
views
Working up-to-date complete source code for offchain workers?
Hello Substrate community
I've been trying to integrate an offchain worker capable of API calls on top of an existing Substrate cluster of 3 nodes I already have up and running successfully (based on ...
5
votes
2
answers
132
views
How to avoid multiple OCWs duplicating work?
We are running 2 OCWs each in separate instances and we have an extrinsic which mutates a storage in runtime which is done twice from the 2 OCWs but we want only one OCW to sign. How to do that?
For ...