Skip to main content

Questions tagged [offchain-worker]

Oracle-like capabilities for Substrate chains.

0 votes
1 answer
15 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&...
Boleng's user avatar
  • 523
0 votes
0 answers
12 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 !...
Boleng's user avatar
  • 523
0 votes
0 answers
21 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 ...
Boleng's user avatar
  • 523
1 vote
0 answers
10 views

Encrypting data offchain / decrypting data with offchain worker

I want to create a StorageMap which looks like so: pub type EncryptedData<T: Config> = StorageMap<_, Blake2_128Concat, SomeId, SomeEncryptedValue, OptionQuery>; I plan to encrypt the data ...
WhisperingZebra's user avatar
3 votes
1 answer
39 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 ...
Yahor Tsaryk's user avatar
1 vote
0 answers
30 views

How can we monetize heavy computation using substrate blockchain?

Suppose a reputation system is built, where bad nodes (open source docker instances running computations such as a search engine) are penalized, and good nodes are incentivized. What is the secure way ...
Amiya Behera's user avatar
1 vote
1 answer
35 views

Would it be possible to make HTTP request on chain through pallet extrinsic?

We can make HTTP Get and Post request through Offchain worker. Can we also do the same on chain through pallet extrinsic? Is there any restriction?
Boleng's user avatar
  • 523
0 votes
1 answer
44 views

execute_block, initialize_block, apply_extrinsic, finalize_block, offchain_worker exists for struct `Executive` but its trait bound were not satisfied

I developed substrate parachain with custom pallets. Actually I wanna add OCW functionality to one of my pallets. After I updated runtime code and added CreateSignedTransaction implementation I tried ...
Artem Levchuk's user avatar
0 votes
0 answers
25 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-...
Boleng's user avatar
  • 523
0 votes
1 answer
42 views

Substrate Offchain Worker - failed to fetch sample price

I am trying to use Substrate Offchain Worker. I implemented as mentioned here https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/examples/offchain-worker. I am using same sample ...
Boleng's user avatar
  • 523
2 votes
1 answer
148 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 ...
Artem Levchuk's user avatar
1 vote
1 answer
91 views

How to feed private data(confidential information) in Substrate chain through oracle?

Is there any Oracle solution available to feed private data to Substrate chain? Feeding data to chain has already been answered here How can I build a price feed oracle for my Substrate chain?. And ...
Boleng's user avatar
  • 523
2 votes
1 answer
42 views

How to make a fn only callable by an offchain worker?

I don't think this is possible but is it? I have data that comes from an API that ultimately needs to be stored onchain which I don't want to risk having done through a Pays::No fn in case the call ...
bobby dy's user avatar
0 votes
0 answers
16 views

Troubleshooting Sequential Unsigned Transaction Processing with 200 Validators

we're attempting to send unsigned transactions from an offchain worker using the validation code snippet provided: ValidTransaction::with_tag_prefix("thea") .and_provides(...
ZKT's user avatar
  • 113
1 vote
1 answer
44 views

Set Off-chain worker with AccountId20

The examples in substrate use the sr25519 AccountId and Multisignature for creating offchain workers with signed transactions. Is there a way to use AccountId20 and EthereumSignature for a node using ...
Discardo's user avatar
  • 436

15 30 50 per page
1
2 3 4 5 6