mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 07:13:08 +00:00
Impl difficulty opcode for interpreter
This commit is contained in:
parent
60fed608ef
commit
86bd055b5f
@ -351,7 +351,7 @@ impl<'a> Interpreter<'a> {
|
||||
0x41 => todo!(), // "COINBASE",
|
||||
0x42 => self.run_timestamp(), // "TIMESTAMP",
|
||||
0x43 => self.run_number(), // "NUMBER",
|
||||
0x44 => todo!(), // "DIFFICULTY",
|
||||
0x44 => self.run_difficulty(), // "DIFFICULTY",
|
||||
0x45 => todo!(), // "GASLIMIT",
|
||||
0x46 => todo!(), // "CHAINID",
|
||||
0x48 => todo!(), // "BASEFEE",
|
||||
@ -667,6 +667,10 @@ impl<'a> Interpreter<'a> {
|
||||
self.push(self.get_global_metadata_field(GlobalMetadata::BlockNumber))
|
||||
}
|
||||
|
||||
fn run_difficulty(&mut self) {
|
||||
self.push(self.get_global_metadata_field(GlobalMetadata::BlockDifficulty))
|
||||
}
|
||||
|
||||
fn run_prover_input(&mut self) -> anyhow::Result<()> {
|
||||
let prover_input_fn = self
|
||||
.prover_inputs_map
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user