Questions tagged [offchain]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
14 views

Offchain workers in parachain

On a parachain (Substrate polkadot-v0.9.20 branch), I am trying to trigger some offchain tasks using an offchain worker in my pallet, but the task is not triggered. I checked that the on_finalize hook ...
user avatar
0 votes
0 answers
17 views

offchain http issue

I have integrated offchain http cal to fetch ibfo from infura as below ''' fn fetch_block(block: &str) -> Result<BlockHeader, http::Error> { // debug::native::debug!("INFURA: ...
user avatar
  • 121
5 votes
0 answers
27 views

Outbound network traffic linearly growing with offchain protocol and recommendations for handling traffic growth

Issue We are experiencing a behaviour on our standalone/parachain node where the Network Bps on our cloud provider linearly increases throughout the lifecycle of our protocol. The increase continues ...
user avatar
6 votes
1 answer
34 views

Is there any way to get all the key/value pairs together from sc_client_db::offchain::LocalStorage?

I can see we have the option to get the values by using their keys one by one using get(), but is there any way to get all the pairs together wrapped in an iterator so that we don't need to hit the ...
user avatar
3 votes
2 answers
49 views

How to parse/match a specific frame_system event?

From the following function I can read the frame_system events: let events = frame_system::Pallet::<T>::read_events_no_consensus(); the above provides me the following example array: ...
user avatar
4 votes
1 answer
78 views

How to extract data from Offchain storage in client-side?

I'm trying to access data that I'm storing through the RPC off-chain endpoint. Is there any way to get the instance of off-chain storage in service.rs through which we can extract that has been ...
user avatar
0 votes
1 answer
22 views

Off-chain DB indexing example

Where can I find Tomasz Drwięga Off-chain DB indexing example, implementing the following runtime function? fn on_finalize(_n: BlockNumberFor<T>){} TIA
user avatar
2 votes
2 answers
50 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 ...
user avatar
9 votes
2 answers
131 views

How to verify a signature in a Pallet?

I have a Pallet that should verify a signature for some input data and a specific public key. It looks like this: fn verify(_: OriginFor<T>, data: Vec<u8>, sig: ???, from: ???) Is this ...
user avatar