Skip to main content

Questions tagged [offchain-worker]

Oracle-like capabilities for Substrate chains.

3 votes
0 answers
26 views

Access protected API from off-chain worker

Is it possible to access a protected API from an off-chain worker, e.g. using an API Key? Hard coding the API Key would be possible, but that's obviously a security risk. Is there a safe mechanism to ...
Ronin's user avatar
  • 189
2 votes
0 answers
84 views

How should I add offchain worker(OCW) in frontier when using AccountId20?

In order to add an offchain worker with using AccountId20 as the runtime account type I did following things. add associated type type AuthorityId: AppCrypto<Self::Public, Self::Signature>; in ...
xiao liang's user avatar
3 votes
1 answer
87 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 + ...
Aramik M's user avatar
  • 151
0 votes
0 answers
64 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?
Boleng's user avatar
  • 535
1 vote
0 answers
34 views

How to create web socket server through off chain worker?

I need to establish a web socket connection through off chain worker. I asked here How to establish web socket connection in offchain_worker but didn't get any response. Is there any way/example to ...
Boleng's user avatar
  • 535
1 vote
1 answer
157 views

How to establish web socket connection in offchain_worker

Is there any way/example to establish web socket connection through off chain worker? There are many Rust examples but I can't use standard library. Can someone please help me?
Boleng's user avatar
  • 535
4 votes
1 answer
130 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 \...
Deepak Chaudhary's user avatar
1 vote
1 answer
67 views

Iterating on a storage from Offchain Worker Concerns

I have a StorageMap named PublicKeyToMsaId which has around 300K inserted items and I want to iterate on all of those keys-values in offchain-worker to create a reverse map in offchain storage. To ...
Aramik M's user avatar
  • 151
2 votes
1 answer
68 views

How to fetch data through api?

I want to fetch the data through an api in our chain. More specifically, I have an api which gives me the latest news. How can i implement this in our substrate chain? can we have any doc or resources ...
Deepak Chaudhary's user avatar
2 votes
1 answer
44 views

How to register a custom extension for offchain workers?

I have the following code. #[cfg(feature = "std")] use sp_externalities::ExternalitiesExt; #[cfg(feature = "std")] sp_externalities::decl_extension! { pub struct CustomExt(u32)...
Sachin's user avatar
  • 61
1 vote
0 answers
28 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 ...
cocokick's user avatar
  • 165
0 votes
1 answer
70 views

Is runtime upgrade needed when changing offchain worker?

Suppose I have a blockchain that has been running for some time, and at a certain point, I need to update the offchain worker code. What is the recommended approach for updating the blockchain: ...
subuser's user avatar
2 votes
0 answers
31 views

Are onchain storage reads cheaper from offchain worker versus from extrinsic?

Are reads from offchain workers less expensive than reads from extrinsics? I am determining how to do some large, asynchronous processing of data and determining whether the reads in this process see ...
Justin Frevert's user avatar
1 vote
0 answers
106 views

Is 'Ran out of free Wasm instances' a bad symptom?

I develop a custom chain based on Substrate. The chain business logic involves stateful sessions where the state is managed through Http and unsigned transactions submitted via Offchain workers. Until ...
Yury Yukhananov's user avatar
1 vote
1 answer
77 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 ...
zimbabwe_slim's user avatar

15 30 50 per page