mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-06 15:53:10 +00:00
Don't touch contract address in DELEGATECALL or CALLCODE (#1036)
* Don't touch address in DELEGATECALL or CALLCODE * Minor
This commit is contained in:
parent
bfd6834dc2
commit
d05db4973d
@ -72,7 +72,6 @@ global sys_callcode:
|
||||
SWAP2
|
||||
// stack: address, gas, kexit_info, value, args_offset, args_size, ret_offset, ret_size
|
||||
%u256_to_addr // Truncate to 160 bits
|
||||
DUP1 %insert_touched_addresses
|
||||
DUP1 %insert_accessed_addresses
|
||||
|
||||
%call_charge_gas(1, 0)
|
||||
@ -174,7 +173,6 @@ global sys_delegatecall:
|
||||
SWAP2
|
||||
// stack: address, gas, kexit_info, args_offset, args_size, ret_offset, ret_size
|
||||
%u256_to_addr // Truncate to 160 bits
|
||||
DUP1 %insert_touched_addresses
|
||||
DUP1 %insert_accessed_addresses
|
||||
|
||||
// Add a value of 0 to the stack. Slightly inefficient but that way we can reuse %call_charge_gas.
|
||||
|
||||
@ -90,33 +90,6 @@ where
|
||||
Ok((proof, outputs))
|
||||
}
|
||||
|
||||
/// Generate traces, then create all STARK proofs. Returns information about the post-state,
|
||||
/// intended for debugging, in addition to the proof.
|
||||
pub fn dont_prove_with_outputs<F, C, const D: usize>(
|
||||
all_stark: &AllStark<F, D>,
|
||||
config: &StarkConfig,
|
||||
inputs: GenerationInputs,
|
||||
timing: &mut TimingTree,
|
||||
) -> Result<(PublicValues, GenerationOutputs)>
|
||||
where
|
||||
F: RichField + Extendable<D>,
|
||||
C: GenericConfig<D, F = F>,
|
||||
[(); ArithmeticStark::<F, D>::COLUMNS]:,
|
||||
[(); CpuStark::<F, D>::COLUMNS]:,
|
||||
[(); KeccakStark::<F, D>::COLUMNS]:,
|
||||
[(); KeccakSpongeStark::<F, D>::COLUMNS]:,
|
||||
[(); LogicStark::<F, D>::COLUMNS]:,
|
||||
[(); MemoryStark::<F, D>::COLUMNS]:,
|
||||
{
|
||||
timed!(timing, "build kernel", Lazy::force(&KERNEL));
|
||||
let (_traces, public_values, outputs) = timed!(
|
||||
timing,
|
||||
"generate all traces",
|
||||
generate_traces(all_stark, inputs, config, timing)?
|
||||
);
|
||||
Ok((public_values, outputs))
|
||||
}
|
||||
|
||||
/// Compute all STARK proofs.
|
||||
pub(crate) fn prove_with_traces<F, C, const D: usize>(
|
||||
all_stark: &AllStark<F, D>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user