Questions tagged [timestamp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers

Which one is ExternalTrigger in BABE?

in this document it mentioned ExternalTrigger. So which pallet could be ExternalTrigger for BABE. and How to implement EpochChangeTrigger? It also said that pallet-session could be used, but pallet-...
MinhK's user avatar
  • 115
0 votes
0 answers

How to test smart contract timestamp dependent behavior?

how can I test block_timestamp-dependent smart contract behavior? The substrate contact node doesn't allow block_timestamp manipulations. For context, in the EVM ecosystem, one can use hardhat helpers ...
Yrefef's user avatar
  • 75
0 votes
0 answers

Assertion Failed error when minimumPeriod is set to 0

I'm currently working on upgrading a parachain to use Asynchronous Backing which requires a change in the pallet_timestamp making the MinimumPeriod = 0 impl pallet_timestamp::Config for Runtime { ....
Valentin Fernandez's user avatar
3 votes
0 answers

How to add custom process without exceeding the block time?

The question can seem weird but here is the geist of it : In a custom chain with 20 sec block time, we have a different format of header that includes more information. At the end of the block, we ...
Leouarz's user avatar
  • 353
5 votes
1 answer

pallet scheduler with timestamp instead of blocknumber?

Is it possible to schedule a call using timestamp from timestamp pallet instead of blocknumber? The docs of scheduler pallet states the following: "This Pallet exposes capabilities for scheduling ...
Xavier's user avatar
  • 415
2 votes
1 answer

Problem with timestamps in governance platform

I have governance platform written in ink!, where I can create poll with pollId, number of options, and with poll_start_time and poll_end_time. And this is fine. So when poll is started I can't call ...
jvn's user avatar
  • 55
7 votes
1 answer

What is the ValidAtTimestamp error supposed to mean?

In pallet-timestamp, what is InherentError::ValidAtTimestamp supposed to mean exactly? let minimum = (Self::now() + T::MinimumPeriod::get()).saturated_into::<u64>(); if t > *(data + ...
b0zero's user avatar
  • 533
0 votes
2 answers

How to set timestamp in benchmarks?

Is it possible to use std for benchmarks? If not, how can I get timestamps in a benchmark? I tried using this but it didn't compile: #[cfg(feature = "runtime-benchmarks")] extern crate std;...
Robert La Ferla's user avatar
6 votes
1 answer

How to get previous block time using timestamp

How I can get the previous block time using timestamp pallet
Deepak Chaudhary's user avatar
2 votes
2 answers

Can any one tell me why weight generated via benchmarking execution is varying on each execution

I have written the benchmarking code for the pallet, Used the below CLI command to run benchmarking - ./target/release/node-template benchmark pallet --pallet pallet_usd_rate --extrinsic "*" ...
Asmita's user avatar
  • 195
2 votes
1 answer

At what time is `Timestamp::now` no longer undefined?

The documentation of the Timestamp pallet states that the result of Timestamp::now() is undefined until Timestamp::set is called for the first time. Looking at the implementation details, you can see ...
mkl's user avatar
  • 420
2 votes
1 answer

Rust ink! Utc::now() from chrono libary returns : function or associated item not found in `chrono::Utc'

as the title suggests. I imported chrono 0.4 just like in the documentation Here And when i ever i call Utc::now() to get current UTC time, i get error that the function now() doesn't not exists. Here ...
yonatan hornstein's user avatar
7 votes
1 answer

On empty blocks, who is paying timestamp fees?

On empty blocks you can see such transactions where paysFee: Yes. What does it mean though? Who is paying the fees for the timestamp module?
Purple_Turtle's user avatar
9 votes
3 answers

How to estimate the timestamp of a future block in Substrate?

I have some expiry time in block number which I need to deem some storage values expired after that block number, however in the UX I want to present this value as an estimated datetime. So to be able ...
Hamid's user avatar
  • 101
8 votes
2 answers

How can we convert the timestamp to the date/time in Substrate pallet?

I need to get the system time in my pallet for which I am able to get the epoch format like 1590512778000. Now I need to convert this time to the date-time. I tried many ways but none worked. Can you ...
Pankaj's user avatar
  • 2,031