mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 14:53:08 +00:00
Implement PREVRANDAO as if it was DIFFICULTY (#1084)
This commit is contained in:
parent
0117541909
commit
f852984e07
@ -9,11 +9,12 @@ global sys_blockhash:
|
||||
%stack (kexit_info, block_number) -> (kexit_info, 0)
|
||||
EXIT_KERNEL
|
||||
|
||||
// This is a temporary version that returns 0.
|
||||
// This is a temporary version that returns the block difficulty (i.e. the old version of this opcode).
|
||||
// TODO: Fix this.
|
||||
// TODO: What semantics will this have for Edge?
|
||||
global sys_prevrandao:
|
||||
// stack: kexit_info
|
||||
%charge_gas_const(@GAS_BASE)
|
||||
%stack (kexit_info) -> (kexit_info, 0)
|
||||
%mload_global_metadata(@GLOBAL_METADATA_BLOCK_DIFFICULTY)
|
||||
%stack (difficulty, kexit_info) -> (kexit_info, difficulty)
|
||||
EXIT_KERNEL
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user