Skip to main content

Questions tagged [offchain-worker]

Oracle-like capabilities for Substrate chains.

0 votes
1 answer
17 views

URI creation best practice

What is the best practice to create a URI in an off-chain worker hook? The String and format! usage is discouraged. But what is the most convenient way to create a URI from given parts like hostname, ...
khassanov's user avatar
  • 105
2 votes
1 answer
51 views

Calling external RPC method from OCW

I want to call an external RPC method from the offchain_worker. I checked multiple jsonrpc clients but none of them were no_std compatible. I want to know if there are any clients out there which can ...
StackedQ's user avatar
  • 131
1 vote
0 answers
37 views

Fetching offchain storage value returns different value than the value fetched using localStorageGet function

I need to get the rpc_url value set initially from the explorer. The localStorageGet rpc function returns the correct value of the rpc_url. This returns https://eth-mainnet.g.alchemy.com/v2/MY_API_KEY ...
strider's user avatar
  • 11
4 votes
1 answer
54 views

offchain-workers vs asynchronous task

There is not much info about using an asynchronous task in substrate docs i.e. task_manager in service.rs I want to know when one should be using offchain-worker and when one should use background ...
Rusty Pythonic Script's user avatar
4 votes
1 answer
50 views

Change state from a task

I have a asynchronous task running in service.spawn_essential_task(task). Which does some stuff and wants to write data in storage. How can i achieve this? Changing state by making runtime_apis to ...
Guest's user avatar
  • 43
2 votes
1 answer
94 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 ...
Maksim Ramanenkau's user avatar
2 votes
1 answer
85 views

Is it possible to write-access Local Storage from the Node?

My use case is this: an Offchain Worker sends Http requests to certain endpoints. These endpoints are hardcoded on chain under current implementation. I would like to be able to configure those ...
Yury Yukhananov's user avatar
2 votes
0 answers
85 views

Offchain cache/view of on-chain storage data

I am implementing a pallet, that stores in on-chain storage (aka StorageNMap's) some user provided data. Pallet is performing offchain computations by iterating on-chain storage from offchain-worker ...
Klapeyron's user avatar
  • 136
4 votes
2 answers
210 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.
Matt Duncan's user avatar
2 votes
1 answer
36 views

Configure offchain worker with command line argument

Is configuring an off-chain worker with a command line argument possible? e.g. ./target/release/cere --dev --alice --my-custom-url "http://my-..." If not what are the other options?
Maksim Ramanenkau's user avatar
1 vote
0 answers
24 views

How to connect with phala contract for creation of anonymous accounts using phala network?

I want to create anonymous account using phala network. Here is my logic. You need to sign with your kyc account using the password as message and verify that the account is yours inside phala ...
Amiya Behera's user avatar
1 vote
1 answer
57 views

Configure OCW to run every x blocks or on demand

I understand that off-chain workers are spawned during block import, quote: Offchain workers are spawned during each block import. However, they aren't executed during initial blockchain ...
Ronin's user avatar
  • 189
1 vote
1 answer
71 views

Off-chain worker. Error submitting a transaction to the pool: InvalidTransaction::ExhaustsResources [duplicate]

Error submitting a transaction to the pool: Transaction pool error: Invalid transaction validity: InvalidTransaction::ExhaustsResources It works fine in standalone but in parachain it fails. Off chain ...
rust.dev's user avatar
  • 529
0 votes
1 answer
61 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?
rust.dev's user avatar
  • 529
1 vote
1 answer
57 views

Iterate storage maps inside an offchain worker

I need to iterate over the following double map inside an offchain worker: How can I access this map outside the pallet assets? Can I use an RPC method to get all the values for that double map ...
Mateo Baldassarre's user avatar

15 30 50 per page