ARC-0040: Accessing block metadata inside programs #69
evan-schott
started this conversation in
ARCs
Replies: 2 comments
-
nothing here |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes definitely, using timestamp is more accurate than block heights to do time base calculations imo. Not sure about use-case of others yet. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
arc: 0040
title: Accessing block metadata inside programs
authors: @evan-schott @d0cd
discussion: ARC-0040: Accessing block metadata inside programs
topic: Protocol
status: Draft
created: 2024-04-02
Specification
Add support for the following opcodes in Aleo:
block.round
,cumulative.weight
,cumulative.proof_target
,coinbase.target
,proof.target
,coinbase.target
,block.timestamp
,coinbase.timestamp
,block.hash
, andnetwork.id
. The goal is for all block metadata to be accessible inside the finalize scope of deployed programs. Example:block.timestamp 10u32
will return the timestamp of block10
.References
Here is an example implementation of
network.id
.Beta Was this translation helpful? Give feedback.
All reactions